Server IP : 127.0.0.2 / Your IP : 3.12.123.254 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 : |
<?php ob_start(); session_start(); require_once('session-check.php'); require_once('include/db-config.php'); $ID = $_GET['id']; $sql = "SELECT ID, month, year, file FROM maintrainer_seo_report WHERE ID = " . intval($ID); $result = mysqli_query($conn, $sql); if ($row = mysqli_fetch_array($result)) { $ID = $row['ID']; $month = $row['month']; $year = $row['year']; $file = $row['file']; } ?> <!DOCTYPE html> <html> <head> <title>Edit SEO Report</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" type="text/css" rel="stylesheet"> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center"> <?php include_once('include/include_header.php'); ?> <tr> <td width="100%" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="1100" align="center" class="body_bg"> <tr><td colspan="3" style="height:9px;"></td></tr> <tr> <td style="width:9px;"></td> <td class="content_bg" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="95%" align="center"> <tr> <td style="height:40px;"></td> </tr> <tr> <td> <form action="seo-report-edit-action.php" method="post" id="editReportForm" name="editReportForm" enctype="multipart/form-data" onSubmit="return validateform();"> <table border="0" cellpadding="0" cellspacing="0" class="normal_text"> <tr> <td class="mainhead" valign="top" colspan="2">EDIT SEO REPORT</td> </tr> <tr><td style="height:10px;"></td></tr> <tr> <td class="textnormal" style="padding-left:20px; padding-right:10px;" valign="top">Month</td> <td> <select id="month" name="month" style="width:150px;"> <option value="January" <?php if ($month == 'January') echo "selected"; ?>>January</option> <option value="February" <?php if ($month == 'February') echo "selected"; ?>>February</option> <option value="March" <?php if ($month == 'March') echo "selected"; ?>>March</option> <option value="April" <?php if ($month == 'April') echo "selected"; ?>>April</option> <option value="May" <?php if ($month == 'May') echo "selected"; ?>>May</option> <option value="June" <?php if ($month == 'June') echo "selected"; ?>>June</option> <option value="July" <?php if ($month == 'July') echo "selected"; ?>>July</option> <option value="August" <?php if ($month == 'August') echo "selected"; ?>>August</option> <option value="September" <?php if ($month == 'September') echo "selected"; ?>>September</option> <option value="October" <?php if ($month == 'October') echo "selected"; ?>>October</option> <option value="November" <?php if ($month == 'November') echo "selected"; ?>>November</option> <option value="December" <?php if ($month == 'December') echo "selected"; ?>>December</option> </select> </td> </tr> <tr><td style="height:20px;"></td></tr> <tr> <td class="textnormal" style="padding-left:20px; padding-right:10px;" valign="top">Year</td> <td> <select id="year" name="year" style="width:150px;"> <?php $currentYear = date("Y"); for ($i = $currentYear; $i >= 2000; $i--) { $selected = ($year == $i) ? "selected" : ""; echo "<option value='$i' $selected>$i</option>"; } ?> </select> </td> </tr> <tr><td style="height:20px;"></td></tr> <tr> <td class="textnormal" style="padding-left:20px; padding-right:10px;" valign="top">File</td> <td> <input type="file" name="file" id="file" style="width:400px;"> <input type="hidden" name="existing_file" value="<?php echo htmlspecialchars($file); ?>"> </td> </tr> <tr><td style="height:20px;"></td></tr> <tr> <td class="textnormal"> </td> <td> <input type="submit" id="save" name="save" value="Submit" class="bttn"> <input type="button" id="back" name="back" value="Cancel" class="bttn2" onClick="javascript:history.back();"> </td> </tr> <tr><td><br><br></td></tr> </table> <input type="hidden" id="ID" name="ID" value="<?php echo $ID; ?>"> </form> </td> </tr> </table> </td> <td style="width:9px;"></td> </tr> <tr><td colspan="3" style="height:9px;"></td></tr> </table> </td> </tr> <?php include_once('include/include_footer.php'); ?> </table> </body> <script> function validateform() { const fileInput = document.getElementById("file"); const filePath = fileInput.value; const allowedExtensions = /(\.pdf|\.docx|\.xls|\.xlsx)$/i; if (filePath && !allowedExtensions.exec(filePath)) { alert("Invalid file type. Please upload a PDF, DOCX, XLS, or XLSX file."); fileInput.focus(); fileInput.value = ""; return false; } return true; } </script> </html>