BLACKSITE
:
216.73.217.4
:
104.37.75.190 / alpenpass.ca
:
Linux server3.pointsplan.com 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
:
/
home2
/
apca
/
www
/
admin
/
Upload File:
files >> //home2/apca/www/admin/manage-pages.php
<?php session_start(); error_reporting(0); include('includes/config.php'); if(strlen($_SESSION['alogin'])==0) { header('location:index.php'); } else{ if($_POST['submit']=="Update") { $pagetype = $_GET['type']; $metaTitle = $_POST['metaTitle']; $metaDescription = $_POST['metaDescription']; $details = $_POST['pgedetails']; $sql = "UPDATE tblpages SET metaTitle = :metaTitle, metaDescription = :metaDescription, detail = :detail WHERE type = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':metaTitle', $metaTitle, PDO::PARAM_STR); $query->bindParam(':metaDescription', $metaDescription, PDO::PARAM_STR); $query->bindParam(':detail', $details, PDO::PARAM_STR); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $msg = "Page data updated successfully"; } ?> <!doctype html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <meta name="theme-color" content="#3e454c"> <title>Alpenpass Motorcycle Rental Portal | Admin Create Brand</title> <!-- Font awesome --> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- Sandstone Bootstrap CSS --> <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Bootstrap Datatables --> <link rel="stylesheet" href="css/dataTables.bootstrap.min.css"> <!-- Bootstrap social button library --> <link rel="stylesheet" href="css/bootstrap-social.css"> <!-- Bootstrap select --> <link rel="stylesheet" href="css/bootstrap-select.css"> <!-- Bootstrap file input --> <link rel="stylesheet" href="css/fileinput.min.css"> <!-- Awesome Bootstrap checkbox --> <link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css"> <!-- Admin Stye --> <link rel="stylesheet" href="css/style.css"> <script type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <style> .errorWrap { padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #dd3d36; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); } .succWrap{ padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #5cb85c; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); } </style> </head> <body> <?php include('includes/header.php');?> <div class="ts-main-content"> <?php include('includes/leftbar.php');?> <div class="content-wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <h2 class="page-title">Manage Pages </h2> <div class="row"> <div class="col-md-10"> <div class="panel panel-default"> <div class="panel-heading">Form fields</div> <div class="panel-body"> <form method="post" name="chngpwd" class="form-horizontal" onSubmit="return valid();"> <?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php } else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?> <div class="form-group"> <label class="col-sm-4 control-label">select Page</label> <div class="col-sm-8"> <select name="menu1" onChange="MM_jumpMenu('parent',this,0)"> <option value="" selected="selected" class="form-control">***Select One***</option> <option value="manage-pages.php?type=aboutus">About Us</option> <option value="manage-pages.php?type=careers">Careers</option> <option value="manage-pages.php?type=concierge">Concierge</option> <option value="manage-pages.php?type=faqs">FAQs</option> <option value="manage-pages.php?type=banner">Home Page Scrolling Banner</option> <option value="manage-pages.php?type=privacy">Privacy and Policy</option> <option value="manage-pages.php?type=terms">Terms and Conditions</option> <option value="manage-pages.php?type=tours">Tours</option> <option value="manage-pages.php?type=routes">Routes</option> </select> </div> </div> <div class="hr-dashed"></div> <div class="form-group"> <label class="col-sm-4 control-label">selected Page</label> <?php echo $_POST['PageName'];?> <div class="col-sm-8"> <?php switch($_GET['type']) { case "terms" : echo "Terms and Conditions"; break; case "privacy" : echo "Privacy And Policy"; break; case "aboutus" : echo "About US"; break; case "faqs" : echo "FAQs"; break; default : echo ""; break; } $pagetype = $_GET['type']; $sql = "SELECT * FROM tblpages WHERE type = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_ASSOC); // <-- fetch as associative array if ($query->rowCount() > 0) { foreach ($results as $row) { // or access any column, e.g. $row['title'] ?> </div> </div> <div class="form-group"> <label class="col-sm-4 control-label">Page Name</label> <div class="col-sm-8"> <input type="text" class="form-control" name="PageName" style="max-width:97%;" value="<?php echo $row['PageName'];?>" readonly><br> </div> </div> <div class="form-group"> <label class="col-sm-4 control-label">Meta Title</label> <div class="col-sm-8"> <input type="text" class="form-control" name="metaTitle" style="max-width:97%;" value="<?php echo $row['metaTitle'];?>"><br> </div> <div class="form-group"> <label class="col-sm-4 control-label">Meta Description</label> <div class="col-sm-8"> <input type="text" class="form-control" name="metaDescription" style="max-width:95%;" value="<?php echo $row['metaDescription'];?>"><br> </div><br> <label class="col-sm-4 control-label">Page Details </label> <div class="col-sm-8"> <textarea class="form-control" rows="5" cols="50" name="pgedetails" id="pgedetails" placeholder="Package Details" style="min-height: 300px;" required> <?php echo $row['detail'];?> </textarea> <button type="button" onclick="toggleSource()">Toggle HTML View</button> </div> </div> <div class="form-group"> <div class="col-sm-8 col-sm-offset-4"> <button type="submit" name="submit" value="Update" id="submit" class="btn-primary btn">Update</button> </div> </div> </form> <?php } } ?> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- Loading Scripts --> <script src="js/jquery.min.js"></script> <script src="js/bootstrap-select.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/jquery.dataTables.min.js"></script> <script src="js/dataTables.bootstrap.min.js"></script> <script src="js/Chart.min.js"></script> <script src="js/fileinput.js"></script> <script src="js/chartData.js"></script> <script src="js/main.js"></script> <?php /** <script type="text/javascript" src="/admin/js/NicEdit-master/nicEdit.js"></script> <script type="text/javascript"> bkLib.onDomLoaded(function() { new nicEditor({ iconsPath: '/admin/js/NicEdit-master/nicEditorIcons.gif', buttonList: ['bold', 'italic', 'underline', 'strikethrough', 'ol', 'ul', 'fontSize', 'fontFamily', 'xhtml'] }).panelInstance('pgedetails'); }); </script> */ ?> <script type="text/javascript" src="nicEdit.js"></script> <script> var isSource = false; var editorInstance; bkLib.onDomLoaded(function() { editorInstance = new nicEditor({ fullPanel: true, iconsPath: 'nicEditorIcons.gif', buttonList: ['bold','italic','underline','strikethrough','ol','ul','fontSize','fontFamily', 'xhtml'] }).panelInstance('pgedetails'); }); function toggleSource() { var textarea = document.getElementById('pgedetails'); if (isSource) { // Restore NicEdit editorInstance.panelInstance('pgedetails'); } else { // Remove NicEdit and show raw HTML editorInstance.removeInstance('pgedetails'); textarea.style.height = textarea.offsetHeight + 'px'; } isSource = !isSource; } </script> </script> </body> </html> <?php } ?>