code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php /** This file is part of KCFinder project * * @desc Default English localization * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://op...
PHP
<?php /** Hebrew localization file for KCFinder * Sig: 1f4f9aee887c97f618c19a82040a4dad */ $lang = array( '_locale' => "he_IL.UTF-8", // UNIX localization code '_charset' => "utf-8", // Browser charset // Date time formats. See http://www.php.net/manual/en/function.strftime.php '_dateTime...
PHP
<?php /** This file is part of KCFinder project * * @desc CMS integration code: Drupal * @package KCFinder * @version 3.10 * @author Dany Alejandro Cabrera <otello2040@gmail.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license h...
PHP
<?php namespace kcfinder\cms; /** This file is part of KCFinder project * * @desc CMS integration code: BolmerCMS * @package KCFinder * @version 3.10 * @author Borisov Evgeniy <modx@agel-nash.ru> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @...
PHP
<?php /** This file is part of KCFinder project * * @desc Join all CSS files from current directory * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @lice...
PHP
<?php /** This file is part of KCFinder project * * @desc Browser calling script * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensour...
PHP
<?php /** This file is part of KCFinder project * * @desc Path helper class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.or...
PHP
<?php /** This file is part of KCFinder project * * @desc Abstract image driver class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://ope...
PHP
<?php namespace kcfinder; /** * FastImage - Because sometimes you just want the size! * Based on the Ruby Implementation by Steven Sykes (https://github.com/sdsykes/fastimage) * * Copyright (c) 2012 Tom Moor * Tom Moor, http://tommoor.com * * MIT Licensed * @version 0.1 */ class fastImage { private $strpo...
PHP
<?php /** This file is part of KCFinder project * * @desc GraphicsMagick image driver class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http...
PHP
<?php /** This file is part of KCFinder project * * @desc ImageMagick image driver class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://...
PHP
<?php /** This file is part of KCFinder project * * @desc Directory helper class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensour...
PHP
<?php /** This file is part of KCFinder project. The class are taken from * http://www.php.net/manual/en/function.ziparchive-addemptydir.php * * @desc Directory to ZIP file archivator * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KC...
PHP
<?php /** This file is part of KCFinder project * * @desc File helper class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensource.or...
PHP
<?php /** This file is part of KCFinder project * * @desc HTTP cache helper class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensou...
PHP
<?php /** This file is part of KCFinder project * * @desc Text processing helper class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://op...
PHP
<?php /** This file is part of KCFinder project * * @desc GD image driver class * @package KCFinder * @version 3.10 * @author Pavel Tzonkov <sunhater@sunhater.com> * @copyright 2010-2014 KCFinder Project * @license http://opensource.org/licenses/GPL-3.0 GPLv3 * @license http://opensourc...
PHP
<!DOCTYPE html> <?php /* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ ?> <html> <head> <meta charset="utf-8"> <title>Sample &mdash; CKEditor</title> <link rel="stylesheet" href="sample.css"> </head> <body> <...
PHP
<?php /* <body><pre> ------------------------------------------------------------------------------------------- CKEditor - Posted Data We are sorry, but your Web server does not support the PHP language used in this script. Please note that CKEditor can be used with any other server-side language than ...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile) */ interface Enterprise_Models_Interface_User { /** * Get role by name * * @param int $name Name of Role ...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile) */ interface Enterprise_Models_Interface_Info { /** * Add new enterprise info * * @param Enterprise_Models...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile) */ interface Enterprise_Models_Interface_Payment { /** * Add new enterprise payment info * * @param Enterp...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Interface_Example(Tenmodule_Models_Interface_Tenfile) */ interface Enterprise_Models_Interface_Enterprise { /** * Add new enterprise * * @param Enterprise_Model...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Dao_Pdo_Mysql_Example(Tenmodule_Models_Dao_Pdo_Mysql_Tenfile) */ class Enterprise_Models_Dao_Pdo_Mysql_User extends Tomato_Model_Dao implements Enterprise_Models_Interface_User...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Dao_Pdo_Mysql_Example(Tenmodule_Models_Dao_Pdo_Mysql_Tenfile) */ class Enterprise_Models_Dao_Pdo_Mysql_Info extends Tomato_Model_Dao implements Enterprise_Models_Interface_Info...
PHP
<?php /** * Tên file mình có thể tự chọn nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Dao_Pdo_Mysql_Example(Tenmodule_Models_Dao_Pdo_Mysql_Tenfile) */ class Enterprise_Models_Dao_Pdo_Mysql_Payment extends Tomato_Model_Dao implements Enterprise_Models_Interface_P...
PHP
<?php /** * Tên file mình có thể tự ch�n nhưng nên đặc theo têm controller sẽ dễ quản lý */ /** * Tên class: Example_Models_Dao_Pdo_Mysql_Example(Tenmodule_Models_Dao_Pdo_Mysql_Tenfile) */ class Enterprise_Models_Dao_Pdo_Mysql_Enterprise extends Tomato_Model_Dao implements Ent...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php /** * Tên class được đặc tên từ tên modules tiếp đến là tên controller: Tenmodule_TencontrollerController */ class Enterprise_EnterpriseController extends Zend_Controller_Action { /** * List enterprise * * @return void */ public function listAction() { $request =...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php class Bizprofile_Widgets_Menu_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = 0; $user_id = 0; $auth = Zend_Auth::getInstance(); $enterprise = null; $conn = Tomato_Db_Connection::factory()->getMasterConnection(); ...
PHP
<?php class Bizprofile_Widgets_Info_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = 0; $user_id = 0; $auth = Zend_Auth::getInstance(); $enterprise = null; $conn = Tomato_Db_Connection::factory()->getMasterConnection(); $lang = Zend_Controller_Front::getIn...
PHP
<?php class Bizprofile_Widgets_Map_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = null; $params = Zend_Controller_Front::getInstance()->getRequest()->getParams(); $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { ...
PHP
<?php class Bizprofile_Widgets_Help_Widget extends Tomato_Widget { protected function _prepareShow() { } protected function _prepareConfig() { } }
PHP
<?php class Bizprofile_Widgets_Partner_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = 0; $user_id = 0; $auth = Zend_Auth::getInstance(); $enterprise = null; $conn = Tomato_Db_Connection::factory()->getMasterConnection(); $lang = Zend_Controller_Front::get...
PHP
<?php class Bizprofile_Widgets_Owner_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = 0; $user_id = 0; $auth = Zend_Auth::getInstance(); $enterprise = null; $conn = Tomato_Db_Connection::factory()->getMasterConnection(); ...
PHP
<?php class Bizprofile_Widgets_Contact_Widget extends Tomato_Widget { protected function _prepareShow() { } protected function _prepareConfig() { } }
PHP
<?php class Bizprofile_Widgets_Profile_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise_id = 0; $user_id = 0; $auth = Zend_Auth::getInstance(); $enterprise = null; $conn = Tomato_Db_Connection::factory()->getMasterConnection(); $params = Zend_Controller_Front::g...
PHP
<?php class Bizprofile_Widgets_News_Widget extends Tomato_Widget { protected function _prepareShow() { $enterprise = null; $params = Zend_Controller_Front::getInstance()->getRequest()->getParams(); $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { ...
PHP
<?php class Bizprofile_Widgets_Partnerlist_Widget extends Tomato_Widget { protected function _prepareShow() { $params = Zend_Controller_Front::getInstance()->getRequest()->getParams(); $purl = $params['module'] . "_" . strtolower($params['controller']) . "_" . str_replace("-","_",$params['action']);...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php interface Bizprofile_Models_Interface_Permission { public function getPermission($enterprise_id); public function add($permission); public function update($permission); public function getRoles(); public function getUserEntity($user_id, $enterprise_id); public function getPermissionBy...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php interface Bizprofile_Models_Interface_Message { public function getById($id); public function add($message); public function update($message); public function find($offset = null, $count = null, $exp = null); public function count($exp); }
PHP
<?php interface Bizprofile_Models_Interface_MessageDetail { public function getById($id); public function add($messageDetail); public function update($messageDetail); public function delete($id); public function find($offset = null, $count = null, $exp = null); public function count($exp);...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php class Bizprofile_Models_Permission extends Tomato_Model_Entity { protected $_properties = array( 'id' => null, 'enterprise_id' => null, 'user_entity' => 1, 'general_info' => '', 'enterprise_info' => '', 'media_permission' => 1, 'blog_permission' ...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receive ...
PHP
<?php class Bizprofile_Models_Dao_Pdo_Mysql_Permission extends Tomato_Model_Dao implements Bizprofile_Models_Interface_Permission { public $_general_info = array( 'contact_email' => 1, 'contact_tel' => 1, 'contact_fax' => 1, 'contact_address' => 1, 'bank_account_vnd' => 1, ...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php class Bizprofile_Models_Dao_Pdo_Mysql_Message extends Tomato_Model_Dao implements Bizprofile_Models_Interface_Message { public function convert($entity) { return new Bizprofile_Models_Message($entity); } public function getById($id) { $row = $this->_conn ->select() ->from(arra...
PHP
<?php class Bizprofile_Models_Dao_Pdo_Mysql_MessageDetail extends Tomato_Model_Dao implements Bizprofile_Models_Interface_MessageDetail { public function convert($entity) { return new Bizprofile_Models_MessageDetail($entity); } public function getById($id) { $row = $this->_conn ->select()...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php /** * TomatoCMS * * LICENSE * * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-2.0.txt * If you did not receiv...
PHP
<?php class Bizprofile_Models_Message extends Tomato_Model_Entity { protected $_properties = array( 'id' => null, 'fromuser_id' => null, 'fromuser_name' => null, 'fromenterprise_id' => null, 'fromenterprise_name' => null, 'title' => null, 'message' => null, 'touserarray' ...
PHP
<?php class Bizprofile_Models_MessageDetail extends Tomato_Model_Entity { protected $_properties = array( 'id' => null, 'messageid' => null, 'user_id' => null, 'enterprise_id' => null, 'messageread' => null, 'parentmessageid' => null ); }
PHP
<?php class Bizprofile_DashboardController extends Zend_Controller_Action { public function init() { } public function indexAction() { $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $user = $auth->getIdentity(); if($user->enterprise){ $this->view->assign('enterprise', ...
PHP
<?php class Bizprofile_AuthController extends Zend_Controller_Action { public function loginAction() { $request = $this->getRequest(); $auth = Zend_Auth::getInstance(); /** * Redirect to dashboard if user has logged in already */ if ($auth->hasIdentity()) { $this->_redirect($this->...
PHP
<?php class Bizprofile_UserController extends Zend_Controller_Action { protected $_general_info = array( 'contact_email' => 1, 'contact_tel' => 1, 'contact_fax' => 1, 'contact_address' => 1, ...
PHP
<?php class Bizprofile_EnterpriseController extends Zend_Controller_Action { public function indexAction() { $request = $this->getRequest(); $enterprise_id = $request->getParam('enterprise_id'); $user_id = 0; $conn = Tomato_Db_Connection::factory()->getMasterConnection();...
PHP
<?php class Bizprofile_MessageController extends Zend_Controller_Action { public function inboxAction() { $auth = Zend_Auth::getInstance(); if (!$auth->hasIdentity()) { $this->_redirect($this->view->serverUrl() . $this->view->url(array(), 'bizprofile_auth_login')); } ...
PHP
<?php class Bizprofile_PartnerController extends Zend_Controller_Action { public function indexAction() { $auth = Zend_Auth::getInstance(); $user = null; if ($auth->hasIdentity()) { $user = $auth->getIdentity(); $this->view->assign('user', $user); } ...
PHP
<?php /** * This plugin stores the current URL in session */ class Tomato_Controller_Plugin_UrlTracker extends Zend_Controller_Plugin_Abstract { /** * Session key which is used to save the URL * @var const */ const SESSION_NS = 'Tomato_Controller_Plugin_UrlTracker'; /** * Store the exclu...
PHP
<?php error_reporting(E_ALL & ~E_NOTICE); ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CMP4 install onlin...
PHP
<?php require_once('thumbnail/image.class.php'); $img = new Zubrag_image; $img->max_x = 100; $img->max_y = 100; $img->GenerateThumbFile($dest, "$thumb_dir/$fileName");
PHP
<?php // REQUIREMENTS: // PHP 4.0.6 and GD 2.0.1 or later // May not work with GIFs if GD2 library installed on your server // does not support GIF functions in full // Parameters: // src - path to source image // dest - path to thumb (where to save it) // x - max width // y - max height // q - quality (app...
PHP
<?php ############################################################### # Thumbnail Image Class for Thumbnail Generator ############################################################### # For updates visit http://www.zubrag.com/scripts/ ############################################################### class Zubrag...
PHP
<?php require_once('../mysql/db.php'); $flag = false; if(isset($_FILES['avatar']['name'])) { pr($_FILES); $errmsg = array(); $mb = 1; $validSize = $mb*1024*1024;//1 MB $fileDetails = pathinfo($_FILES['avatar']['name']); $fileExtn = $fileDetails['extension']; $validExtn = array('jpg','jpeg','png','gif')...
PHP
<?php require_once('../mysql/db.php'); $flag = false; if(isset($_FILES['avatar']['name'])) { pr($_FILES); $errmsg = array(); $mb = 1; $validSize = $mb*1024*1024;//1 MB $fileDetails = pathinfo($_FILES['avatar']['name']); $fileExtn = $fileDetails['extension']; $validExtn = array('jpg','jpeg','png','gif')...
PHP
<?php require_once('../mysql/db.php'); pr($_POST); pr($_FILES); ?> <form action="" enctype="multipart/form-data" method="post"> <input type="file" name="avatar"/> <input type="submit" value="Done!!" /> </form>
PHP
<?php session_start(); ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Author" content="Jos...
PHP
<?php date_default_timezone_set('Asia/Kolkata'); session_start(); $host = 'localhost'; $username = 'root'; $password = ''; $dbname = 'nb158ij'; # Will you like to print debug messages $isDebug = 1; // true / false $logArr = array(); ########### MYSQL CONNECTION ########## mysql_connect($host,$...
PHP
<?php require_once('thumbnail/image.class.php'); $img = new Zubrag_image; $img->max_x = 100; $img->max_y = 100; $img->GenerateThumbFile($dest, "$thumb_dir/$fileName");
PHP
<?php // REQUIREMENTS: // PHP 4.0.6 and GD 2.0.1 or later // May not work with GIFs if GD2 library installed on your server // does not support GIF functions in full // Parameters: // src - path to source image // dest - path to thumb (where to save it) // x - max width // y - max height // q - quality (app...
PHP
<?php ############################################################### # Thumbnail Image Class for Thumbnail Generator ############################################################### # For updates visit http://www.zubrag.com/scripts/ ############################################################### class Zubrag...
PHP
-:RDBMS :- Relational database management system RDBMS follows E.F.CODDS 12 Rules.. To establish Relations * Foreign Key * Primary Key Q.Why need relation between tables ? A.Because of Normalization :) Q. What is Normalization ? A. Distribute Records in several tables to remove "Redundancy" a.k.a "To remove duplica...
PHP
Setting environment for using XAMPP for Windows. cubes@CUBES-PC c:\xampp # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.27 MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights re...
PHP
<?php require_once('./db.php'); //pr($_SESSION['uid']); //pr($_POST['uid']); if(isset($_POST['email']) && !empty($_POST['email']) && ($_SESSION['uid'] == $_POST['uid']) ) { $_SESSION['uid']=''; unset($_POST['uid']); $_POST['added_date'] = date('Y-m-d H:i:s'); $_POST['status'] = '1'; pr($_POST); $qu...
PHP
<?php require_once('./db.php'); $_POST['added_date'] = date('Y-m-d H:i:s'); $_POST['status'] = '1'; pr($_POST); $query = "INSERT INTO `users` SET "; $tmp = ''; foreach ($_POST as $colName => $value) { $tmp .= "`$colName`='$value' ,"; } $query = $query.$tmp; $query = rtrim($query," ,"); print_...
PHP
<?php session_start(); date_default_timezone_set('Asia/Kolkata'); $display_msg = true; /// File upload settings /// $validExtn = array('jpg','jpeg','png','gif'); $mb = 1; $validSize = $mb*1024*1024;//1 MB ///////////////////////////////////////// $hostName = 'localhost'; $username = 'root'; $passwor...
PHP
<?php require_once('./db.php'); pr($_SESSION['secretword']); if(isset($_POST['email']) && !empty($_POST['email'])) { if( ($_SESSION['secretword'] == $_POST['captcha'])) { unset($_POST['captcha']); $_POST['added_date'] = date('Y-m-d H:i:s'); $_POST['status'] = '1'; pr($_POST); $query = "I...
PHP
<?php require_once('./db.php'); //pr(get_defined_vars());exit; // pr($_SESSION['secretword']); if(isset($_POST['email']) && !empty($_POST['email'])) { #################################### $flag = false; # file upload start if(isset($_FILES['avatar']['name']) && ($_SESSION['secretword'] == $_POST['captcha']...
PHP
<?php require_once('../db.php'); if(isset($_GET['mode']) && $_GET['mode'] == 'change_status' ) { $cStatus = $_GET['current_status']; $nStatus = $cStatus==0 ? 1:0; $id = $_GET['id']; $data = array('status'=>$nStatus); $affectedRows = update('users',"`id`='$id'",$data); if($affectedRows == 1){ ...
PHP
<?php require_once('../db.php'); $query = "SELECT * FROM `users`"; $result = mysql_query($query) or die(mysql_error()); $totalUser = mysql_num_rows($result); ?> <p> <em>Total Records </em>:<strong><?=$totalUser?></strong> </p> <table border="1" cellpadding="0" cellspacing="0" width="80%" align="center"> <...
PHP
<?php require_once('../db.php'); $id = isset($_REQUEST['id']) && !empty($_REQUEST['id'])?$_REQUEST['id']:0; if(isset($_POST['email']) && !empty($_POST['email'])) { $_POST = array_map('trim',$_POST); $_POST = array_map('strip_tags',$_POST); $_POST = array_map('mysql_real_escape_string',$_POST); pr($_POST)...
PHP
<?php require_once('../db.php'); if(isset($_GET['mode']) && $_GET['mode'] == 'del' ) { $id = $_GET['id']; $delQuery = "DELETE FROM `users` WHERE `id`='$id'"; print_q($delQuery); mysql_query($delQuery) or die(mysql_error()); if(mysql_affected_rows() == 1){ echo "<h4>Record Deleted su...
PHP
<?php require_once('../db.php'); if(isset($_GET['mode']) && $_GET['mode'] == 'change_status' ) { $cStatus = $_GET['current_status']; $nStatus = $cStatus==0 ? 1:0; $id = $_GET['id']; $updateStatusQuery = "UPDATE `users` SET `status`='$nStatus' WHERE `id`='$id'"; mysql_query($updateSta...
PHP
<?php require_once('../db.php'); if(isset($_GET['mode']) && $_GET['mode'] == 'change_status' ) { $cStatus = $_GET['current_status']; $nStatus = $cStatus==0 ? 1:0; $id = $_GET['id']; $updateStatusQuery = "UPDATE `users` SET `status`='$nStatus' WHERE `id`='$id'"; mysql_query($updateSta...
PHP
<?php if($isDebug) { ?> <hr> <h4>Debug:-</h4> <?php foreach ($logArr as $msg) { echo $msg; } ?> <hr> <?php }//end if ?>
PHP
Setting environment for using XAMPP for Windows. cubes@CUBES-PC c:\xampp # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.27 MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights r...
PHP
<?php //error_reporting(~E_ERROR); echo fun(); echo "\n",'So Sorry :(',"\n\n";
PHP