code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php class DBConfig { protected static $db_host = "localhost"; protected static $db_username = "root"; protected static $db_password = ""; protected static $db_dbname = "0admin"; //protected static $db_host = "localhost"; //protected static $db_username = "diegolaprida_ujs"; //protected static $db_...
PHP
<?php // Tipo accidente $categoriasList = array(); $categoriasList[] = array("key" => "DEPORTE", "value" => "Deporte", "color" => "#1C7682"); $categoriasList[] = array("key" => "POLITICA", "value" => "Politica", "color" => "#6A88A3"); $categoriasList[] = array("key" => "SOCIEDAD", "value" => "Sociedad", "color" ...
PHP
<?php require_once('conf/DBConfig.php'); class DBConnection extends DBConfig{ private static $instance; private function __construct(){ self::$instance = mysql_connect(parent::$db_host, parent::$db_username, parent::$db_password) or DIE('Error en la conexion'); $db = mysql_select_db(parent...
PHP
<?php require_once('include/header.php'); require_once('vo/AvisosVO.php'); require_once('search/AvisosSearchCriteria.php'); require_once('logic/AvisosLogic.php'); require('conf/configuration.php'); $logic = new AvisosLogic($_POST); // Ordenamiento if($_GET[order] == "asc") $order= "desc"; else if($_GET[o...
PHP
<?php /** * When a page is called, the page controller is run before any output is made. * The controller's job is to transform the HTTP request into business objects, * then call the approriate logic and prepare the objects used to display the response. * * The page logic performs the following steps: ...
PHP
<?php require_once('include/header.php'); require_once('vo/ClientesVO.php'); require_once('search/ClientesSearchCriteria.php'); require_once('logic/ClientesLogic.php'); require('conf/configuration.php'); $logic = new ClientesLogic($_POST); // Ordenamiento if($_GET[order] == "asc") $order= "desc"; else if...
PHP
<?php /** * When a page is called, the page controller is run before any output is made. * The controller's job is to transform the HTTP request into business objects, * then call the approriate logic and prepare the objects used to display the response. * * The page logic performs the following steps: ...
PHP
<?php class ContactoVO{ private $id = null; private $empresa = null; private $nombre = null; private $direccion = null; private $telefono = null; private $celular = null; private $mail = null; private $web = null; private $borrado = null; public function getId(){ return $this->id; } ...
PHP
<?php class NoticiasVO{ private $id = null; private $titulo = null; private $tags = null; private $resumen = null; private $contenido = null; private $fecha = null; private $categoria = null; private $seccion = null; private $orden = null; private $visitas = null; private $activo = null; p...
PHP
<?php /** * VOs are actually a J2EE pattern. It can easily be implemented in PHP. * A value object corresponds directly to a C struct. * It's a class that contains only member variables and no methods other than convenience * methods (usually none). A VO corresponds to a business object. * A VO typical...
PHP
<?php /** * VOs are actually a J2EE pattern. It can easily be implemented in PHP. * A value object corresponds directly to a C struct. * It's a class that contains only member variables and no methods other than convenience * methods (usually none). A VO corresponds to a business object. * A VO typica...
PHP
<?php class ClientesVO{ private $id = null; private $nombre = null; private $mail = null; private $telefono = null; private $ciudad = null; private $active = null; private $fecha = null; private $borrado = null; public function getId(){ return $this->id; } public function setId($id){ ...
PHP
<?php /** * VOs are actually a J2EE pattern. It can easily be implemented in PHP. * A value object corresponds directly to a C struct. * It's a class that contains only member variables and no methods other than convenience * methods (usually none). A VO corresponds to a business object. * A VO typical...
PHP
<?php class AvisosVO{ private $id = null; private $fechatexto = null; private $fecha = null; private $descripcion = null; public function getId(){ return $this->id; } public function setId($id){ $this->id = $id; } public function getFechatexto(){ return $this->fechatexto; } pub...
PHP
<?php class ContenidoVO{ private $id = null; private $titulo = null; private $texto = null; private $descripcion = null; private $imagen = null; private $borrado = null; public function getId(){ return $this->id; } public function setId($id){ $this->id = $id; } public function ...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); /** * DAO is actually a J2EE pattern. * It can easily be implemented in PHP and helps greatly in separating database access from the rest of your code. * The DAOs form a thin layer. The DAO layer can be 'stacked' which helps for...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); class NoticiasDAO extends DAO { function NoticiasDAO() {} function get($id) { DBConnection::getInstance(); $query = "SELECT * FROM `noticias` where id = $id"; $result = mysql_query($query); $results = $this->getFromResu...
PHP
<?php require_once('dao/UsuarioDAO.php'); require_once('dao/NoticiasDAO.php'); require_once('dao/ContenidoDAO.php'); require_once('dao/ContactoDAO.php'); require_once('dao/ClientesDAO.php'); require_once('dao/AvisosDAO.php'); require_once('dao/ImagenesDAO.php'); class FactoryDAO{ public static functi...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); require_once('search/ImagenesSearchCriteria.php'); /** * DAO is actually a J2EE pattern. * It can easily be implemented in PHP and helps greatly in separating database access from the rest of your code. * The DAOs form a thin l...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); class ClientesDAO extends DAO { function ClientesDAO() {} function get($id){ DBConnection::getInstance(); $query = "SELECT * FROM clientes WHERE id = $id"; $result = mysql_query($query); $results = $this->getFromResul...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); class AvisosDAO extends DAO { function AvisosDAO() { } function get($id){ DBConnection::getInstance(); $query = "SELECT * FROM avisos WHERE id = $id"; $result = mysql_query($query); $results = $this->getFromResult($...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); class ContactoDAO extends DAO { function ContactoDAO() {} function get($id){ DBConnection::getInstance(); $query = "SELECT * FROM contacto WHERE id = $id"; $result = mysql_query($query); $results = $this->getFromResul...
PHP
<?php require_once('conf/DBConnection.php'); require_once('dao/DAO.php'); class ContenidoDAO extends DAO { function ContenidoDAO() { } function get($id){ DBConnection::getInstance(); $query = "SELECT * FROM contenido WHERE id = $id"; $result = mysql_query($query); $results = $this->getFro...
PHP
<?php class FileUtilityPlugin { /** * Obtener la extension de un archivo */ public static function getExtension($fileName) { $pathInfo = pathinfo($fileName); //echo $partes_ruta['dirname'] . "\n"; //echo $partes_ruta['basename'] . "\n"; return $pathInfo['extension']; } /* *...
PHP
<?php class SecurityAccessPlugin { /** * Retorna true si el rol tiene acceso a la pagina que se intenta ver ($scriptPhp) */ public static function hasAccess($menuItems, $scriptPhp, $allAccessPages, $rol) { if ($rol == "0") return true; // chequea que scriptPhp no se encuentre dentro...
PHP
<?php //set_include_path('.:/php/includes:/home/diegolaprida/domains/simesev.com.ar/public_html/admin/core:/usr/lib/php:/usr/local/lib/php'); //require_once 'coreapi/SmartyAPI.php'; require_once 'Zend/Session/Namespace.php'; require_once 'Smarty/Smarty.class.php'; class SmartyPlugin { /** * Retorna...
PHP
<?php require_once 'plugin/SessionPlugin.php'; /** * Para funciones comunes * */ class CommonPlugin { /** * Retorna los parametros recibidos por GET formateados */ public static function getParamsAsString($get) { $params = ""; $keys = array_keys($get); $values = array_values($get); ...
PHP
<?php require_once 'plugin/SessionPlugin.php'; require_once 'plugin/UsersDBPlugin.php'; /** * Loguea un usuario en la DB * */ class LoginPlugin { /** * Chequea que exista el usuario */ public static function existUser($username, $password) { return UsersDBPlugin::existUser($username,...
PHP
<?php require_once 'Zend/Config/Xml.php'; class XMLParserPlugin { /** * Parsea una seccion de un archivo xml * * @param Xml file $xmlfile * @param section $option * @return parsed section from xml file */ public static function parse($xmlfile, $section) { // Parseo XML $parsed = n...
PHP
<?php //set_include_path('.:/php/includes:/home/diegolaprida/domains/simesev.com.ar/public_html/admin/core:/usr/lib/php:/usr/local/lib/php'); require_once 'Zend/Session/Namespace.php'; class SessionPlugin { /** * Retorna la sessionVar del namespace */ public static function getSessionValue($sessionV...
PHP
<?php class AppConfigPlugin { /** * Retorna el objeto Menu con sus propiedades seteadas */ public static function getMenuItems($rol = null) { require('conf/configuration.php'); // si el rol es "administrador" retornar todos los menu items if ($rol == "0" || $rol == null) { return $m...
PHP
<?php /** * thumbnail.inc.php * * @author Ian Selby ([email protected]) * @copyright Copyright 2006 * @version 1.1 (PHP5) * */ /** * PHP class for dynamically resizing, cropping, and rotating images for thumbnail purposes and either displaying them on-the-fly or saving them. * */ class...
PHP
<?php class Utils { // Dada una fecha en php la retorna con formato mysql public static function getDateForDB($fecha) { if ($fecha == "") return ""; $numeros = explode("-",$fecha); return trim($numeros[2])."-".trim($numeros[1])."-".trim($numeros[0]); } public static function getDateForView(...
PHP
<?php include_once('plugin/LoginPlugin.php'); // Valida que exista el usuario if (!LoginPlugin::isLogged()) { include_once('coreapi/SmartyManager.php'); $smarty = SmartyManager::getSmarty(); $smarty->display('login.tpl'); }
PHP
<?php // Include include_once('plugin/SmartyPlugin.php'); include_once('plugin/LoginPlugin.php'); include_once('plugin/AppConfigPlugin.php'); include_once('plugin/SecurityAccessPlugin.php'); include_once('plugin/CommonPlugin.php'); // Para establecer locale en espanol (evita problemas como el formateo de l...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('plugin/UtilsPlugin.php'); require_once('vo/ContenidoVO.php'); require_once('search/ContenidoSearchCriteria.php'); class ContenidoLogic { var $_POST; var $contenidoDAO; function ContenidoLogic($post){ $this->...
PHP
<?php require_once('include/header.php'); require_once('plugin/UtilsPlugin.php'); require_once('dao/FactoryDAO.php'); require_once('vo/ImagenesVO.php'); require_once('search/ImagenesSearchCriteria.php'); /** * Business logic directly reflects the use cases. The business logic deals with VOs, * modifies t...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('plugin/UtilsPlugin.php'); require_once('vo/ClientesVO.php'); require_once('search/ClientesSearchCriteria.php'); class ClientesLogic { var $_POST; var $clientesDAO; function ClientesLogic($post){ $this->$_P...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('plugin/UtilsPlugin.php'); require_once('vo/NoticiasVO.php'); require_once('search/NoticiasSearchCriteria.php'); class NoticiasLogic { var $_POST; var $noticiasDAO; function NoticiasLogic($post){ $this->$_POS...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('plugin/UtilsPlugin.php'); require_once('vo/ContactoVO.php'); require_once('search/ContactoSearchCriteria.php'); class ContactoLogic { var $_POST; var $contactoDAO; function ContactoLogic($post){ $this->$_P...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('vo/UsuarioVO.php'); require_once('search/UsuarioSearchCriteria.php'); /** * Business logic directly reflects the use cases. The business logic deals with VOs, * modifies them according to the business requirements an...
PHP
<?php require_once('include/header.php'); require_once('dao/FactoryDAO.php'); require_once('plugin/UtilsPlugin.php'); require_once('vo/AvisosVO.php'); require_once('search/AvisosSearchCriteria.php'); class AvisosLogic { var $_POST; var $avisosDAO; function AvisosLogic($post){ $this->$_POST = $pos...
PHP
<?php require_once('include/header.php'); require_once('vo/ContactoVO.php'); require_once('search/ContactoSearchCriteria.php'); require_once('logic/ContactoLogic.php'); require('conf/configuration.php'); $logic = new ContactoLogic($_POST); // Ordenamiento if($_GET[order] == "asc") $order= "desc"; else if...
PHP
<?php /** * When a page is called, the page controller is run before any output is made. * The controller's job is to transform the HTTP request into business objects, * then call the approriate logic and prepare the objects used to display the response. * * The page logic performs the following steps: ...
PHP
<?php // Include include_once('plugin/LoginPlugin.php'); include_once('plugin/SmartyPlugin.php'); include_once('plugin/AppConfigPlugin.php'); include_once('plugin/CommonPlugin.php'); // Ejecutar la accion if (isset($_GET[action])) { require_once($_GET[action].".php"); } // Chequea si el usuario ya es...
PHP
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Category Management</title> <link href="css/style.css" rel="stylesheet"> </head> <body> <?php require_once dirname(__FILE__) . '/dao_category.php'; $dao_category = new dao_category(); //Load ...
PHP
<?php require_once dirname(__FILE__) . '/config.php'; class db_connection { public function open_connect() { $config = new config(); $db_host = $config->get_db_host(); $db_user = $config->get_db_user(); $db_pass = $config->get_db_pass(); $db_name = $config->get_...
PHP
<?php require_once dirname(__FILE__) . '/db_connection.php'; class dao_category { /** * * @return array of all category */ public function get_all() { $db = new db_connection(); $con = $db->open_connect(); $query = "SELECT * FROM tbl_category"; ...
PHP
<?php class config { private $db_name = '1191_category_management'; private $db_host = 'localhost'; private $db_user = 'root'; private $db_pass = ''; public function get_db_name() { return $this->db_name; } public function get_db_host() { return $this->db_ho...
PHP
<?php get_header(); ?> <a name="pagetop" id="pagetop"></a> <div id="wrapper"> <!-- コンテンツ START --> <div id="main" class="top_main clearfix"> <!-- コンテンツ START --> <div class="top_img"> <h1><img src="<?php bloginfo('template_url'); ?>/images/front/img_h1.png" alt="梨衣名" width="152" height="80" title="梨...
PHP
<?php define("PACKAGE_ROOT", dirname(__FILE__)); include_once PACKAGE_ROOT.'/conf/facebook_const.php'; include_once PACKAGE_ROOT.'/lib/mastercontrol.php'; //+++++++++++++++++++++++++++++++++++++++++ //カスタムヘッダー include_once 'lib/func_header.php'; include_once 'lib/func_footer.php'; include_once 'lib/layout/func.php'...
PHP
<?php $template_type = get_post_type(get_the_ID()); include 'custom_' . $template_type . '.php'; ?>
PHP
<?php /* Template Name: Event */ ?> <?php get_header(); ?> <a name="pagetop" id="pagetop"></a> <div id="wrapper"> <div id="google_translate_element" style="float:right"></div> <!-- ヘッダー START --> <div id="header"> <h1><a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/front/i...
PHP
<?php /* Template Name: Blog */ get_header(); ?> <div id="wrapper"> <a name="pagetop" id="pagetop"></a> <?php run_layout(); ?> <?php get_footer(); ?>
PHP
<?php /* Template Name: osusume */ get_header(); $template_url = get_bloginfo('template_url'); $site_name = get_bloginfo('name'); $is_single = false; print <<<META_HEADER <script type="text/javascript" src="$template_url/js/prototype.js"></script> <script type="text/javascript" src="$template_url/js/scriptaculou...
PHP
<?php get_header(); ?> <?php get_footer(); ?>
PHP
<?php get_header(); ?> <?php get_footer(); ?>
PHP
<?php /* Template Name: Info */ get_header(); ?> <div id="wrapper"> <a name="pagetop" id="pagetop"></a> <?php run_layout(); ?> <?php get_footer(); ?>
PHP
<!-- Pagetop START --> <div class="pagetop"> <p><a href="#pagetop">▲Page Topに戻る</a></p> </div> <!-- //Pagetop END// --> <!-- フッター START --> <div id="footer"> <p>Copyright&copy; LesPros Entertainment Co., Ltd. All rights reserved.</p> </div> <!-- //フッター END// --> <div> ...
PHP
<?php $q = get_posts('post_type=mastercontrol&posts_per_page=1'); $qq = get_post_custom_values('appid', $q[0]->ID); if($qq[0] == ""){$APP_ID = "";}else{$APP_ID = $qq[0];} define("APP_ID", $APP_ID); $qq = get_post_custom_values('appsecret', $q[0]->ID); if($qq[0] == ""){$SECRET_KEY = "";}else{$SECRET_KEY = $qq...
PHP
<?php loadIframeFB(); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xml:lang="ja" lang="ja"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> ...
PHP
<?php /* Template Name: Profile */ ?> <?php get_header(); ?> <a name="pagetop" id="pagetop"></a> <div id="wrapper"> <div id="google_translate_element" style="float:right"></div> <!-- ヘッダー START --> <div id="header"> <h1><a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/fron...
PHP
<?php get_header(); ?> <a name="pagetop" id="pagetop"></a> <div id="wrapper"> <!-- コンテンツ START --> <div id="main" class="top_main clearfix"> <!-- コンテンツ START --> <div class="top_img"> <h1><img src="<?php bloginfo('template_url'); ?>/images/front/img_h1.png" alt="梨衣名" width="152" height="80" title="梨衣名" /></h...
PHP
<?php function footer_html(){ $likeCount = facebook_likeCount("http://www.facebook.com/stockstyle"); print <<<FOOTER_STYLE <div id="powerd"> Powerd by&nbsp;<a href="https://www.facebook.com/stockstyle">STOCK STYLE</a> <span class="likeCountArrow"><span>$likeCount</span></span> </div> FOOTER_STYLE; } add_action(...
PHP
<?php // プラグイン //remove_action( 'wp_head', 'wordbooker_header' ); remove_action( 'wp_head', 'wpogp_auto_include' ); remove_action( 'wp_head', 'wp_page_numbers_stylesheet' ); remove_action( 'wp_head', 'widget_akismet_style' ); remove_action( 'wp_head', 'feed_links' ); // システム remove_action( 'wp_head', 'feed_links'); re...
PHP
<?php // FacebookPageにリダイレクト function redirectFB() { if($_GET["app_data"] != "" && !ereg("facebook",$_SERVER['HTTP_USER_AGENT'])){ echo '<meta http-equiv="refresh" CONTENT="0;URL=' . FB_URL . "&app_data=" . $_GET["app_data"] . '" />'; exit; } } function loadIframeFB(){ if ( isset($_R...
PHP
<?php function header_googleplus(){ print <<<GOOGLE_PLUS <script type="text/javascript"> window.___gcfg = {lang: 'ja'}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElements...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ //カスタムメニュー register_nav_menus(array( 'navbar' => 'ナビゲーションバー', 'sidebar' => 'サイドバー' )); function facebook_js(){ print <<<FACEBOOK_HEADER <script type="text/javascript" src="https://connect.facebook.net/en_US/all.js"></script> <script type="text/javascri...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト Info 情報 register_post_type( 'Info', array( 'label' => 'Infomation', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/event.png', ...
PHP
<?php /* //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト photogallery register_post_type( 'photogallery', array( 'label' => 'フォトギャラリー', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/medi...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト Profile register_post_type( 'profile', array( 'label' => 'Profile', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/profile.png', ...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト ITUNES register_post_type( 'itunes', array( 'label' => 'iTunes', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/itune.png', 's...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト BLOG register_post_type( 'blog', array( 'label' => 'ブログ', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/blog.png', 'supports'...
PHP
<?php register_post_type( 'gallery', array( 'label' => 'Gallery', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/media.png', 'supports' => array( 'title', 'editor'...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト PV (YouTube) register_post_type( 'pv', array( 'label' => 'PV', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/youtube.png', '...
PHP
<?php register_post_type( 'goods_book', array( 'label' => 'Goods_BOOK', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/goods.png', 'supports' => array( 'title', 'c...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト Twitter register_post_type( 'twitter', array( 'label' => 'Twitter', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/twitter.png', ...
PHP
<?php //+++++++++++++++++++++++++++++++++++++++++ // カスタムポスト デザイン register_post_type( 'design', array( 'label' => 'デザイン', 'hierarchical' => false, 'public' => true, 'query_var' => false, 'menu_icon' => get_bloginfo('template_url').'/images/tool/master_control_logo.png', ...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Sign up &middot; Online Shopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link hre...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<?php $id= $_POST['id']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $username = $_POST['username']; $password = $_POST['password']; $con = mysql_connect("localhost", "root", ""); mysql_select_db("onlineshopping"); $sql = "INSE...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<?php $page ='home'; ?> <div class="navbar"> <div class="navbar-inner"> <ul class="nav"> <li class="<?php if ($page='home') "active";?>" > <a href="index.php">Home</a></li> <li><a href="womens.php">Womens</a></li> <li><a href="mens.php">Mens</a></li> <li><a href="kids.php">Kids</a></li> <li>...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/bootstrap.css" ...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>OnlineShopping</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="../assets/css/...
PHP
<?php include "includes/common.php"; //Step - 3 (SQL / Get result) $sql = "SELECT * from `settings`"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-str...
PHP
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>PHP Course</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="assets/css/bootstrap.css" rel...
PHP
<?php if (!$_SESSION['login']) exit; ?> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon...
PHP
<?php include "../includes/common.php"; $id = $_GET['id']; if ($id) { $sql = "select * from `gallery` where `id`=$id;"; $r = mysql_query($sql); $pic = mysql_fetch_assoc($r); $picture_from_db = $pic['path']; if ($picture_from_db!= "") { $filename = "../../uploads/" . $pictur...
PHP
<?php //Step - 1 (Connection) $con = mysql_connect("localhost", "root", ""); //Step - 2 (Database) mysql_select_db("test"); //Step - 3 (SQL / Get result) $id = $_GET['id']; $sql = "delete from `users` where `id` = $id"; mysql_query($sql); //echo "user id ". $_...
PHP
<?php //Step - 1 (Connection) $con = mysql_connect("localhost", "root", ""); //Step - 2 (Database) mysql_select_db("test"); //Step - 3 (SQL / Get result) $sql = ""; //Step - 4 (Grab / Process / Execute query) $sql = "delete from `users` where `id` = $id"; mysql_...
PHP