File manager - Edit - /home/autoph/public_html/connect/home/CL_NewsUpdates.php
Back
<?php ob_start(); include 'core/init.php'; protected_page(); $comID=$user_data['company']; if(isset($_GET['company'])){ $comName=$_GET['company'];//mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$comID'"),0); }else{ $comName = mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$comID'"),0); } $myDate = date_create() ->format("Y-m-d"); //echo $myDate; $userID=$user_data['u_id']; $dataCount = 0; ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/style_menu.css"> <link rel="stylesheet" href="css/style.css"> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); function confirmDeleteBox(){ var diva=document.getElementById("deleteBoxYesNo"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function showAddNewForm(){ var diva=document.getElementById("AddNewInventoryForm"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function showAddNewAdminForm(){ var diva=document.getElementById("FORMAddNewAdmin"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function hideAssignMsg(){ $("#saveMessage").fadeOut(3000); }; function showAssignMsg(){ $("#saveMessage").fadeIn(); }; function invHideAssignMsg(){ $("#invMessage").fadeOut(3000); }; function invShowAssignMsg(){ $("#invMessage").fadeIn(); }; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!--<div id="wait" style="display:none;width:400px;height:100px;border:0px solid red;position:absolute;top:50%;left:45%;padding:2px;z-index:999999999999999999"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Loading...</div>--> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function(){ /* $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); */ //============================================================================================================================================ //============================================================================================================================================ $("#saveAnnountment").click(function(){ var anTitle = $("#anTitle").val(); var anSubTitle = $("#anSubTitle").val(); var ahDescription = $("#ahDescription").val(); var startDate = $("#startDate").val(); var endDate = $("#endDate").val(); //alert(SearchText); //return false; if(anTitle==""){ //alert('Invalid Entry'); $('#anTitle').focus(); $('#anTitle').css({'border':'1px solid red'}); $('#anTitle').css({'color':'red'}); $('#anTitle').attr("placeholder","Enter something to search..."); return false; } if(anSubTitle==""){ //alert('Invalid Entry'); $('#anSubTitle').focus(); $('#anSubTitle').css({'border':'1px solid red'}); $('#anSubTitle').css({'color':'red'}); $('#anSubTitle').attr("placeholder","Enter something to search..."); return false; } if(ahDescription==""){ //alert('Invalid Entry'); $('#ahDescription').focus(); $('#ahDescription').css({'border':'1px solid red'}); $('#ahDescription').css({'color':'red'}); $('#ahDescription').attr("placeholder","Enter something to search..."); return false; } if(startDate==""){ //alert('Invalid Entry'); $('#startDate').focus(); $('#startDate').css({'border':'1px solid red'}); $('#startDate').css({'color':'red'}); $('#startDate').attr("placeholder","Enter something to search..."); return false; } if(endDate==""){ //alert('Invalid Entry'); $('#endDate').focus(); $('#endDate').css({'border':'1px solid red'}); $('#endDate').css({'color':'red'}); $('#endDate').attr("placeholder","Enter something to search..."); return false; } ShowUploadBar(); //if(confirm("WARNING: \n\nARE YOU SURE YOU WANT TO DELETE THIS RECORD? \n\n Press 'OK' button to proceed...")){ $.ajax({ url: "PRF_saveNewAnnouncement.php", type: "POST", async: false, data: { "anTitle": anTitle, "anSubTitle": anSubTitle, "ahDescription": ahDescription, "startDate": startDate, "endDate": endDate, "done": 1 }, success: function(d){ HideaddNewRecordForm(); ShowUploadBar(); $("#announcementTable").html(d); //invHideAssignMsg(); //$('#searchText').val(''); . } }) //} }); //===========================AttachedFinalPay================================================================================================================= //============================================================================================================================================ }); function HideaddNewRecordForm(){ $("#addNewRecordForm").fadeOut(500); }; function showaddNewRecordForm(){ $("#addNewRecordForm").fadeIn(500); }; function showAdminAccess(row) { var x=row.cells; document.getElementById("clearanceID").value = x[0].innerHTML; document.getElementById("SelUserName").value = x[2].innerHTML; document.getElementById("SelEMPID").value = x[1].innerHTML; document.getElementById("SelDateCreated").value = x[4].innerHTML; document.getElementById("SelPosition").value = x[3].innerHTML; document.getElementById("activeRecord").value = "SELECTED RECORD: " + x[4].innerHTML + " (Record # " + x[1].innerHTML +")"; } </script> <style> p{ font-Family:Calibri; font-size:20px; font-weight:bold; color:black; padding:10px; padding-top:0px; margin:10px; margin-top:0px; margin-left:0px; } select { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/select-arrow.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/select-arrow.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/select-arrow.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/select-arrow.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/select-arrow.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center right; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right:5px; } .bgColorBlk{ background: -webkit-linear-gradient(left top,#000000, #646462,#e3e3da); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(bottom right, #000000, #646462,#e3e3da); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(bottom top, #000000, #646462,#e3e3da); /* For Firefox 3.6 to 15 */ background: linear-gradient(to bottom right, #000000, #646462,#e3e3da); /* Standard syntax */ } input, text, date { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/pen.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/pen.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/pen.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/pen.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/pen.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center left; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left:5px; height:30px; margin-top:0px; text-align:center; } textareaXXXX { -webkit-appearance: button; -moz-appearance: button; -webkit-user-select: none; -moz-user-select: none; -webkit-padding-end: 20px; -moz-padding-end: 20px; -webkit-padding-start: 2px; -moz-padding-start: 2px; background-color: #d9dad8 ; /* Fallback color if gradients are not supported */ background-image: url(images/pen.png), -webkit-linear-gradient(top, #E5E5E5, #F4F4F4); /* For Chrome and Safari */ background-image: url(images/pen.png), -moz-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Firefox (3.6 to 15) */ background-image: url(images/pen.png), -ms-linear-gradient(top, #E5E5E5, #F4F4F4); /* For pre-releases of Internet Explorer 10*/ background-image: url(images/pen.png), -o-linear-gradient(top, #E5E5E5, #F4F4F4); /* For old Opera (11.1 to 12.0) */ background-image: url(images/pen.png), linear-gradient(to bottom, #E5E5E5, #F4F4F4); /* Standard syntax; must be last */ background-position: center right; background-repeat: no-repeat; border: 1px solid #AAA; border-radius: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); color: #555; font-size: 14px; margin: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height:30px; margin-top:0px; padding:2px; } table{ border-collapse:collapse; width:100%; } th{ padding:8px; font-family:Verdana; color: #c4cac3 ; font-size:12px; font-weight:normal; border:1px solid gray; text-align:left; background:#2c3e29; } .tableMenu{ display:block;padding:3px;font-weight:normal;color:blue;border:1px solid gray;;width:70px;float:left;margin-right:15px; } .tableMenu:hover{ display:block;padding:3px;font-weight:bold;color:red;cursor: pointer;border:1px solid red;width:70px;background:#f4fcb6;float:left;;margin-right:15px; } </style> </head> <body style="font-family:Verdana;color:#aaaaaa;background:white"> <!--===================================================== --> <!--===========OPEN TEMPLATE FOR VIEW======================== --> <input type="hidden" id="addByUID" value="<?php echo $userID;?>"> <input type="hidden" id="addCompID" value="<?php echo $comID;?>"> <input type="hidden" id="SelUserName"> <input type="hidden" id="SelEMPID"> <input type="hidden" id="SelDateCreated"> <input type="hidden" id="SelPosition"> <!--===================================================== --> <!--========HR COMPUTATION APPROVAL WITH EMPLOYEE============ --> <!--===================================================== --> <div id='addNewRecordForm' style='display:none;position:absolute;top:100px;left:20px;height:600px;width:600px;background:white;border:2px solid gray'> <div style='padding:0px;width:100%;float:left;border:0px solid lightgray;background:#fff;height:100%'> <div class='grayBG' style='vertical-align:top;height:30px;margin:0px;width:100%;border-bottom:0px solid gray;padding:5px;font-family:Verdana;font-weight:bold;font-size:12px;color:#043062;text-align:left'>☳ ADD NEW RECORD <div style='float:right;font-family:Calibri;font-size:18px;'> <a href='#' onclick='HideaddNewRecordForm()' style='font-weight:bold'> ✕ </a> </div> </div> <input type="hidden" id="clearanceID" style="font-family:Arial;font-size:16px;color:blue;font-weight:bold;margin:2px;padding:2px;border:0px solid white" disabled> <p style='float:left;font-family:Yu Gothic Light;font-weight:normal;font-size:16px;text-align:justify;padding:20px;padding-top:10px'>NEW ANNOUNCEMENT TO BE POSTED IN AUTOHUB APP.</p> <label style='width:100%;float:left;margin-left:5%;color:black'>TITLE:</label> <input type='text' id='anTitle' placeholder='Title' style='width:100%;width:90%;margin-left:5%;background:white;border:1px solid gray;text-align:left'> <label style='width:100%;float:left;margin-left:5%;color:black'>Short Description:</label> <input type='text' id='anSubTitle' placeholder='Short Description / Sub Title' style='width:100%;width:90%;margin-left:5%;background:white;border:1px solid gray;text-align:left'> <label style='width:100%;float:left;margin-left:5%;color:black'>Description:</label> <textarea id='ahDescription' rows="10" style='height:150px;width:90%;margin-left:5%;background:white;border:1px solid gray;'></textarea><br> <label style='width:30%;float:left;margin-left:5%;color:black;margin-right:50px;margin-top:20px;'>Short Descrition:</label> <label style='width:30%;float:left;margin-left:5%;color:black;margin-top:20px;'>Short Descrition:</label> <input type='date' id='startDate' style='width:30%;float:left;margin-right:50px;margin-left:5%;background:white;border:1px solid gray;text-align:left'> <input type='date' id='endDate' style='width:30%;float:left;margin-right:50px; margin-left:5%;background:white;border:1px solid gray;text-align:left'> <button id="saveAnnountment" style="float:right;top:30px;width:40%;height:40px;padding:5px;font-family:Arial;font-size:14px;margin-right:5%;margin-top:50px">SAVE RECORD</button> </div> </div> <!--===================================================== --> <!--===================================================== --> <div class="formSearch" style="width:40%;float:left;text-align:center"> <p class="menuTitle" style="border-radius:20px;float:right;width:100%;padding:5px;height:40px;background:transparent;border:0px solid white;"> <button id='addNewRecord' onclick="showaddNewRecordForm();" style="cursor:pointer;border-radius:10px; border:0px solid white;display:block;margin:0px;width:150px;padding:10px;height:40px;font-family:Calibri;font-size:16px;float:left;border-left:1px solid gray;background:transparent;cursor:pointerd">➕ NEW RECORD</button> </div> <div class="formSearch" style="width:40%;float:right;text-align:center"><p class="menuTitle" style="border-radius:20px;float:right;width:100%;padding:5px;height:40px">☸ NEWS & UPDATES</p></div> <div id="announcementTable" style="float:left;width:100%;padding:0px;border-top:0px solid orange;border-bottom:0px solid orange;margin-top:0px;height:550px;;min-height:400px;overflow:auto"> <?php echo "<table>"; echo "<thead>"; echo "<th style='width:5%;border:0px solid white'>NO.</th>"; echo "<th style='width:10%;border:0px solid white'>TITLE.</th>"; echo "<th style='width:25%;border:0px solid white'>SUB-TITLE</th>"; echo "<th style='width:50%;border:0px solid white'>DESCRIPTOIN</th>"; echo "<th style='width:5%;border:0px solid white'>START DATE</th>"; echo "<th style='width:5%;border:0px solid white'>END DATE</th>"; echo "</thead>"; $getNews = mysql_query("SELECT * FROM `ahg_announcement` WHERE `end_date`> '$myDate' ORDER BY `end_date` DESC"); while($row=mysql_fetch_array($getNews)){ ?><tr onclick="javascript:showAdminAccess(this);"><?php echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['id'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['title'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['sub_title'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['description'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['start_date'])."</td>"; echo "<td style=';border:0px solid white;cursor:pointer;color:$color'>".strtoupper($row['end_date'])."</td>"; echo"</td>"; echo "</tr>"; $compRate=0; } echo "</table>"; ?> </div> <input type="text" id="activeRecord" readonly style="background:#f4fcb6;border:0px solid white;float:left;width:100%;font-family:Calibri;font-size:14px;font-weight:normal;color:black;padding:5px;text-align:left"> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings