I want to add a simple form above my right side bar, however the php is miss aligning the form and squashing the form itself picture
I simply want the table to display within the confines of the rest of the side bar, yet I can't seem to figure it out no matter what I do, below is the code for the page, I know there should be a simple solution, but I can't see it.
<body>
<include file="Common:tracking" />
<include file="Common:header" />
<div class="container">
<div class="section">
<div class="wrapshow">
<div class="body">
<div class="article-list">
<ul>
<volist name="blog_list" id="item">
<li>
<div class="head">
<a href="{$item.href}"
class="btn_view_detail"
><img src="{$item.url_picture}" alt="{$item.title}" title="{$item.title}" /></a>
</div><!-- end head -->
<div class="body">
<h3>
<a href="{$item.href}"
class="btn_view_detail" >{$item.title}</a>
</h3>
<div class="tag">
<!--
Blogging
|
Leave a comment
!-->
</div><!-- end tag -->
<div class="con">
{$item.content}
</div><!-- end con -->
<div class="bar">
<a href="{$item.href}"
class="link btn_view_detail">Details<i class="iconfont icon-arrows-right-bottom"></i></a>
<a href="{$item.href}"
class="date btn_view_detail">{$item.dateline_post|date='m/d/Y',###}</a>
</div><!-- end bar -->
</div><!-- end body -->
</li>
</volist>
</ul>
</div><!-- end article-list -->
<div class="paging">
{$page}
</div><!-- end paging -->
</div><!-- end body -->
<div class="site">
<div class="section">
<div class="serve-apply">
<div class="body">
<ul>
<volist name="index_mid4" id="item">
<li>
<h4>{$item.title}</h4>
{$item.content}
<i class="{$item.title_sub}"></i>
</li>
</volist>
</ul>
</div><!-- end body -->
<div class="side shake-an">
<form action="{:U('Contact/quickAdd')}" class="frm_contact">
<input type="hidden" name="type" value="1" />
<h3>Request <em>FREE</em> Trial</h3>
<div class="form-element">
<input type="text" class="form-text blue" name="customer_name" id="username" placeholder="Full Name" />
<label for="username" class="iconfont icon-user"></label>
</div><!-- end form-element -->
<div class="form-element">
<input type="text" class="form-text blue" name="email" id="username" placeholder="Email" />
<label for="username" class="iconfont icon-letter"></label>
</div><!-- end form-element -->
<div class="form-element">
<input type="text" class="form-text blue" name="city" id="username" placeholder="Preferred City" />
<label for="username" class="iconfont icon-map"></label>
</div><!-- end form-element -->
<div class="form-element last">
<button type="submit">Submit</button>
</div><!-- end form-element -->
</form>
</div><!-- end side -->
</div><!-- end serve-apply -->
</div><!-- end section -->
<div class="categories">
<div class="head">
<h3>categories</h3>
</div><!-- end head -->
<div class="body">
<ul>
<volist name="category_list" id="item">
<li><a href="{$item.href}"><em>{$item['title']}</em>
<i class="num"></i></a></li>
</volist>
</ul>
</div><!-- end body -->
</div><!-- end categories -->
<div style="clear:both;" />
Related
First of all, a big thanks for considering the question.
This is more of a ui related query, i have a product management page through which a new product can be added to ecommerce site, the issue i am facing is :
After uploading the file (profilepic) input, the label defined for file name is somehow pushing the button used to upload the pic the pic to the right instead of displaying the name on the right side.
The code is in the middle snippet, scrolling all the way to the bottom of the snippet, you should be able to locate it.
I have attached an image of the same.
Kindly help me with this issue, post file upload, i want the label to come on the right side next to the upload button
<!DOCTYPE html>
<html lang="en">
<body class="dashboard-upload">
<!--================================
START DASHBOARD AREA
=================================-->
<section class="dashboard-area">
<div class="dashboard_menu_area">
<div class="container">
<div class="row">
<div class="col-md-12">
<ul class="dashboard_menu">
<li>
<a href="index.php">
<span class="lnr lnr-home"></span>Sales</a>
</li>
<li>
<a href="">
<span class="lnr lnr-cog"></span>Store</a>
</li>
<li>
<a href="dashboard-setting.html">
<span class="lnr lnr-cog"></span>Landing Page</a>
</li>
<li>
<a href="dashboard-setting.html">
<span class="lnr lnr-cog"></span>Manage Users</a>
</li>
<li>
<a href="dashboard-setting.html">
<span class="lnr lnr-cog"></span>Digital Wallet</a>
</li>
<li class="active">
<a href="">
<span class="lnr lnr-upload"></span>Upload New Item</a>
</li>
<li>
<a href="dashboard-manage-item.html">
<span class="lnr lnr-briefcase"></span>Support Tickets</a>
</li>
</ul>
<!-- end /.dashboard_menu -->
</div>
<!-- end /.col-md-12 -->
</div>
<!-- end /.row -->
</div>
<!-- end /.container -->
</div>
<!-- end /.dashboard_menu_area -->
<div class="dashboard_contents">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="dashboard_title_area">
<div class="pull-left">
<div class="dashboard__title">
<h3>Upload Your Item</h3>
</div>
</div>
</div>
</div>
<!-- end /.col-md-12 -->
</div>
<!-- end /.row -->
<div class="row">
<div class="col-lg-8 col-md-7">
<form action="#">
<div class="upload_modules">
<div class="modules__title">
<h3>Item Name & Description</h3>
</div>
<!-- end /.module_title -->
<div class="modules__content">
<div class="form-group">
<label for="category">Select Category</label>
<div class="select-wrap select-wrap2">
<select name="country" id="category" class="text_field">
<option value="garina">Garina Game Cards</option>
<option value="pubg">Pubg Game Cards</option>
<option value="ps">Play Station</option>
<option value="xbox">Xbox</option>
<option value="netflix">Netflix</option>
<option value="itunes">Itunes</option>
<option value="google">Google Play</option>
</select>
<span class="lnr lnr-chevron-down"></span>
</div>
</div>
<div class="form-group">
<label for="product_name">Product Name
<span>(Max 100 characters)</span>
</label>
<input type="text" id="product_name" class="text_field" placeholder="Enter your product name here...">
</div>
<div class="form-group no-margin">
<p class="label">Short Description</p>
<input type="text" id="product_name" class="text_field" placeholder="Short Description.">
</div>
<div class="form-group no-margin">
<p class="label">Long Description</p>
<input type="text" id="product_name" class="text_field" placeholder="Long Description">
</div>
<!-- end /.modules__content -->
</div>
<!-- end /.upload_modules -->
<div class="upload_modules module--upload">
<div class="modules__title">
<h3>Image</h3>
</div>
<!-- end /.module_title -->
<div class="modules__content">
<div class="form-group">
<div >
<!-- Image is being uploaded here -->
<div class="custom_upload">
<label for="profilepic">
<input type="file" id="profilepic" name="profilepic" class="files">
<span class="btn btn--round btn--sm">Choose File</span>
</label>
<label for="profilepic"></label>
</div>
<!-- end /.custom_upload -->
<div >
<div >
</div>
</div>
<!-- end /.progress_wrapper -->
</div>
<!-- end /.upload_wrapper -->
</div>
<!-- end /.form-group -->
</div>
<!-- end /.upload_modules -->
</div>
<!-- end /.upload_modules -->
<div class="upload_modules">
<div class="modules__title">
<h3>Others Information</h3>
</div>
<!-- end /.module_title -->
<div class="modules__content">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="dimension">Release Date</label>
<input type="text" id="dimension" class="text_field" placeholder="Date first available" value="<?php $day=date("d"); $month=date("m"); $year=date("Y"); $date="$day/$month/$year"; echo $date;?>">
</div>
<div class="form-group">
<label for="dimension">Updated On</label>
<input type="text" id="dimension" class="text_field" placeholder="Last Updated On"value="<?php $day=date("d"); $month=date("m"); $year=date("Y"); $date="$day/$month/$year"; echo $date;?>">
</div>
</div>
<!-- end /.col-md-6 -->
</div>
<!-- end /.row -->
<!-- end /.col-md-6 -->
</div>
<!-- end /.row -->
</div>
<!-- end /.upload_modules -->
</div>
<!-- end /.upload_modules -->
<div class="upload_modules with--addons">
<div class="modules__title">
<h3>Price</h3><br><br>
<label>For Regular Users</label>
<input type="text" id="rlicense" class="text_field" placeholder="00.00">
<br>
<label>For Premium Users</label>
<input type="text" id="rlicense" class="text_field" placeholder="00.00">
</div>
<!-- end /.module_title -->
<!-- end /.modules__content -->
</div>
<!-- end /.upload_modules -->
<!-- submit button -->
<button type="submit" class="btn btn--round btn--fullwidth btn--lg">Add New Item</button>
</form>
</div>
<!-- end /.col-md-8 -->
<div class="col-lg-4 col-md-5">
<aside class="sidebar upload_sidebar">
<div class="sidebar-card">
<div class="card-title">
<h3>Upload Details</h3>
</div>
<div class="card_content">
<div class="card_info">
<h4>Image Upload</h4>
<p>Please use an imahe of only png/jpg/jpeg format so that nothing in the site breakes.</p>
</div>
<div class="card_info">
<h4>Upload Location</h4>
<p>This product will be available in the store post submission without any delays.</p>
</div>
<div class="card_info">
<h4>Getting Error ?</h4>
<p>Make sure all details are filled, clear your browser cache or try in private mode. If the problem continues, this can be a serious issue in the software kindly connect with the developer as soon as possible at adity#xyberneo.com</p>
</div>
</div>
</div>
<!-- end /.col-md-4 -->
</div>
<!-- end /.row -->
</div>
<!-- end /.container -->
</div>
<!-- end /.dashboard_menu_area -->
</section>
<!--================================
END DASHBOARD AREA
=================================-->
<!--//////////////////// JS GOES HERE ////////////////-->
<!-- inject:js -->
<script src="js/vendor/jquery/jquery-1.12.3.js"></script>
<script src="js/vendor/jquery/popper.min.js"></script>
<script src="js/vendor/jquery/uikit.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/chart.bundle.min.js"></script>
<script src="js/vendor/grid.min.js"></script>
<script src="js/vendor/jquery-ui.min.js"></script>
<script src="js/vendor/jquery.barrating.min.js"></script>
<script src="js/vendor/jquery.countdown.min.js"></script>
<script src="js/vendor/jquery.counterup.min.js"></script>
<script src="js/vendor/jquery.easing1.3.js"></script>
<script src="js/vendor/owl.carousel.min.js"></script>
<script src="js/vendor/slick.min.js"></script>
<script src="js/vendor/tether.min.js"></script>
<script src="js/vendor/trumbowyg.min.js"></script>
<script src="js/vendor/waypoints.min.js"></script>
<script src="js/dashboard.js"></script>
<script src="js/main.js"></script>
<script src="//maps.googleapis.com/maps/api/js?key=AIzaSyBeySPFGz7DIUTrReCRQT6HYaMM0ia0knA"></script>
<script src="js/map.js"></script>
<!-- endinject -->
<script>
var profilePic = document.getElementById('profilepic'); /* finds the input */
function changeLabelText() {
var profilePicValue = profilePic.value; /* gets the filepath and filename from the input */
var fileNameStart = profilePicValue.lastIndexOf('\\'); /* finds the end of the filepath */
profilePicValue = profilePicValue.substr(fileNameStart + 1); /* isolates the filename */
var profilePicLabelText = document.querySelector('label[for="profilepic"]').childNodes[2]; /* finds the label text */
if (profilePicValue !== '') {
profilePicLabelText.textContent = profilePicValue; /* changes the label text */
}
}
profilePic.addEventListener('change',changeLabelText,false); /* runs the function whenever the filename in the input is changed */
</script>
</body>
</html>
Use span tag before input tag
Try this
using this code im not near and expert can you help seems like the php is not beig called and the txt is blank
<form method="POST" class="form-grp clearfix grpelem" id="widgetu164" action="app1.php" <!-- none box -->
<div class="fld-grp clearfix grpelem" id="widgetu171" data-required="true" data-type="email"><!-- none box -->
<span class="fld-input NoWrap actAsDiv clearfix grpelem" id="u174-4"><!-- content --><input class="wrapped-input" type="text" spellcheck="false" id="widgetu171_input" name="Email" tabindex="1"/><label class="wrapped-input fld-prompt" id="widgetu171_prompt" for="widgetu171_input"><span class="actAsPara">Username</span></label></span>
</div>
<div class="clearfix grpelem" id="u175-4"><!-- content -->
<p>Actualizando...</p>
</div>
<div class="clearfix grpelem" id="u165-4"><!-- content -->
<p>Correo inválido</p>
</div>
<div class="clearfix grpelem" id="u176-4"><!-- content -->
<p>Actualizado..!!</p>
</div>
<input name="-" type="submit" class="submit-btn NoWrap grpelem" id="u166-17" tabindex="3" value=""/>
<!-- state-based BG images -->
<div class="fld-grp clearfix grpelem" id="widgetu225" data-required="true"><!-- none box -->
<span class="fld-input NoWrap actAsDiv clearfix grpelem" id="u227-4"><!-- content --><input class="wrapped-input" type="password" spellcheck="false" id="widgetu225_input" name="custom_U225" tabindex="2"/><label class="wrapped-input fld-prompt" id="widgetu225_prompt" for="widgetu225_input" href=""><span class="actAsPara">Contraseña</span></label></span>
</div>
Your <form> Tag doesnt close at the end. Missing > an missing </form>
I have a small three page site where each page is in a div with the data role of "page"
I want the third page to display the results.
Form page div:
<div data-role="header">
<h2>Handle or Knob</h2>
<div data-role="navbar">
<ul>
<li>Home</li>
<li>Test</li>
</ul>
</div><!-- /navbar -->
</div><!-- /header -->
<div role="main" class="ui-content">
<form method="post" action="#page3">
<p>I enjoy the twists and turns in life</p>
<label>
<input name="radio-choice-0" id="radio-choice-0" type="radio" value="agree">Agree
</label>
<label>
<input name="radio-choice-0" id="radio-choice-1" type="radio" value="disagree">Disagree
</label>
<p>Cups are easier to use if they have a handle</p>
<label>
<input name="radio-choice-1" id="radio-choice-2" type="radio" value="agree">Agree
</label>
<label>
<input name="radio-choice-1" id="radio-choice-3" type="radio" value="disagree">Disagree
</label>
<p>Life pulls me in different directions sometimes</p>
<label>
<input name="radio-choice-2" id="radio-choice-4" type="radio" value="agree">Agree
</label>
<label>
<input name="radio-choice-2" id="radio-choice-5" type="radio" value="disagree">Disagree
</label>
<a href="#page3"><input type="submit" value="Results">
</form>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
Results page div:
<div data-role="header">
<h1>Results</h1>
<div data-role="navbar">
<ul>
<li>Home</li>
<li>Test</li>
</ul>
</div><!-- /navbar -->
</div><!-- /header -->
<div role="main" class="ui-content">
<?php
$q1Answer = '';
$q2Answer = '';
$q3Answer = '';
$knobScore = 0;
$handleScore = 0;
$knobResult = '';
$handleResult = '';
$yourResult = '';
if(isset($_POST['submit'])){
$q1Answer = $_POST['radio-choice-0'];
$q2Answer = $_POST['radio-choice-1'];
$q3Answer = $_POST['radio-choice-2'];
echo $q1Answer;
echo $q2Answer;
echo $q3Answer;
}else{
echo "Please complete the form";
}
?>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
It's a work in progress, right now I'm just trying to get the results to load on the results page. Then I can work out the scoring after.
Thank you for your time.
1.) action="#page3" -> If submit should lead back to the same page, just erase the action attribute, if it should lead to another page, put the full name of that file including the suffix in there, for example action="page_3.php" (but certainly not `action="#page3").
2.) Don't try to verify the submit, but the contents of the inputs:
if(isset($_POST['radio-choice-0']) && isset($_POST['radio-choice-1']) and isset($_POST['radio-choice-2'])){
....
}
i'm selecting option while adding,but selected option is not in edit dropdown.What will be the issue?
Edit Appointment.php:
<?php
include_once 'config.php';
$id = $_REQUEST['id'];
$query="SELECT p.*,u.fileno FROM patients AS p,users AS u WHERE p.id_patient='$id' AND p.users_id_user=u.id_user";
$resultPatient=$db->select($query);
if(isset($_POST['requesttype'])&&$_POST['requesttype'] == 'editPatient'){
$updateInfo=array();
$updateInfo['name'] = $_REQUEST['name'];
$updateInfo['email'] = $_REQUEST['email'];
$updateInfo['age'] = $_REQUEST['age'];
/*$updateInfo['age'] = $_REQUEST['age'];
$updateInfo['gender'] = $_REQUEST['gender'];*/
$updateInfo['phone'] = str_replace(array('(',')',' ','-'), array('','','',''),$_REQUEST['phone']);
$updateInfo['date'] = date('d-m-Y', strtotime($_REQUEST['date']));
$updateInfo['time'] = $_REQUEST['time'];
$updateInfo['confirm_status'] = 'c';
$date=date('Y-m-d H:i:s');
$updateInfo['date_updated']=$date;
$updateCondition=" id_patient='".$id."'";
$res=$db->update('patients', $updateInfo,$updateCondition);
$id=$resultPatient[0]['users_id_user'];
$where="t.users_id_user='$id' AND";
$query="SELECT t.device_id,t.platforms_id_platform as id_platform FROM tokens as t WHERE $where t.device_id!=''";
$resultTokens=$db->select($query);
if($resultTokens)
{
include_once 'Gcm.php';
include_once 'Apns.php';
$deviceTokens=array();
$deviceTokens1=array();
$alert='Your appointment is confirmed on '.$updateInfo['date'].' at '.$updateInfo['time'];
foreach($resultTokens as $token)
{
if($token['id_platform']=='1'&&$token['device_id']!='')
$deviceTokens[]=$token['device_id'];
if($token['id_platform']=='2'&&$token['device_id']!='')
$deviceTokens1[]=$token['device_id'];
}
if(count($deviceTokens)>0)
{
$apns=new Apns();
$apns->apnsPush($deviceTokens,$alert);
}
if(count($deviceTokens1)>0)
{
$gcm = new GCM();
$message = array("m" => $alert);
$result = $gcm->send_notification($deviceTokens1,$message);
}
}
header("Location:appointments.php?m=u");
}
$querySlot = "SELECT * FROM slots";
$resultSlot=$db->select($querySlot);
$query="select * from photos where type='service'";
$resultUsers1=$db->select($query);
include_once 'header.php';
?>
<script type="text/javascript" src="js/jquery.timepicker.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery.timepicker.css" />
<script>
$(function() {
$('#basicExample').timepicker();
});
</script>
<!-- Sidebar begins -->
<div id="sidebar">
<!-- Left Main menu begins -->
<?php include_once 'menu.php'; ?>
<!-- Left Main menu ends -->
<!-- Secondary nav -->
<div class="secNav">
<div class="secWrapper">
<!--div class="secTop">
</div-->
<!-- Tabs container -->
<div id="tab-container" class="tab-container">
<div id="general">
<!-- Sidebar big buttons -->
<div id="general" style="display: block;" class="active">
<ul class="subNav">
<li><span class="icos-images2"></span>Add Appointment</li>
<li class="activeli"><span class="icos-images2"></span>View/Edit Appointments</li>
<li><span class="icos-images2"></span>Appointments History</li>
<li><span class="icos-images2"></span>View/Edit Reminder Settings</li>
<li><span class="icos-images2"></span>Add Reminder Settings</li>
<li><span class="icos-images2"></span>View/Edit Medicine Reminder Settings</li>
<li><span class="icos-images2"></span>Add Medicine Reminder Settings</li>
</ul>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- Sidebar ends -->
<!-- Content begins -->
<div id="content">
<div class="contentTop">
<span class="pageTitle"><span class="icon-screen"></span>Edit Appointment</span>
<div class="clear"></div>
</div>
<!-- Breadcrumbs line -->
<div class="breadLine">
<div class="bc">
<ul id="breadcrumbs" class="breadcrumbs">
<li>Dashboard</li>
<li>Appointments</li>
<li class="current">Edit Appointment</li>
</ul>
</div>
</div>
<!-- Main content -->
<div class="wrapper">
<div class="fluid">
<form name="formEditAppointment" id="usualValidate" class="main" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
<div class="widget grid6 chartWrapper" style="width:100%;min-height:550px;">
<div class="whead"><h6>Edit Appointment Information</h6><div class="clear"></div></div>
<div class="formRow">
<div class="grid3"><label>File No:<span class="req">*</span></label></div>
<div class="grid9"><?php echo stripslashes($resultPatient[0]['fileno']);?></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Name:<span class="req">*</span></label></div>
<div class="grid9"><input type="text" class="required" name="name" id="name" value="<?php echo stripslashes($resultPatient[0]['name']);?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Email:</label></div>
<div class="grid9"><input type="text" class="email" name="email" id="email" value="<?php echo stripslashes($resultPatient[0]['email']);?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Age:</label></div>
<div class="grid9"><input type="text" class="required" name="age" id="age" value="<?php echo stripslashes($resultPatient[0]['age']);?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Service:<span class="req">*</span></label></div>
<div class="grid9 searchDrop"><select data-placeholder="select service..." class="select" style="width: 100%" name="id_service">
<?php if($resultUsers1 && count($resultUsers1)>0)
foreach($resultUsers1 as $user)
{?>
<option value="<?php echo $user['id_photo']?>"<?php if($user['id_photo']==$user['title']) { ?> selected="selected" <?php } ?>><?php echo $user['title'];?></option>
<?php }?>
</select></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Phone:</label></div>
<div class="grid9"><input type="text" name="phone" id="phone" value="<?php echo stripslashes($resultPatient[0]['phone']);?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Date:</label></div>
<div class="grid9"><input type="text" class="required datepicker" name="date" id="date" value="<?php echo date('d-m-Y',strtotime($resultPatient[0]['date']));?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Time:</label></div>
<div class="grid9 searchDrop">
<input id="basicExample" type="text" name="time" class="time" value="<?php echo stripslashes($resultPatient[0]['time']);?>" style="width:80px"/>
</div>
<div class="clear"></div>
</div>
<input type="hidden" value="<?php echo $id; ?>" name="id" id="id_patient"/>
<input type="hidden" value="editPatient" name="requesttype"/>
<div class="formRow">
<div class="formSubmit">
<input class="buttonM bRed" id="next1" value="Save" type="submit">
<div class="clear"></div>
</div> <div class="clear"></div>
</div>
<div class="clear"></div></div>
</form>
</div>
</div>
<!-- Main content ends -->
</div>
<!-- Content ends -->
</body>
</html>
Add Appointment.php:
<?php
include_once 'config.php';
if(isset($_POST['requesttype'])&&$_POST['requesttype'] == 'addPatient'){
$insertInfo=array();
$insertInfo['users_id_user'] = $_REQUEST['id_user'];
$insertInfo['name'] = $_REQUEST['name'];
$insertInfo['email'] = $_REQUEST['email'];
$insertInfo['age'] = $_REQUEST['age'];
$insertInfo['gender'] = $_REQUEST['act'];
$insertInfo['service_id']=$_REQUEST['id_service'];
$insertInfo['phone'] = str_replace(array('(',')',' ','-'), array('','','',''),$_REQUEST['phone']);
$insertInfo['date'] = date('d-m-Y', strtotime($_REQUEST['date']));
$insertInfo['time'] = $_REQUEST['time'];
$insertInfo['confirm_status'] = 'c';
$date=date('Y-m-d H:i:s');
$insertInfo['date_created']=$date;
$insertInfo['date_updated']=$date;
$res=$db->insert('patients', $insertInfo);
$id=$_REQUEST['id_user'];
$where="t.users_id_user='$id' AND";
$query="SELECT t.device_id,t.platforms_id_platform as id_platform FROM tokens as t WHERE $where t.device_id!=''";
$resultTokens=$db->select($query);
if($resultTokens)
{
include_once 'Gcm.php';
include_once 'Apns.php';
$deviceTokens=array();
$deviceTokens1=array();
$alert='Your appointment is confirmed on '.$insertInfo['date'].' at '.$insertInfo['time'];
foreach($resultTokens as $token)
{
if($token['id_platform']=='1'&&$token['device_id']!='')
$deviceTokens[]=$token['device_id'];
if($token['id_platform']=='2'&&$token['device_id']!='')
$deviceTokens1[]=$token['device_id'];
}
if(count($deviceTokens)>0)
{
$apns=new Apns();
$apns->apnsPush($deviceTokens,$alert);
}
if(count($deviceTokens1)>0)
{
$gcm = new GCM();
$message = array("m" => $alert);
$result = $gcm->send_notification($deviceTokens1,$message);
}
}
header("Location:appointments.php?m=a");
}
$query="SELECT * FROM users";
$resultUsers=$db->select($query);
//$query="SELECT * FROM services";
$query="select * from photos where type='service'";
$resultUsers1=$db->select($query);
include_once 'header.php';
?>
<script type="text/javascript" src="js/jquery.timepicker.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery.timepicker.css" />
<script>
$(function() {
$('#basicExample').timepicker();
});
</script>
<!-- Sidebar begins -->
<div id="sidebar">
<!-- Left Main menu begins -->
<?php include_once 'menu.php'; ?>
<!-- Left Main menu ends -->
<!-- Secondary nav -->
<div class="secNav">
<div class="secWrapper">
<!--div class="secTop">
</div-->
<!-- Tabs container -->
<div id="tab-container" class="tab-container">
<div id="general">
<!-- Sidebar big buttons -->
<div id="general" style="display: block;" class="active">
<ul class="subNav">
<li class="activeli"><span class="icos-images2"></span>Add Appointment</li>
<li><span class="icos-images2"></span>View/Add Appointments</li>
<li><span class="icos-images2"></span>Appointments History</li>
<li><span class="icos-images2"></span>View/Add Reminder Settings</li>
<li><span class="icos-images2"></span>Add Reminder Settings</li>
<li><span class="icos-images2"></span>View/Add Medicine Reminder Settings</li>
<li><span class="icos-images2"></span>Add Medicine Reminder Settings</li>
</ul>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- Sidebar ends -->
<!-- Content begins -->
<div id="content">
<div class="contentTop">
<span class="pageTitle"><span class="icon-screen"></span>Add Appointment</span>
<div class="clear"></div>
</div>
<!-- Breadcrumbs line -->
<div class="breadLine">
<div class="bc">
<ul id="breadcrumbs" class="breadcrumbs">
<li>Dashboard</li>
<li>Appointments</li>
<li class="current">Add Appointment</li>
</ul>
</div>
</div>
<!-- Main content -->
<div class="wrapper">
<div class="fluid">
<form name="formAddAppointment" id="usualValidate" class="main" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
<div class="widget grid6 chartWrapper" style="width:100%;min-height:680px;">
<div class="whead"><h6>Add Appointment Information</h6><div class="clear"></div></div>
<div class="formRow">
<div class="grid3"><label>File No:<span class="req">*</span></label></div>
<div class="grid9 searchDrop"><select data-placeholder="Choose a File No..." class="select" style="width: 100%" name="id_user">
<option value='0'>All</option>
<?php if($resultUsers && count($resultUsers)>0)
foreach($resultUsers as $user)
{?>
<option value="<?php echo $user['id_user']?>"><?php echo $user['fileno']?></option>
<?php }?>
</select></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Name:<span class="req">*</span></label></div>
<div class="grid9"><input type="text" class="required" name="name" id="name"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Email:</label></div>
<div class="grid9"><input type="text" class="email" name="email" id="email"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Age:</label></div>
<div class="grid9"><input type="text" class="required" name="age" id="age"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Sex:</label></div>
<div class="grid9 check"><label for="solve" class="mr20">Male:</label><input style="margin-top:5px;" type="radio" id="solve" name="act" value="m" class="required"/><label for="solve1" class="mr20">Female:</label><input style="margin-top:5px;" type="radio" id="solve1" name="act" value="f" /></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Service:<span class="req">*</span></label></div>
<div class="grid9 searchDrop"><select data-placeholder="select service..." class="select" style="width: 100%" name="id_service">
<option value='0'>All</option>
<?php if($resultUsers1 && count($resultUsers1)>0)
foreach($resultUsers1 as $user)
{?>
<option value="<?php echo $user['id_photo']?>"><?php echo $user['title']?></option>
<?php }?>
</select></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Phone:</label></div>
<div class="grid9"><input type="text" name="phone" id="phone" /></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Date:</label></div>
<div class="grid9"><input type="text" class="required datepicker" name="date" id="date" value="<?php echo date('d-m-Y',strtotime('now'));?>"/></div>
<div class="clear"></div>
</div>
<div class="formRow">
<div class="grid3"><label>Time:</label></div>
<div class="grid9 searchDrop">
<input id="basicExample" type="text" class="time" style="width:80px" name="time"/>
</div>
<div class="clear"></div>
</div>
<input type="hidden" value="addPatient" name="requesttype"/>
<div class="formRow">
<div class="formSubmit">
<input class="buttonM bRed" id="next1" value="Save" type="submit">
<div class="clear"></div>
</div> <div class="clear"></div>
</div>
<div class="clear"></div></div>
</form>
</div>
</div>
<!-- Main content ends -->
</div>
<!-- Content ends -->
</body>
</html>
Find this code <?php if($user['id_photo']==$user['title']) { ?>. You should check the database value with the option value when you edit. Replace with <?php if($user['id_photo']==$resultPatient[0]['id_photo']) { ?> and check.
I want to install php code with XAMPP. I created new database and called it s13. After that i have pasted my all codes to the folder s13.
this what I actually recieving error
Fatal error: Call to a member function __() on a non-object in C:\xampp\htdocs\s13\content\themes\default\templates_c\90f81337a2395d597b1b2483c3c3bf40f723241a.file.header.tpl.php on line 199
My config php code
<?php
define('DB_NAME', 's13')
;
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');
define('DEBUGGING', true);
?>
and this what i actually recieving error code
<body page="{$page}" ub="{$userArray.Blocked}">
<!-- Common JS -->
<script>var SITE_URL = '{$SITE_URL}/';</script>
<script type="text/javascript" src="{$SITE_URL}/js/core.common.js"></script>
<!-- Common JS -->
{if $userExist}
<!-- Common [User Exist] JS -->
<script type="text/javascript" src="{$SITE_URL}/js/core.common.signedin.js"></script>
<script type="text/javascript" src="{$SITE_URL}/js/core.chat.js"></script>
<!-- Common [User Exist] JS -->
{if $userArray.Verified == "N"}
<!-- Verify Bar -->
<div class="verifyBarHolder">
<div class="verifyBar">
<div class="verifyBarContent">
<div class="right">
<span class="uiButtonText black resendEmail">{$translate->__("Resend Confirmation Email")}</span> · <span class="uiButtonText black changeEmail">{$translate->__("Change Email Address")}</span>
</div>
{$userArray.UserFirstName}, {$translate->__("go to")} <strong>{$userArray.UserEmail}</strong> {$translate->__("to complete the sign-up process")}.
</div>
</div>
</div>
<!-- Verify Bar -->
{/if}
<!-- Header -->
<div class="headerBarHolder">
<div class="headerBar {if $userArray.Verified == "N"}afterVerify{/if}">
<div class="header">
<!-- Logo -->
<div class="logo"><span>{$translate->__("Home")}</span></div>
<!-- Logo -->
<!-- Search -->
<div class="search">
<form id="searchForm" class="relative" action="{$SITE_URL}/search.php" method="get">
<span class="glass"><i></i></span>
<input class="uiInput searchInput" type="text" name="q" value="{$translate->__("Search")}" />
</form>
</div>
<!-- Search -->
<!-- Navigation -->
<div class="navigation">
<ul class="list">
<li class="item" title="{$translate->__("Home")}">
<a class="navApp homeIcon" href="{$SITE_URL}/home.php"></a>
</li>
<li class="item">
<div class="icon relative">
<div class="navApp profileIcon" id="profileIcon"></div>
<!-- Profile Menu -->
<div class="subMenu toRight navigationMenu">
<ul>
<li><a class="menuItem" href="{$SITE_URL}/{$userArray.UserName}">{$translate->__("Profile")}</a></li>
<li><a class="menuItem" href="{$SITE_URL}/settings/">{$translate->__("Settings")}</a></li>
</ul>
</div>
<!-- Profile Menu -->
</div>
</li>
<li class="item">
<div class="icon relative">
<div class="navApp messagesIcon" id="messagesIcon"><span class="counter hidden" id="msgCounter"></span></div>
<!-- Messages Menu -->
<div class="subMenu toRight navigationMenu">
<ul class="navMenu" id="liveMessages">
<li>
<div class="navMenuTitle">
<div class="right">
{$translate->__("See All")}
</div>
<strong>{$translate->__("Messages")}</strong>
</div>
</li>
</ul>
</div>
<!-- Messages Menu -->
</div>
</li>
<li class="item">
<div class="icon relative">
<div class="navApp notificationsIcon" id="notificationsIcon"><span class="counter hidden" id="notifiCounter"></span></div>
<!-- Notifications Menu -->
<div class="subMenu toRight navigationMenu">
<ul class="navMenu" id="liveNotifications">
<li>
<div class="navMenuTitle">
<div class="right">
{$translate->__("See All")}
</div>
<strong>{$translate->__("Notifications")}</strong>
</div>
</li>
</ul>
</div>
<!-- Notifications Menu -->
</div>
</li>
</ul>
</div>
<!-- Navigation -->
<!-- Sign Out -->
<div class="signOut">
<a class="navApp signoutIcon right" href="{$SITE_URL}/signout/" title="{$translate->__("Log Out")}"></a>
</div>
<!-- Sign Out -->
</div>
</div>
</div>
<!-- Header -->
{else}
<!-- Common [User Non-Exist] JS -->
<script type="text/javascript" src="{$SITE_URL}/js/core.common.unsignedin.js"></script>
<!-- Common [User Non-Exist] JS -->
<!-- Header -->
<div class="headerBarHolder userNonExist">
<div class="headerBar userNonExist">
<div class="header">
<!-- Logo -->
<div class="logo userNonExist"><span>{$translate->__("Home")}</span></div>
<!-- Logo -->
<!-- Search -->
<div class="search userNonExist">
<form id="searchForm" class="relative" action="{$SITE_URL}/search.php" method="get">
<span class="glass"><i></i></span>
<input class="uiInput searchInput" type="text" name="q" value="{$translate->__("Search")}" />
</form>
</div>
<!-- Search -->
{if $page != "signin"}
<!-- Sign In -->
<div class="signIn">
<div class="relative">
<span>{$translate->__("Have an account?")}<a class="signInBox ml5" href="{$SITE_URL}/signin/"><span>{$translate->__("Sign in")}</span></a></span>
<div id="signInMenu" class="signInMenu">
<form action="{$SITE_URL}/signin/" method="post">
<div class="inline mb10 pt10 pb10" style="width: 210px; border-bottom: 1px solid #333333;">
<div class="left pt5 mr10">
<span>{$translate->__("Sign in with")}</span>
</div>
<div class="left">
<a class="connect-facebook-vsmall" title="{$translate->__("Sign in with")} Facebook" href="{$SITE_URL}/connect/facebook/"></a> <a class="connect-twitter-vsmall" title="{$translate->__("Sign in with")} Twitter" href="{$SITE_URL}/connect/twitter/"></a>
</div>
</div>
<p class="mb10">
<label class="inputLabel" for="username_email">{$translate->__("Username or email")}:</label>
<input type="text" name="username_email" tabindex="1" />
</p>
<p class="mb10">
<label class="inputLabel" for="email">{$translate->__("Password")}:</label>
<input type="password" name="password" tabindex="2" />
</p>
<p class="mb10 pb10" style="border-bottom: 1px solid #333333;">
<input type="submit" name="submit" value="{$translate->__("Sign in")}" class="uiButton pr10 pl10" tabindex="4" />
<input type="checkbox" id="remember" name="remember" value="yes" tabindex="3"/>
<label for="remember">{$translate->__("Remember me")}</label>
</p>
<p class="mb5">{$translate->__("Forgot your password?")}</p>
<p>{$translate->__("Create a new account")}</p>
</form>
</div>
</div>
</div>
<!-- Sign In -->
{/if}
</div>
</div>
</div>
<!-- Header -->
{/if}
The error means, that at least one of variables assigned to Smarty is not an object for example maybe $translate is not an object. It is not connected directly to Database
Of course database has nothing in common with folders, so I have no idea why you wrote that you created database s13 and put all your data to s13 folder. Database and foldername where you have files on your server can be different.