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
Related
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 am trying to create a simple blog entry form where a user enters the title, blog entry and submits it. The form should then insert the 'blog entry' into MYSQL using the insert query.
I am getting NO errors.
When I submit form nothing is changed, the database has no new entry.
<?php
session_start();
date_default_timezone_set('America/Mexico_City');
if (!isset($_SESSION['usuario_usuario'])) {
header("Location: login");
} else {
include_once 'config.php';
$guardar_post = $conn -> prepare("INSERT into entries (post_title, post_content, created_at, updated_at) VALUES (:titulo_post, :contenido_post, :created_at, :updated_at);");
$guardar_post ->bindParam(":titulo_post", $titulo_post);
$guardar_post ->bindParam(":contenido_post", $contenido_post);
$guardar_post ->bindParam(":created_at", $created_at);
$guardar_post ->bindParam(":updated_at", $updated_at);
if (isset($_POST['enviar'])) {
$titulo_post = $_POST['titulo'];
$contenido_post = $_POST['editor1'];
$created_at = date("Y-m-d H:i:s");
$updated_at = date("Y-m-d H:i:s");
$guardar_post -> execute();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Bootstrap Admin Theme</title>
<!-- Bootstrap Core CSS -->
<link href=" bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href=" bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href=" dist/css/sb-admin-2.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href=" bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- CKEditor -->
<script src="ckeditor/ckeditor.js"></script>
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<?php include_once 'nav.php'; ?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Nuevo Post</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Redactar nuevo post
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-10">
<form role="form">
<div class="form-group">
<label>Título</label>
<input class="form-control" name="titulo">
<p class="help-block">Entre el titulo del post.</p>
</div>
</form>
</div>
<div class="col-lg-10">
<div class="form-group">
<label>Text area</label>
<textarea name="editor1" id="editor1" class="form-control" rows="15"></textarea>
</div>
</div>
</div>
<div class="row">
<div class=" col-lg-5">
<p>
<button type="button" class="btn btn-outline btn-success" name="enviar">Enviar</button>
<button type="button" class="btn btn-outline btn-danger">Borrar</button>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src=" bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src=" bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src=" bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src=" dist/js/sb-admin-2.js"></script>
<!-- Replace the <textarea id="editor1"> with a CKEditor -->
<script>CKEDITOR.replace( 'editor1' );</script>
the config.php file is:
<?php
$base = "mysql:host=localhost;dbname=bworld";
try {
$conn = new PDO($base, 'diego', 'diego');
} catch (PDOException $e) { echo $e; }
Does anybody know what I'm doing wrong. I am new to PHP and I have no idea how to debug a problem when I'm getting no errors!
You have to put all your fields inside <form> tag including your submit button
I also added type="submit" to your Enviar button
<div id="wrapper">
<!-- Navigation -->
<?php include_once 'nav.php'; ?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Nuevo Post</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Redactar nuevo post
</div>
<div class="panel-body">
<form role="form">
<div class="row">
<div class="col-lg-10">
<div class="form-group">
<label>Título</label>
<input class="form-control" name="titulo">
<p class="help-block">Entre el titulo del post.</p>
</div>
</div>
<div class="col-lg-10">
<div class="form-group">
<label>Text area</label>
<textarea name="editor1" id="editor1" class="form-control" rows="15"></textarea>
</div>
</div>
</div>
<div class="row">
<div class=" col-lg-5">
<p>
<button type="button" class="btn btn-outline btn-success" name="enviar" type="submit">Enviar</button>
<button type="button" class="btn btn-outline btn-danger">Borrar</button>
</p>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
It was resolved with the method = post on the <form> tag
So, sef4eg was kind of right.
Here is the code:
<div class="panel-body">
<form role="form" action="" method="post">
<div class="row">
<div class="col-lg-10">
<div class="form-group">
<label for="titulo">Título</label>
<input id="titulo" class="form-control" name="titulo">
<p class="help-block">Entre el titulo del post.</p>
</div>
</div>
<div class="col-lg-10">
<div class="form-group">
<label for="editor1">Text area</label>
<textarea name="editor1" id="editor1" class="form-control" rows="15"></textarea>
</div>
</div>
</div>
<div class="row">
<div class=" col-lg-5">
<p>
<button type="submit" class="btn btn-success btn-success" name="enviar">Enviar</button>
<button type="button" class="btn btn-outline btn-danger">Borrar</button>
</p>
</div>
</div>
</form>
</div>
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;" />
I'm making a website with a guest and admin side to it. In the admin side there are additional page's in which you can fill in form's which contain text and titles for certain div's in other page's.
I was wondering how can I make it so that when you fill in these forms and press save, the variables will be used in the other page where you can actually see the title and text as html. The text and title have to be visible for everyone that visits the page and have to stay there until there are changes made.
I have code yet, since i don't know how to start, I do have the interfaces, you can see the HTML down here.
Interface Input:
<div class="panel-box">
<div class="titles">
<h4>Voeg vacatures toe</h4>
</div>
<form class="form-theme">
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label for="name">Titel vacature</label>
<input type="text" required="required" value="" maxlength="100" class="form-control" name="Name" id="name">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<label for="description">Beschrijving</label>
<textarea rows="10" class="form-control" name="description" id="description" required="required" ></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input type="submit" value="Save" class="btn btn-lg btn-primary">
</div>
</div>
</form>
</div>
Output:
<!-- Content Central -->
<div class="container padding-top">
<div class="row">
<!-- content Column Left -->
<div class="col-md-12">
<!-- Experts -->
<div class="panel-box">
<div class="titles">
<h4> <!-- This is where the title should be --> </h4>
</div>
<div class="row">
<ul class="events-carousel events-no-carousel">
<!-- Item blog post -->
<li class="col-xs-6 col-sm-6 col-md-4">
<div class="info-post">
<h4>Vacature naam</h4>
<p><!-- This is where the text should be -->
<a class="btn btn-primary pull-right" href="{{ path('static_page', {template:'club/vacancy'}) }}">Bekijken</a></p>
</div>
</li>
<!-- End Item blog post -->
</ul>
<!-- End blog post-->
</div>
</div>
<!-- End Experts -->
</div>
</div>
</div>
<!-- End Testimonials -->
<!-- End Section Area - Content Central -->
Generally, you should store your form data in database, and then retrieve it from database to render on the other page.
So the PHP script on the page with form should save your form data, when other script on page where you want to show your data should take it from database.
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.