Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 3.15.198.191
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/sponsor-new-action.php
<?php
ob_start();
session_start();
require_once('session-check.php');

require_once('include/db-config.php');
function fetchSponsorData($conn)
{
    $sql = "SELECT SponsorName, Telephone, Fax, Email, OrderNo, Status, EditedDate FROM maintrainer_sponsor";
    $result = mysqli_query($conn, $sql);

    $sponsors = array();

    while ($row = mysqli_fetch_assoc($result)) {
        $editedDate = $row['EditedDate'];
        $editedDateFormatted = date('M-d-y', strtotime($editedDate));
        $row['EditedDate'] = $editedDateFormatted;
        $status = $row['Status'] == 1 ? 'Active' : 'Inactive';
        $row['Status'] = $status;
        $sponsors[] = $row;
    }

    return $sponsors;
}

function exportXLS($data)
{
    header('Content-Type: application/vnd.ms-excel');
    header('Content-Disposition: attachment; filename="Sponsor_list.xls"');
    $output = fopen('php://output', 'w');
    $headers = array(

        'Sponsor Name',
        'Telephone No',
        'Fax No',
        'Email Address',
        'Order No',
        'Status',
        'Updated Date'
    );

    array_unshift($headers, 'SI');
    fputcsv($output, $headers);
    $index = 1;
    foreach ($data as $row) {
        array_unshift($row, $index++);
        fputcsv($output, $row, "\t");
    }
    fclose($output);
}

$sponsors = fetchSponsorData($conn);

if (isset($_GET['export']) && $_GET['export'] == 'xls') {
    exportXLS($sponsors);
    exit;
}

$fullname=mysqli_real_escape_string($conn,stripslashes($_POST['fullname']));
$url=$_POST['url'];
$telephone=$_POST['telephone'];
$fax=$_POST['fax'];
$email=$_POST['email'];
$sortorder=$_POST['sortorder'];
$status=$_POST['status'];
$CreatedDate=date("Y-m-d ");
$EditedDate=date("Y-m-d ");
$sql="insert into maintrainer_sponsor(SponsorName, SponsorURL, Telephone, Fax, Email, OrderNo, Status, CreatedDate, EditedDate) values ('".$fullname."','".$url."','".$telephone."','".$fax."','".$email."',".$sortorder.",".$status.",'".$CreatedDate."','".$EditedDate."')";
$result=mysqli_query($conn,$sql);

$url = "Location: publicsessions-convert2html.php?r=1";
header($url);
?>

Anon7 - 2022
AnonSec Team