Server IP : 127.0.0.2 / Your IP : 3.128.168.155 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'); ?> <!DOCTYPE html> <HTML> <HEAD> <TITLE>Joel Levitt, maintenance management, maintenance management consulting, tpms</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <link href="css/style.css" type="text/css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="bootstrap.min.css"/> <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> --> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <!-- ImageReady Slices (maintrainer_slice2.jpg) --> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"> <?php include_once('include/include_header.php'); ?> <?php // require_once('include/db-config.php'); $sql= "Select * from maintrainer_home2"; $result=mysqli_query($conn,$sql) or die(mysqli_error()); while($row=mysqli_fetch_array($result)) { $ID = $row['ID']; $Order = $row['Order']; $BoxTitle = $row['BoxTitle']; $BoxContent = $row['BoxContent']; $ReadMoreLink = $row['ReadMoreLink']; } ?> <TR> <TD width="100%" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="1100" align="center" class="body_bg" style="border-color:"> <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><!--finalcount <td style="height:40px;" class="other_link" align="right"> <a href="home-mgt2.php">Home Page Mgt.</a> | <a href="home-mgt3.php">Landing Page Mgt.</a> | <a href="home-mgt.php">Old Home Page Mgt.</a> </td>--> </tr> <tr> <td> <form action="home-mgt2-action.php" method="post" enctype="multipart/form-data" id="form" name="form" onSubmit=""> <table border="0" cellpadding="0" cellspacing="0" class="normal_text" width="100%" id="tblSample"> <tr><td class="mainhead" valign="top" colspan="2">MANAGE HOME PAGE CONTENT</td></tr> <tr><td style="height:10px;"></td></tr> <tr> <td> <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <tr id="appenddata"> <!-- <td class="tabletext"><?php echo ++$i; ?></td> <td class="tabletext">Box 2 Heading <input type="text" style="width:100%;" id="lftbx2head" name="lftbx2head" value="<?php echo $BoxTitle; ?>"> Box 2 Content <br><textarea style="width:100%; height:150px;" id="lftbx2content" name="lftbx2content"><?php echo $BoxContent; ?></textarea> <br> Box 2 Read More Link <input type="text" style="width:100%;" id="lftbx2read" name="lftbx2read" value="<?php echo $ReadMoreLink; ?>"> </td> <td class="tabletext">sewds</td> <td class="tabletext">dfcdszfczd</td> < --> <?php $sql= "Select * from maintrainer_home2"; $result=mysqli_query($conn,$sql); // var_dump($result) ; // $rowall=mysqli_fetch_all($result); // var_dump($rowall); $i=0; $Countof=0; if (mysqli_num_rows($result) > 0) { // output data of each row // while($row = mysqli_fetch_assoc($result)) { // echo "id: " . $row["BoxTitle"]. " - Name: " . $row["BoxContent"]. " " . $row["ReadMoreLink"]. "<br>"; // } while($row = mysqli_fetch_assoc($result)) { $BoxTitle = $row['BoxTitle']; $BoxContent = $row['BoxContent']; $ReadMoreLink = $row['ReadMoreLink']; $BoxImage = $row['BoxImage']; $ID=$row['ID']; $Order=$row['Order']; // print_r($ID); $i++; $countofdata= ++$Countof; echo ' <td class="normal_text" valign="top" width="23%" name="table-add" id="tableadd"> Box '.$countofdata.' Heading <br> <input type="text" style="width:100%;" id="BoxTitle" name="BoxTitle'.$ID.'" value="'.$BoxTitle.'" > <input type="hidden" id="idtesting'.$ID.'" name="boxtitle[]" value="'.$ID.'"> <input type="hidden" id="Orderclass" name="Orderclass" value="'.$Order.'"> <a href="home-mg2-delete.php?del='.$ID.'" class="del_btn"> <input class="close-icon pull-right" id="buttoncustomerName" type="button" value="X"></a> <br> Box '.$countofdata.' Content <br> <textarea style="width:100%; height:150px;" id="BoxContent" name="BoxContent'.$ID.'">'.htmlentities($BoxContent).'</textarea> <input type="hidden" id="textid'.$ID.'" name="Content'.$ID.'" value="'.$ID.'"> <input type="hidden" id="Orderclass" name="Orderclass" value="'.$Order.'"> <br> Box '.$countofdata.' Read More Link <input type="text" style="width:100%;" id="ReadMoreLink" name="ReadMoreLink'.$ID.'" value="'.$ReadMoreLink.'"> <input type="hidden" id="textid3'.$ID.'" name="box'.$ID.'" value="'.$ID.'"> <input type="hidden" id="Orderclass" name="Orderclass" value="'.$Order.'"> <br> OR <br> <input type ="file" name="BoxImage'.$ID.'" id="BoxImage" value="'.$BoxImage.'"> <br><br> </td> '; if($i % 3 ==0){ echo '</tr>'; echo '<tr>'; } } } ?> </tr> <input type="hidden" id="countofcontent" value="<?php echo $countofdata ?>"> <!-- <input type="text" id="id1" name="id1" value="<?php echo $ID; ?>"> --> <tr border="0" cellpadding="0" cellspacing="0" width="33%" id="adddata"></tr> <input type="hidden" id="countorder" name="countorder" value="<?php echo $Order; ?>"> <tr><td style="height:20px;"></td></tr> <tr> <td colspan="5" align="center"><input type="button" id="add_button" value="Add"> <input type="submit" id="save" name="save" value="Submit" class="bttn"> <input type="hidden" id="saving" name="saving" value="8" > <input type="button" id="back" name="back" value=" Cancel " class="bttn2" onClick="javascript:history.back();"> </td> </tr> <tr><td style="height:40px;"></td></tr> </TABLE> </tD> </TR> </table> <input type="hidden" name="id" id="id" value="<?php echo $id; ?>"> <input type="hidden" name="CountOfData" id="CountOfData" value="<?php echo $numberOfRows; ?>"> <input type="hidden" name="idi" id="idi" value="<?php echo $i; ?>"> </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> <!-- End ImageReady Slices --> </BODY> <style> #add_button{ width: 58px; background-color: #A8130D; border-color: #A8130D; height: 22px; color: #FFF; font-family: Arial; font-size: 13px; } #cancel-button{ width: 63px; height: 24px; color: black; font-family: Arial; font-size: 13px; } #BoxTitle{ width: 92%!important; } #buttoncustomerName{ margin-left: -29px; } #BoxTitless{ width: 92%!important;BoxTitle } #BoxContent{ width: 92%!important; } #ReadMoreLink{ width: 92%!important; } #lftbx6content{ width: 92%!important; } #lftbx6read{ width: 92%!important; } } .close-icon{ border: 1px solid transparent; background-color: transparent; top: 0; margin-left: -23px; position: relative; } #ex{ font-size: 17px; } </style> </HTML> <?php ?> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> <script> var count= $("#countofcontent").val(); var idis= $("#idi").val(); var currentdate = new Date(); // var count=$("#datacount").val(); // var i=0; $(document).ready(function(){ // $date=Date.now(); // // $Current = date('Y-m-d H:i:s'); // console.log($date); var datetime = currentdate.getFullYear() + "-" + (currentdate.getMonth()+1) + "-" + currentdate.getDate() + ' ' + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); console.log(datetime); var i=0; // console.log('aaaa'); var leftboxHead; var leftboxConte; var leftboxRead; var CenterBoxHead; var CenterBoxCont; var CenterBoxRead; var rightboxhead; var rightboxcontent; var rightboxread; var orderdata= $("#countorder").val(); // console.log(orderdata); // var i=0; $("#add_button").click(function(){ var addorder= ++i; console.log(addorder); var dataorderof =++orderdata; console.log(dataorderof); // var CountOfHomepage=$("#CountOfData").val(); // console.log(CountOfHomepage); var finalcount=++count; // console.log(finalcount); // var i++; if(addorder > 3) { var tr = '</tr><tr>'; } else{ // var tr = ""; } $("#adddata").append('<td class="normal_text newtest" valign="top" width="23%" name="table-add" id="table'+dataorderof+'">Box '+finalcount+' Heading<br><input type="hidden" name="boxtitle[]" value="0"><input type="text" style="width:100%;" id="BoxTitless" name="BoxTitle[]" value=""> <input class="close-icon pull-right" id="buttoncustomerName" type="button" value="X"> <br> Box '+finalcount+' Content<br><textarea style="width:100%; height:150px;" id="BoxContent" name="BoxContent[]"></textarea><br>Box '+finalcount+' Read More Link<input type="text" style="width:100%;" id="ReadMoreLink" name="ReadMoreLink[]" value=""><input type="file" id="BoxImage" name="BoxImage"></td><input type="hidden" id="orderdataof" name="orderdataof[]" value="'+dataorderof+'"><input type="hidden" id="updateddate" name="updateddate" value="'+datetime+'">'+tr ); }); }); $(document).on("click","#buttoncustomerName",function() { // console.log('hi'); $(this).parent().remove(); }); </script>