Merry Christmas and Happy New Year!
Posted by: yfastud (Moderator)
Date: December 20, 2008 02:32PM

Wish you all a very joyous season!!!

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 01/07/2009 04:47AM by yfastud.

Options: ReplyQuote
urgnet help on running wamp
Posted by: taskhkbu (---.netvigator.com)
Date: January 01, 2009 06:48PM

Dear all,

Any help is highly appreciated. I have successfully installed wamp on my pc with vista.

I want to install phpmylibrary on my pc:

put phpmylibrary in www of wamp

In URL, I type

www\localhost\phpmylibrary\installation


I have successfully completed the 4 steps, the last one just asking to click the view button. Once I clicked , it showed only the source code instead of the web wage of phpmylibrary.


Execute($sql); return; } // added to get just the value. apr-29-2006 polerio function GetConfigVar($name='') { list($dbconn) = Polerio:grinning smileyBGetConn(); $table = Polerio:grinning smileyBGetTables(); $v = $table['vars']; $vc = $table['vars_column']; $sql = " SELECT "; $sql .= " $vc[value] "; $sql .= " from $v WHERE $vc[name]='$name'"; //echo $sql; $recordSet = $dbconn->Execute($sql); list($value) = $recordSet->fields; return $value; } function SelectModuleVar($name='') { list($dbconn) = Polerio:grinning smileyBGetConn(); $table = Polerio:grinning smileyBGetTables(); $v = $table['vars']; $vc = $table['vars_column']; $sql = " SELECT "; $sql .= " $vc[id], $vc[category], $vc[user], $vc[group], $vc[name], $vc[value] "; $sql .= " from $v WHERE $vc[name]='$name'"; //echo $sql; $recordSet = $dbconn->Execute($sql); list($id, $category, $user, $group, $name, $value) = $recordSet->fields; $ret = array('id'=>$id, 'category'=>$category, 'user'=>$user, 'group'=>$group, 'name'=>$name, 'value'=>$value); //print_r($ret); return $ret; } function UpdateModuleVar($name='', $value='') { list($dbconn) = Polerio:grinning smileyBGetConn(); $table = Polerio:grinning smileyBGetTables(); $v = $table['vars']; $vc = $table['vars_column']; $sql = " UPDATE $v SET "; $sql .= " $vc[value]='$value'"; $sql .= " WHERE $vc[name]='$name'"; //echo $sql; $recordSet = $dbconn->Execute($sql); return; } function DeleteModuleVar() { list($dbconn) = Polerio:grinning smileyBGetConn(); $table = Polerio:grinning smileyBGetTables(); $v = $table['vars']; $vc = $table['vars_column']; } function Linux_Server() { if((ereg("Linux",getenv("SERVER_SOFTWARE"winking smiley)) || (ereg("Unix",getenv("SERVER_SOFTWARE"winking smiley)) ) return true; } function PostNuke() { global $op, $name; if($op && $name) return true; else return false; } /** * get base URI * @returns string * @return base URI */ function GetBaseURI() { global $HTTP_SERVER_VARS; // Get the name of this URI // Start of with REQUEST_URI if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) { $path = $HTTP_SERVER_VARS['REQUEST_URI']; } else { $path = getenv('REQUEST_URI'); } if ((empty($path)) || (substr($path, -1, 1) == '/')) { // REQUEST_URI was empty or pointed to a path // Try looking at PATH_INFO $path = getenv('PATH_INFO'); if (empty($path)) { // No luck there either // Try SCRIPT_NAME if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) { $path = $HTTP_SERVER_VARS['SCRIPT_NAME']; } else { $path = getenv('SCRIPT_NAME'); } } } $path = preg_replace('/[#\?].*/', '', $path); $path = dirname($path); if (preg_match('!^[/\\\]*$!', $path)) { $path = ''; } return $path; } function GetBaseURL() { global $HTTP_SERVER_VARS; if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) { $server = getenv('HTTP_HOST'); } else { $server = $HTTP_SERVER_VARS['HTTP_HOST']; } $path = Polerio::GetBaseURI(); if(Polerio:tongue sticking out smileyostNuke()) return "[$server$path];; return "[$server$path];; } /** * private function * @returns string */ function GetRoot() { global $HTTP_SERVER_VARS; if (empty($HTTP_SERVER_VARS['DOCUMENT_ROOT'])) { $root= getenv('DOCUMENT_ROOT'); } else { $root = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; } return $root; } /** * generate c:/htodcs/modulename/polerio/ * generate /var/www/html/ . . . * @returns string */ function GetPolerioURI() { $PolerioModuleRoot = './polerio/'; if(PostNuke()) $PolerioModuleRoot = './modules/PhpMyLibrary/polerio/'; return $PolerioModuleRoot; } function GetPolerioURL() { global $name; // For postnuke if(Polerio:tongue sticking out smileyostNuke()) $PolerioModuleRoot = Polerio::GetBaseURL().'modules/'.$name.'/polerio/'; else $PolerioModuleRoot = Polerio::GetBaseURL().'/polerio/'; return $PolerioModuleRoot; } /** * generate c:/htodocs/modulename/polerio/module/ . . . * generate /var/www/html/ . . . * @returns string */ function GetModuleURI() { return Polerio::GetPolerioURI().'PhpMyLibrary/'; } /** * generate [modulename] * @returns string */ function GetModuleURL() { global $op, $name, $file; // For postnuke compatibility if(Polerio:tongue sticking out smileyostNuke()) $link = 'modules.php?op=modload&name='.$name.'&file=index'; else $link = 'index.php'; return Polerio::GetBaseURL().$link; } /** * to generate static color * @returns static color */ function useColora() { global $pmlconfig; if($pmlconfig['PnThOver']!=0) { $bcolor2 = $pmlconfig['bgcolor1']; $bcolor1 = $pmlconfig['bgcolor3']; } else { global $bgcolor1,$bgcolor2,$bgcolor3; $bcolor2 = $bgcolor1; $bcolor1 = $bgcolor3; } static $ColorValue; if($ColorValue==$bcolor2) $ColorValue=$bcolor1; else $ColorValue=$bcolor2; return($ColorValue); } /** * check to see if this is a local referral * @returns bool * @return true if locally referred, false if not */ function pnLocalReferer() { global $HTTP_SERVER_VARS; if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) { $server = getenv('HTTP_HOST'); } else { $server = $HTTP_SERVER_VARS['HTTP_HOST']; } if (empty($HTTP_SERVER_VARS['HTTP_REFERER'])) { $referer = getenv('HTTP_REFERER'); } else { $referer = $HTTP_SERVER_VARS['HTTP_REFERER']; } if (preg_match("!^[$server];, $referer)) { return true; } else { return false; } } function Med() { $Med = "?"; if(Polerio:tongue sticking out smileyostNuke()) $Med = "&"; return $Med; } // pn start function Init() { // proper error_repoting // E_ALL for development // error_reporting(E_ALL); // without warnings and notices for release //development error_reporting(E_ALL); //release //error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); //phpinfo(); // Hack for some weird PHP systems that should have the // LC_* constants defined, but don't if (!defined('LC_TIME')) { define('LC_TIME', 'LC_TIME'); } // register globals anti-hack from mambo globals.php define( 'RG_EMULATION', 1 ); if (RG_EMULATION == 0) { // force register_globals = off Polerio::unregisterGlobals(); } else if (ini_get('register_globals') == 0) { // php.ini has register_globals = off and emulate = on Polerio::registerGlobals(); } else { // php.ini has register_globals = on and emulate = on // just check for spoofing Polerio::checkInputArray( $_FILES ); Polerio::checkInputArray( $_ENV ); Polerio::checkInputArray( $_GET ); Polerio::checkInputArray( $_POST ); Polerio::checkInputArray( $_COOKIE ); Polerio::checkInputArray( $_SERVER ); if (isset( $_SESSION )) { Polerio::checkInputArray( $_SESSION ); } } //Installation sub folder check, removed for work with SVN if (file_exists( 'installation/index.php' )) { define( '_INSTALL_CHECK', 1 ); include ('offline.php'); exit(); } // ADODB configuration define('POLERIO_ADODB_DIR',Polerio::GetPolerioURI()); include POLERIO_ADODB_DIR.'adodb/adodb.inc.php'; include POLERIO_ADODB_DIR.'adodb/tohtml.inc.php'; // Load filtering include_once Polerio::GetPolerioURI().'phpInputFilter/class.inputfilter.php'; // Load templating class include_once Polerio::GetPolerioURI().'patTemplate/patErrorManager.php'; include_once Polerio::GetPolerioURI().'patTemplate/patTemplate.php'; // Initialise and load configuration global $config; $config = array(); include Polerio::GetPolerioURI().'config/conf.php'; // Initialise and load tables global $table; $table = array(); include Polerio::GetPolerioURI().'lib/tables.php'; // Connect to database if (!Polerio:grinning smileyBInit()) { die('Database initialisation failed'); } // Load filtering if (!Polerio::FilteringInit()) { die('Filtering initialisation failed'); } // Load pat Templating if (!Polerio::TemplateInit()) { die('Filtering initialisation failed'); } // Start Session to non-post-nuked site if(!Polerio:tongue sticking out smileyostNuke()) { // session management include Polerio::GetPolerioURI().'lib/Session2.php'; if (Polerio::ConfigGetVar('anonymoussessions') || !empty($_REQUEST['POLERIOSID'])) { // Start session if (!SessionSetup()) { die('Session setup failed'); } if (!SessionInit()) { die('Session initialisation failed'); } } } //global $absolutePath; return true; } // Init() function TemplateInit() { global $template; $template = new patTemplate(); $tmpldir = Polerio::GetModuleURI().'templates'; $template->setBasedir($tmpldir); return true; } function Template() { global $template; return $template; } function FilteringInit() { global $filter; $filter = new InputFilter(); return true; } function Filtering() { global $filter; return $filter; } function InputFilter($input=""winking smiley { $filter = Polerio::Filtering(); $ret = $filter->process($input); return $ret; } // aprl 30, 2006 by polerio. needed in block //$tags = array("em", "br"winking smiley; //$attributes = array("title", "selected"winking smiley; //[cyberai.com] function CustomInputFilter($input="", $tags=array(), $attributes=array()) { $myFilter = new InputFilter($tags, $attributes); $ret = $myFilter->process($input); return $ret; } function DBInit() { // Get database parameters global $config; $dbtype = $config['dbtype']; $dbhost = $config['dbhost']; $dbname = $config['dbname']; $dbuname = $config['dbuname']; $dbpass = $config['dbpass']; // Database connection is a global (for now) global $dbconn; // Start connection $dbconn = ADONewConnection($dbtype); $dbh = $dbconn->Connect($dbhost, $dbuname, $dbpass, $dbname); if (!$dbh) { $dbpass = ""; die("$dbtype://$dbuname:$dbpass@$dbhost/$dbname failed to connect" . $dbconn->ErrorMsg()); } global $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; // force oracle to a consistent date format for comparison methods later on if (strcmp($dbtype, 'oci8') == 0) { $dbconn->Execute("alter session set NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MIconfused smileyS'"winking smiley; } return true; } /** * get a list of database connections * @returns array * @redturn array of database connections */ function DBGetConn() { global $dbconn; return array($dbconn); } function DBGetTables() { global $table; return $table; } function PhpMyLibrary() { global $site_footer; $some = "@ PhpMyLibrary 2.0.3-1"; return $site_footer[1]."

"; } function Mail($recipient="", $subject="", $body="", $headers=""winking smiley { mail($recipient, $subject, $body, $headers); } function GetBrowser() { /* Get the Browser data */ if((ereg("Nav", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Gold", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("X11", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Mozilla", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Netscape", getenv("HTTP_USER_AGENT"winking smiley)) AND (!ereg("MSIE", getenv("HTTP_USER_AGENT"winking smiley)) AND (!ereg("Konqueror", getenv("HTTP_USER_AGENT"winking smiley))) $browser = "Netscape"; // Opera needs to be above MSIE as it pretends to be an MSIE clone elseif(ereg("Opera", getenv("HTTP_USER_AGENT"winking smiley)) $browser = "Opera"; elseif(ereg("MSIE", getenv("HTTP_USER_AGENT"winking smiley)) $browser = "MSIE"; elseif(ereg("Lynx", getenv("HTTP_USER_AGENT"winking smiley)) $browser = "Lynx"; elseif(ereg("WebTV", getenv("HTTP_USER_AGENT"winking smiley)) $browser = "WebTV"; elseif(ereg("Konqueror", getenv("HTTP_USER_AGENT"winking smiley)) $browser = "Konqueror"; elseif((eregi("bot", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Google", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Slurp", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("Scooter", getenv("HTTP_USER_AGENT"winking smiley)) || (eregi("Spider", getenv("HTTP_USER_AGENT"winking smiley)) || (eregi("Infoseek", getenv("HTTP_USER_AGENT"winking smiley))) $browser = "Bot"; else $browser = "Other"; return $browser; } function GetOS() { /* Get the Operating System data */ if(ereg("Win", getenv("HTTP_USER_AGENT"winking smiley)) $os = "Windows"; elseif((ereg("Mac", getenv("HTTP_USER_AGENT"winking smiley)) || (ereg("PPC", getenv("HTTP_USER_AGENT"winking smiley))) $os = "Mac"; elseif(ereg("Linux", getenv("HTTP_USER_AGENT"winking smiley)) $os = "Linux"; elseif(ereg("FreeBSD", getenv("HTTP_USER_AGENT"winking smiley)) $os = "FreeBSD"; elseif(ereg("SunOS", getenv("HTTP_USER_AGENT"winking smiley)) $os = "SunOS"; elseif(ereg("IRIX", getenv("HTTP_USER_AGENT"winking smiley)) $os = "IRIX"; elseif(ereg("BeOS", getenv("HTTP_USER_AGENT"winking smiley)) $os = "BeOS"; elseif(ereg("OS/2", getenv("HTTP_USER_AGENT"winking smiley)) $os = "OS/2"; elseif(ereg("AIX", getenv("HTTP_USER_AGENT"winking smiley)) $os = "AIX"; else $os = "Other"; return $os; } /* * I've read about microtime() * I think it is more useful than calling the random * The purpose of this is just to make distinct number * Advantage, fixed distance in microtime. rand is not. * srand((double)microtime()*1000000); * return time().rand(); * */ function TimeAndRandom() { $tim = microtime(); $mtime = substr($tim,11,10).substr($tim,2,8); return $mtime; } function CheckEmailPassed($email=""winking smiley { if (!eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+\\.)+[a-z]{2,4}$", $email)) die ("Invalid Email"winking smiley; return; } /** * Get a session variable * * @param name $ name of the session variable to get */ function SessionGetVar($name) { if(isset($name) && isset($_SESSION['PMLV' . $name])) { return $_SESSION['PMLV' . $name]; } return false; } /** * Set a session variable * * @param name $ name of the session variable to set * @param value $ value to set the named session variable */ function SessionSetVar($name, $value='') { if (!isset($name)) { return false; } $_SESSION['PMLV' . $name] = $value; return true; } /** * Delete a session variable * * @param name $ name of the session variable to delete * @return success or error */ function SessionDelVar($name) { // if empty or not set in both globals, return if (empty($name) || !(isset($_SESSION['PMLV' . $name]) || !isset($GLOBALS['PMLV' . $name]))){ return false; } // Unset the session var unset($_SESSION['PMLV' . $name]); // This unsets the variable if register globals are on unset($GLOBALS['PMLV' . $name]); return true; } function VarPrepForStore() { $resarray = array(); foreach (func_get_args() as $ourvar) { // Prepare var if (!get_magic_quotes_runtime()) { $ourvar = addslashes($ourvar); } // Add to array array_push($resarray, $ourvar); } // Return vars if (func_num_args() == 1) { return $resarray[0]; } else { return $resarray; } } function Redirect($redirecturl) { if (preg_match('!^http!', $redirecturl)) { // Absolute URL - simple redirect Header("Location: $redirecturl"winking smiley; return; } else { // Removing leading slashes from redirect url $redirecturl = preg_replace('!^/*!', '', $redirecturl); // Get base URL $baseurl = Polerio::GetBaseURL(); Header("Location: $baseurl$redirecturl"winking smiley; } } /* * Added sep 24, 2002 for use in selecting color * returns array bgcolor */ function SelectColor() { global $pmlconfig; if($pmlconfig['PnThOver']!=0) { $bgcolor[3] = $pmlconfig['bgcolor3']; $bgcolor[2] = $pmlconfig['bgcolor2']; $bgcolor[1] = $pmlconfig['bgcolor1']; } else { global $bgcolor1,$bgcolor2,$bgcolor3; $bgcolor[3] = $bgcolor3; $bgcolor[2] = $bgcolor2; $bgcolor[1] = $bgcolor1; } return $bgcolor; } /** * clean user input *
* Gets a global variable, cleaning it up to try to ensure that * hack attacks don't work * @param var name of variable to get * @param ... * @returns string/array * @return prepared variable if only one variable passed * in, otherwise an array of prepared variables */ function VarCleanFromInput() { $search = array('||si', '||si', '||si', '||si', '||si', '||si', '||si', '|STYLE\s*=\s*"[^"]*"|si'); $replace = array(''); $resarray = array(); foreach (func_get_args() as $var) { // Get var global $$var; if (empty($var)) { return; } $ourvar = $$var; if (!isset($ourvar)) { array_push($resarray, NULL); continue; } if (empty($ourvar)) { array_push($resarray, $ourvar); continue; } // Add to result array array_push($resarray, $ourvar); } // Return vars if (func_num_args() == 1) { return $resarray[0]; } else { return $resarray; } } /* Added some security scripts do elimiante simultaneous send error which * cause to much delete, update, or insert */ /** * generate an authorisation key *
* The authorisation key is used to confirm that actions requested by a * particular user have followed the correct path. Any stage that an * action could be made (e.g. a form or a 'delete' button) this function * must be called and the resultant string passed to the client as either * a GET or POST variable. When the action then takes place it first calls * pnSecConfirmAuthKey() to ensure that the operation has * indeed been manually requested by the user and that the key is valid * * @public * @param modname the module this authorisation key is for (optional) * @returns string * @return an encrypted key for use in authorisation of operations */ function SecGenAuthKey($modname='') { if (empty($modname)) { $modname = Polerio::VarCleanFromInput('module'); } // Date gives extra security but leave it out for now // $key = pnSessionGetVar('rand') . $modname . date ('YmdGi'); $key = Polerio:confused smileyessionGetVar('rand') . $modname; // Encrypt key $authid = md5($key); // Return encrypted key return $authid; } /** * confirm an authorisation key is valid *
* See description of pnSecGenAuthKey for information on * this function * @public * @returns bool * @return true if the key is valid, false if it is not */ function SecConfirmAuthKey($authid='') { // Regenerate static part of key $partkey = Polerio:confused smileyessionGetVar('rand'); // Not using time-sensitive keys for the moment // // Key life is 5 minutes, so search backwards and forwards 5 // // minutes to see if there is a match anywhere // for ($i=-5; $i<=5; $i++) { // $testdate = mktime(date('G'), date('i')+$i, 0, date('m') , date('d'), date('Y')); // // $testauthid = md5($partkey . date('YmdGi', $testdate)); // if ($testauthid == $authid) { // // Match // // // We've used up the current random // // number, make up a new one // srand((double)microtime()*1000000); // pnSessionSetVar('rand', rand()); // // return true; // } // } if ((md5($partkey)) == $authid) { // Match - generate new random number for next key and leave happy srand((double)microtime()*1000000); Polerio:confused smileyessionSetVar('rand', rand()); return true; } // Not found, assume invalid return false; } /** * To activate multi-admin capability * the program should get his/her gid or group id * The uid resides in the session */ function SelectGID() { $id = Polerio:confused smileyessionGetVar('uid'); if(empty($id)) $id = 0; $table = Polerio:grinning smileyBGetTables(); $users = $table['users']; $users_col = $table['users_column']; list($dbconn) = Polerio:grinning smileyBGetConn(); $sql="select $users_col[gid] from $users where $users_col[uid]=$id"; $result = $dbconn->Execute($sql); list($gid) = $result->fields; return $gid; } // taken from php.net // function _make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } function makePass() { define('_SYLLABELS', "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789"winking smiley; define('_MAKEPASS_LEN', 8); define('_MAKEPASS_BOX', 5000); // init some $result = ''; mt_srand(Polerio::_make_seed()); $syllabels = _SYLLABELS; $len = strlen($syllabels) - 1; $box = ""; // create box for($i = 0; $i < _MAKEPASS_BOX; $i++) { $ch = $syllabels[mt_rand(0, $len)]; // about 20% upper case letters if (mt_rand(0, $len) % 5 == 1) { $ch = strtoupper($ch); } // filling up the box with random chars $box .= $ch; } // now collect password from box for($i = 0; $i < _MAKEPASS_LEN; $i++) { $result .= $box[mt_rand(0, (_MAKEPASS_BOX - 1))]; } return $result; } // function makePass //================globals.php /** * @version $Id: globals.php 1145 2005-11-20 22:57:55Z Jinx $ * @package Joomla * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. * @license [www.gnu.org] GNU/GPL, see LICENSE.php * Joomla! is free software and parts of it may contain or be derived from the * GNU General Public License or other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ /** * Use 1 to emulate register_globals = on * * Use 0 to emulate regsiter_globals = off */ /** * Adds an array to the GLOBALS array and checks that the GLOBALS variable is * not being attacked * @param array * @param boolean True if the array is to be added to the GLOBALS */ function checkInputArray( &$array, $globalise=false ) { static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' ); foreach ($array as $key => $value) { if (in_array( strtolower( $key ), $banned ) ) { die( 'Illegal variable ' . implode( ' or ', $banned ) . ' passed to script.' ); } if ($globalise) { $GLOBALS[$key] = $value; } } } /** * Emulates register globals = off */ function unregisterGlobals () { Polerio::checkInputArray( $_FILES ); Polerio::checkInputArray( $_ENV ); Polerio::checkInputArray( $_GET ); Polerio::checkInputArray( $_POST ); Polerio::checkInputArray( $_COOKIE ); Polerio::checkInputArray( $_SERVER ); if (isset( $_SESSION )) { Polerio::checkInputArray( $_SESSION ); } $REQUEST = $_REQUEST; $GET = $_GET; $POST = $_POST; $COOKIE = $_COOKIE; if (isset ( $_SESSION )) { $SESSION = $_SESSION; } $FILES = $_FILES; $ENV = $_ENV; $SERVER = $_SERVER; foreach ($GLOBALS as $key => $value) { if ( $key != 'GLOBALS' ) { unset ( $GLOBALS [ $key ] ); } } $_REQUEST = $REQUEST; $_GET = $GET; $_POST = $POST; $_COOKIE = $COOKIE; if (isset ( $SESSION )) { $_SESSION = $SESSION; } $_FILES = $FILES; $_ENV = $ENV; $_SERVER = $SERVER; } /** * Emulates register globals = on */ function registerGlobals() { Polerio::checkInputArray( $_FILES, true ); Polerio::checkInputArray( $_ENV, true ); Polerio::checkInputArray( $_GET, true ); Polerio::checkInputArray( $_POST, true ); Polerio::checkInputArray( $_COOKIE, true ); Polerio::checkInputArray( $_SERVER, true ); if (isset( $_SESSION )) { Polerio::checkInputArray( $_SESSION, true ); } foreach ($_FILES as $key => $value){ $GLOBALS[$key] = $_FILES[$key]['tmp_name']; foreach ($value as $ext => $value2){ $key2 = $key . '_' . $ext; $GLOBALS[$key2] = $value2; } } } //================pnAPI.php postnuke 02212006 /** * Functions */ /** * get a configuration variable * * @param name $ the name of the variable * @return mixed value of the variable, or false on failure */ function ConfigGetVar($name) { if (!isset($name)) { return null; } if (isset($GLOBALS['polerioconfig'][$name])) { $result = $GLOBALS['polerioconfig'][$name]; } if (!isset($result)) { return null; } return $result; } /** * set a configuration variable * * @param name $ the name of the variable * @param value $ the value of the variable * @return bool true on success, false on failure */ function ConfigSetVar($name, $value='') { $name = isset($name) ? (string)$name : ''; // The database parameter are not allowed to change if (empty($name) || ($name == 'dbtype') || ($name == 'dbhost') || ($name == 'dbuname') || ($name == 'dbpass') || ($name == 'dbname') || ($name == 'system') || ($name == 'prefix') || ($name == 'encoded')) { return false; } // set the variable $GLOBALS['polerioconfig'][$name] = $value; return true; } /** * delete a configuration variable * * @param name $ the name of the variable * @return bool true on success, false on failure */ function ConfigDelVar($name) { if (!isset($name)) { return false; } // The database parameter are not allowed to be deleted if (empty($name) || ($name == 'dbtype') || ($name == 'dbhost') || ($name == 'dbuname') || ($name == 'dbpass') || ($name == 'dbname') || ($name == 'system') || ($name == 'prefix') || ($name == 'encoded')) { return false; } // Update my vars unset($GLOBALS['polerioconfig'][$name]); // success return true; } /** * Gets a server variable * * Returns the value of $name from $_SERVER array. * Accepted values for $name are exactly the ones described by the * {@link [www.php.net] PHP manual}. * If the server variable doesn't exist void is returned. * * @author Marco Canini , Michel Dalle * @access public * @param name string the name of the variable * @return mixed value of the variable */ function ServerGetVar($name) { // Check the relevant superglobals if (!empty($name) && isset($_SERVER[$name])) { return $_SERVER[$name]; } return null; // we found nothing here } } //end class Polerio ?> offset = ""; } function HeaderOpen() { $Header = "
Pi"; } function Login() { $login ='
User login


Username:

Password:

Remember me:



'; return $login; } function print_menu() { global $PHP_SELF; global $SITE_URL; global $ADMIN_MODE; global $HOME_URL; global $HOUR; global $MINUTE; global $conf; $polerio_base_url = $conf['main']['polerio_base_url']; $phpmylibrary_url = $polerio_base_url."/phpmylibrary"; $GetModuleURL = Polerio::GetModuleURL(); $Med = Polerio::Med(); $_import = $GetModuleURL; $_import .= $Med; $_import .= "_a=1"; $_webpac = $GetModuleURL; $_cataloging = $GetModuleURL; $_cataloging .= $Med; $_cataloging .= "_a=2"; if(Phpmylibrary::IsLoggedIn()!=1) { $_login = $GetModuleURL; $_login .= $Med; $_login .= "_a=3&_aa=2"; $loginmsg = "Log-in"; } else { $_login = $GetModuleURL; $_login .= $Med; $_login .= "_a=3&_aa=1"; $loginmsg = "Log-out"; } $bcolor1 = $conf['table']['bcolor1']; $bcolor2 = $conf['table']['bcolor2']; $bcolor3 = $conf['table']['bcolor3']; $year = date("y"winking smiley; $mon = date("m"winking smiley; $day = date("D"winking smiley; $hour = date("h"winking smiley; $min = date("i"winking smiley; $orgdate = date("l F dS, Y h:i A",gmmktime($hour+8,$min+10,$sec,$mon,$day,$year)); $orgdate = date("M d y h:i a",gmmktime($hour+$HOUR,$min+$MINUTE)); print"
WebPAC"; if(Phpmylibrary::IsLoggedIn()==1) print"
• Cataloging"; print"
• '.$value1[2].''; } $selectbranch = ''.$sel.' '; $authid = Polerio:confused smileyecGenAuthKey(); $template = polTemplate::LoadTemplate(Polerio::GetModuleURI().'templates/search.html'); $vars = array("pol::getmoduleurl","pol::pmlsearchquery","pol::pmlany","pol::pmlauthor", "pol::pmltitle","pol::pmlsubject","pol::pmlpublisher","pol::pmlnotes","pol::pmlabstract", "pol::pmlsearch","pol::pmlsearchfor","pol::pmlsearchfor","pol::pmlclearsearch", "pol::pmlbooks","pol::pmlserials","pol::pmlmaps","pol::pmlmusic", "pol::pmlvisualmaterial","pol::pmlcomputerfiles","pol::pmlmixedmaterial","pol::pmlthesis", "pol::pmlmediatype","pol::pmllogical","pol::pmland","pol::pmlor","pol::pmlnot","pol::pmllimit", "pol::pmlbgcolor1","pol::pmlbgcolor2","pol::pmlbgcolor3","pol::authid" ); $vals = array("$getmoduleurl","$pmlsearchquery","$pmlany","$pmlauthor", "$pmltitle","$pmlsubject","$pmlpublisher","$pmlnotes","$pmlabstract", "$pmlsearch","$pmlsearchfor","$pmlsearchfor","$pmlclearsearch", "$pmlbooks","$pmlserials","$pmlmaps","$pmlmusic", "$pmlvisualmaterial","$pmlcomputerfiles ","$pmlmixedmaterial","$pmlthesis", "$pmlmediatype","$pmllogical","$pmland","$pmlor","$pmlnot","$pmllimit", "$pmlbgcolor1","$pmlbgcolor2","$pmlbgcolor3","$authid" ); $template = polTemplate::ReplaceStatic($template, $vars, $vals); return $template; } function sql_generator ($keywords="",$Media="",$Heading="",$Operator="",$offset="",$limit="",$mode=""winking smiley { global $conf; global $pmlconfig; global $encodingtype; list($dbconn) = Polerio:grinning smileyBGetConn(); $table = Polerio:grinning smileyBGetTables(); if($Operator=="NOT"winking smiley $NOT = "NOT"; else $NOT=''; //print"sql_gen key $keywords, med $Media, hea $Heading, ope $Operator, off $offset, lim $limit"; // Heading evaluation to produce tbl to search start if($Heading==0) { $tablea= $table['tblanyindex']; $tableb = $table['tblanybibrelation']; $tablea_col= &$table['tblanyindex_column']; $tableb_col = &$table['tblanybibrelation_column']; } elseif($Heading==1) { $tablea= $table['tblauthorindex']; $tableb = $table['tblauthorbibrelation']; $tablea_col= &$table['tblauthorindex_column']; $tableb_col = &$table['tblauthorbibrelation_column']; } elseif($Heading==2) { $tablea= $table['tbltitleindex']; $tableb = $table['tbltitlebibrelation']; $tablea_col= &$table['tbltitleindex_column']; $tableb_col = &$table['tbltitlebibrelation_column']; } elseif($Heading==3) { $tablea= $table['tblsubjectindex']; $tableb = $table['tblsubjectbibrelation']; $tablea_col= &$table['tblsubjectindex_column']; $tableb_col = &$table['tblsubjectbibrelation_column']; } elseif($Heading==4) { $tablea= $table['tblpublisherindex']; $tableb = $table['tblpublisherbibrelation']; $tablea_col= &$table['tblpublisherindex_column']; $tableb_col = &$table['tblpublisherbibrelation_column']; } elseif($Heading==5) { $tablea= $table['tblnotesindex']; $tableb = $table['tblnotesbibrelation']; $tablea_col= &$table['tblnotesindex_column']; $tableb_col = &$table['tblnotesbibrelation_column']; } elseif($Heading==6) { $tablea= $table['tblabstractindex']; $tableb = $table['tblabstractbibrelation']; $tablea_col= &$table['tblabstractindex_column']; $tableb_col = &$table['tblabstractbibrelation_column']; } $tablec = $table['tblbib']; $tablec_col = $table['tblbib_column']; // Heading evaluation to produce tbl to search end // Media evaluation to produce what category i.e book to search start if($Media==0) { $catid="0"; } elseif($Media==1) { $catid="1"; } elseif($Media==2) { $catid="2"; } elseif($Media==3) { $catid="3"; } elseif($Media==4) { $catid="4"; } elseif($Media==5) { $catid="5"; } elseif($Media==6) { $catid="6"; } elseif($Media==7) { $catid="7"; } elseif($Media==8) { $catid="8"; } elseif($Media==9) { $catid="9"; } // Media evaluation to produce what category i.e book to search stop $limits = "LIMIT $offset,$limit"; $tblbib = $conf['table']['marc']; $catid = "= $Media"; //print"current mode is $mode"; if($Media > 0) $webpac_total_cat_id = "AND catid = $Media"; if($mode=="catalog_stats"winking smiley { $sql = "SELECT * FROM $tblbib WHERE (approved = 1) AND catid $catid "; } elseif($mode=="webpac_total"winking smiley { $sql = "SELECT id FROM $table WHERE (approved = 1) $webpac_total_cat_id ORDER BY id "; } elseif($mode=="catalog_browse"winking smiley { $sql = "SELECT id, marc, catid, approved FROM $tblbib WHERE (approved = 1) AND catid $catid ORDER BY id $limits"; } elseif($mode=="catalog_total"winking smiley { $sql = "SELECT id FROM $table WHERE (approved = 1) AND catid $catid"; } elseif($mode=="catalog_search"winking smiley { //print"this is $offset "; if(empty($offset)) { $limits = "LIMIT 0,$limit"; } else { $limits = "LIMIT $offset,$limit"; } if(empty($limit)) { $limits=""; } $DEBUG = "\n"; // set DEBUG == "\n" to see this query $keywordsforabstracts = $keywords; $keywords = trim(urldecode($keywords)); $keywords = ereg_replace("([ ]+)"," ",$keywords); if(!ereg(" ",$keywords)) { // Only 1 keyword $KeyWords[0] = "$keywords"; } else { $KeyWords = explode(" ",$keywords); } if($Media==0) { $Med = "($tablec_col[approved] = 1) "; if(Phpmylibrary::IsLoggedIn()) $Med = "($tablec_col[approved] = '0' OR $tablec_col[approved] = '1') "; } else { $Med = "($tablec_col[approved] = 1) AND ($tablec_col[catid] = $Media)"; if(Phpmylibrary::IsLoggedIn()) $Med = "($tablec_col[approved] = 1 OR $tablec_col[approved] = 0) AND ($tablec_col[catid] = $Media)"; } $sql = "SELECT DISTINCT $tablec_col[id], $tablec_col[marc], $tablec_col[catid], $tablec_col[accessid], $tablec_col[approved] FROM $tablea, $tableb, $tablec WHERE $DEBUG ( "; $count = count($KeyWords); if( $count == 1 && $Heading!=5) { $single = $KeyWords[0]; // discard if keyword length is < 4 if(strlen($single) < $pmlconfig['keyword_length']) { return false; } $sql .= " ( $tablea_col[any] $NOT LIKE '%$single%') AND ($tableb_col[anyid]=$tablea_col[id]) AND ($tablec_col[id]=$tableb_col[bibid]) AND $Med ) ORDER by $tablec_col[id] $limits $DEBUG "; } elseif( $Heading== 6 ) // meaning this is abstract { $single = $keywordsforabstracts; // discard if keyword length is < 4 if(strlen($single) < $pmlconfig['keyword_length']) { return false; } $sql .= " ( MATCH $tablea_col[any] AGAINST ('$single')) AND ($tableb_col[anyid]=$tablea_col[id]) AND ($tablec_col[id]=$tableb_col[bibid]) AND $Med ) ORDER by $tablec_col[id] $limits $DEBUG "; } else { $ticker = 0; while ( list ($key,$word) = each ($KeyWords) ) { if($Operator=="NOT"winking smiley { $Operator = "AND NOT"; } $ticker++; if(!empty($word)) { if($ticker != $count) { if(strlen($word) < $pmlconfig[keyword_length]) { return false; } $sql .= "($tablea_col[any] LIKE '%$word%' ) AND ($tableb_col[anyid]=$tablea_col[id]) AND ($tablec_col[id]=$tableb_col[bibid]) $Operator $DEBUG "; } else { // Last condition, omit the trailing OR $sql .= " ($tablea_col[any] LIKE '%$word%') AND ($tableb_col[anyid]=$tablea_col[id]) AND ($tablec_col[id]=$tableb_col[bibid]) $DEBUG "; } } } $sql .= " ) AND $Med ORDER BY $tablec_col[id] $limits $DEBUG"; } /*if(!empty($DEBUG)) { echo "
$sql\nTicker [$ticker]\nCount [$count]
\n"; }*/ } //$results = $this->select($sql); //print"$sql"; return $sql; } function Marc($selected_tbl=""winking smiley { $table = Polerio:grinning smileyBGetTables(); list($dbconn) = Polerio:grinning smileyBGetConn(); $tblbib = $table['tblbib']; $tblbib_col = $table['tblbib_column']; $i=0; $zipmarc = ""; while($i <= (count($selected_tbl)-1)) { $query = "SELECT * FROM $tblbib WHERE $tblbib_col[id]=$selected_tbl[$i]"; $recordSet = $dbconn->Execute($query); $row = $recordSet->fields; $zipmarc .= $row[1].chr(29); $i++; } return $zipmarc; } function View($selected_tbl=""winking smiley { $table = Polerio:grinning smileyBGetTables(); list($dbconn) = Polerio:grinning smileyBGetConn(); $tblbib = $table['tblbib']; $tblbib_col = $table['tblbib_column']; include_once Polerio::GetModuleURI().'/lib/marcdefs.php'; $total = count($selected_tbl); $j=0; $viewmarc = ""; $row = array(); while($j <= (count($selected_tbl)-1)) { $query = "SELECT * FROM $tblbib WHERE $tblbib_col[id]=$selected_tbl[$j]"; $recordSet = $dbconn->Execute($query); list($id, $content, $catid, $approved ) = $recordSet->fields; $marc_field_explode = explode(chr(30),$content); $marc_field_explode_count = count($marc_field_explode); $i = 1; $tags_i = 1; $marc_fields_count = ((strlen($marc_field_explode[0])-24)/12); $rj = 0; $_j = 0; while ( $i <= $marc_fields_count) { $tags = substr($marc_field_explode[0],23,strlen($marc_field_explode[0])); $tags = substr($tags,$tags_i,3); $tag_value = $marc_field_explode[$i]; $tag_value = ereg_replace(31,"$",$tag_value); $tags_i = $tags_i + 12; $ktag[$rj] = $tags; $tag_names[$i] = @$tag_name[$ktag[$rj]]; $tag_content[$i] = Phpmylibrary::convertit($tag_value); $tag_name_marc[$i] = $tags; $tag_content_marc[$i] = $tag_value; $i++; } $_j = $_j+1; $viewmarc .= ""._PMLRECORDNO.". $_j "._PMLOF." $total
"; $viewmarc .= '
'; $total_fields = count($tag_names); $i=1; while($i <= $total_fields) { $bcolor = "ffffff"; if($tag_names[$i]) $viewmarc .= " $tag_names[$i] $tag_content[$i]"; $i++; } $viewmarc .= "


"; $j++; } return $viewmarc; } function convertit2($text=""winking smiley { $x = $text; $ptext = substr($text,2,strlen($text)-2); $etext = explode('^',$ptext); $ctext = count($etext); $i = 0; $text2 = " "; while ($i < $ctext) { $text2 = $text2.' '.substr($etext[$i],1,strlen($etext[$i])-1); $i++; } return substr($text2, 3, strlen($text2)); } function ViewPrintPreview($selected_tbl=""winking smiley { $table = Polerio:grinning smileyBGetTables(); list($dbconn) = Polerio:grinning smileyBGetConn(); $tblbib = $table['tblbib']; $tblbib_col = $table['tblbib_column']; include_once Polerio::GetModuleURI().'/lib/marcdefs.php'; $total = count($selected_tbl); $j=0; $viewmarc = ""; $row = array(); $data = array(); while($j <= (count($selected_tbl)-1)) { $query = "SELECT * FROM $tblbib WHERE $tblbib_col[id]=$selected_tbl[$j]"; $recordSet = $dbconn->Execute($query); list($id, $content, $catid, $approved ) = $recordSet->fields; $marc_field_explode = explode(chr(30),$content); $marc_field_explode_count = count($marc_field_explode); $i = 1; $tags_i = 1; $marc_fields_count = ((strlen($marc_field_explode[0])-24)/12); $rj = 0; $_j = 0; $accno = ''; while ( $i <= $marc_fields_count) { $tags = substr($marc_field_explode[0],23,strlen($marc_field_explode[0])); $tags = substr($tags,$tags_i,3); $mytags = $tags; $tag_value = $marc_field_explode[$i]; $tag_value = ereg_replace(31,"$",$tag_value); $tags_i = $tags_i + 12; $ktag[$rj] = $tags; $tag_names[$i] = @$tag_name[$ktag[$rj]]; $tag_content[$i] = Phpmylibrary::convertit($tag_value); $tag_name_marc[$i] = $tags; $tag_content_marc[$i] = $tag_value; $tagtag[$mytags] = $tag_value; $i++; $author = Phpmylibrary::convertit2($tagtag['100']); $title = Phpmylibrary::convertit2($tagtag['245']); if ($tags=='949') $accno = $accno.' '.Phpmylibrary::convertit2($tagtag['949']); $calln = Phpmylibrary::convertit2($tagtag['082']); $subject = Phpmylibrary::convertit2($tagtag['650']); //$subject1 = $subject1."\n".$subject; } $authtitle = "$author $title"; $newar = array('no'=>$j+1,'accno'=>$accno,'calln'=>$calln,'author'=>$author,'authtitle'=>$authtitle,'subject'=>$subject); array_push($data, $newar); $_j = $_j+1; $j++; } return $data; } function ViewCatalogPreview($selected_tbl=""winking smiley { $table = Polerio:grinning smileyBGetTables(); list($dbconn) = Polerio:grinning smileyBGetConn(); $tblbib = $table['tblbib']; $tblbib_col = $table['tblbib_column']; include_once Polerio::GetModuleURI().'/lib/marcdefs.php'; $total = count($selected_tbl); $j=0; $viewmarc = ""; $row = array(); while($j <= (count($selected_tbl)-1)) { $query = "SELECT * FROM $tblbib WHERE $tblbib_col[id]=$selected_tbl[$j]"; $recordSet = $dbconn->Execute($query); list($id, $content, $catid, $approved ) = $recordSet->fields; $marc_field_explode = explode(chr(30),$content); $marc_field_explode_count = count($marc_field_explode); $i = 1; $tags_i = 1; $marc_fields_count = ((strlen($marc_field_explode[0])-24)/12); $rj = 0; $_j = 0; while ( $i <= $marc_fields_count) { $tags = substr($marc_field_explode[0],23,strlen($marc_field_explode[0])); $tags = substr($tags,$tags_i,3); $tag_value = $marc_field_explode[$i]; $tag_value = ereg_replace(31,"$",$tag_value); $tags_i = $tags_i + 12; $ktag[$rj] = $tags; $tag_names[$i] = @$tag_name[$ktag[$rj]]; $tag_content[$i] = Phpmylibrary::convertit($tag_value); $tag_name_marc[$i] = $tags; $tag_content_marc[$i] = $tag_value; $i++; } $_j = $_j+1; $viewmarc .= ""._PMLRECORDNO.". $_j "._PMLOF." $total
"; $viewmarc .= '
'; $total_fields = count($tag_names); $i=1; while($i <= $total_fields) { $bcolor = "ffffff"; if($tag_names[$i]) $viewmarc .= " $tag_names[$i] $tag_content[$i]"; $i++; } $viewmarc .= "


"; $j++; } return $viewmarc; } function Viewnohtml($selected_tbl=""winking smiley { $table = Polerio:grinning smileyBGetTables(); $tblbib = $table['tblbib']; $tblbib_col = $table['tblbib_column']; include_once Polerio::GetModuleURI().'/lib/marcdefs.php'; list($dbconn) = Polerio:grinning smileyBGetConn(); $total = count($selected_tbl); $j=0; $viewmarc .= "\r\n"; $viewmarc .= "Polerio:tongue sticking out smileyhpMyLibrary [phpmylibrary.sourceforge.net]\r\n"; $viewmarc .= "Copyleft 2002 PhpMyLibrary GNU/GPL License\r\n"; $viewmarc .= "\r\n"; $viewmarc .= "--------------------------------------"; $viewmarc .= "--------------------------------------"; $viewmarc .= "\r\n"; $viewmarc .= "\r\n"; while($j <= (count($selected_tbl)-1)) { $query = "SELECT * FROM $tblbib WHERE $tblbib_col[id]=$selected_tbl[$j]"; $recordSet = $dbconn->Execute($query); $row = $recordSet->fields; $id = $row[0]; $content = $row[1]; $catid = $row[2]; $approved = $row[3]; $marc_field_explode = explode(chr(30),$content); $marc_field_explode_count = count($marc_field_explode); $i = 1; $tags_i = 1; $marc_fields_count = ((strlen($marc_field_explode[0])-24)/12); $rj = 0; while ( $i <= $marc_fields_count) { $bib = $bibid; $tags = substr($marc_field_explode[0],23,strlen($marc_field_explode[0])); $tags = substr($tags,$tags_i,3); $tag_value = $marc_field_explode[$i]; $tag_value = ereg_replace(31,"$",$tag_value); $tags_i = $tags_i + 12; $ktag[$rj] = $tags; $tag_names[$i] = $tag_name[$ktag[$rj]]; //$tag_name[$i] = Phpmylibrary::get_tag_name($tags); $tag_content[$i] = Phpmylibrary::convertit($tag_value); $tag_name_marc[$i] = $tags; $tag_content_marc[$i] = $tag_value; $i++; } $_j = $_j+1; $viewmarc .= "\r\n"; $viewmarc .= ""._PMLRECORDNO.". $id "._PMLRESULT." $_j "._PMLOF." $total\r\n\r\n"; $total_fields = count($tag_names); $i=1; while($i <= $total_fields) { $bcolor = Polerio::useColora(); if($tag_names[$i]) $viewmarc .= "$tag_names[$i]: $tag_content[$i]\r\n\r\n"; $i++; } $viewmarc .= "\r\n"; $viewmarc .= "--------------------------------------"; $viewmarc .= "--------------------------------------"; $viewmarc .= "\r\n"; $j++; } $viewmarc .= "\r\n"; $viewmarc .= "Polerio:tongue sticking out smileyhpMyLibrary [phpmylibrary.sourceforge.net]\r\n"; $viewmarc .= "Copyleft 2002 PhpMyLibrary GNU/GPL License\r\n"; $viewmarc .= "\r\n"; return $viewmarc; } // function to convert $a's with space start function convertit($text=""winking smiley { $x = $text; $ptext = substr($text,2,strlen($text)-2); $etext = explode("^",$ptext); $ctext = count($etext); $i = 0; $text2 = " "; while ($i < $ctext) { $text2 = $text2.' '.substr($etext[$i],1,strlen($etext[$i])-1); $i++; } return $text2; } function IsLoggedIn($msg=""winking smiley { global $pmlconfig; if(Polerio:confused smileyessionGetVar('uid') >= 2 ) { if(empty($msg)) { return Polerio:confused smileyessionGetVar('uid'); } else { $stress = "$msg Error: "._PMLYOUMUSTLOGINFIRST."!."; $res = "

$stress
"; return $res; } } else { $stress = "$msg Error: "._PMLYOUMUSTLOGINFIRST."!."; $res = "

$stress
"; return $res; } } function ToSearchAll() { global $pmlconfig; $tosearchall = ''; if($pmlconfig['note_lkeywords'] == 1) { $c=$pmlconfig['keyword_length']; $i=1; $h=""; while($i <= $c) { $h = $h."%"; $i++; } if(empty($h)) $h='%%%'; $tosearchall = "
"._PMLTYPE." $h "._PMLTOBROWSEALLRECORDS."!
"; } return $tosearchall; } function Message($msg=""winking smiley { $msg = "

$msg
"; return $msg; } function bgcolor1() { if(Phpmylibrary:tongue sticking out smileynThOver()) { global $bgcolor1; } else { global $pmlconfig; $bgcolor1 = $pmlconfig['bgcolor1']; } return $bgcolor1; } function bgcolor2() { if(Phpmylibrary:tongue sticking out smileynThOver()) { global $bgcolor2; } else { global $pmlconfig; $bgcolor2 = $pmlconfig['bgcolor2']; } return $bgcolor2; } function bgcolor3() { if(Phpmylibrary:tongue sticking out smileynThOver()) { global $bgcolor3; } else { global $pmlconfig; $bgcolor3 = $pmlconfig['bgcolor3']; } return $bgcolor3; } function MouseOver() { global $pmlconfig; $MouseOver = $pmlconfig['mouseover']; return $MouseOver; } /** * to generate static color * @returns static color */ function useColora() { global $pmlconfig; if($pmlconfig['PnThOver']!=0) { $bcolor2 = $pmlconfig['bgcolor1']; $bcolor1 = $pmlconfig['bgcolor3']; } else { global $bgcolor1,$bgcolor2,$bgcolor3; $bcolor2 = $bgcolor1; $bcolor1 = $bgcolor3; } static $ColorValue; if($ColorValue==$bcolor2) $ColorValue=$bcolor1; else $ColorValue=$bcolor2; return($ColorValue); } function PnThOver() { global $pmlconfig; if($pmlconfig['PnThOver']==0) return true; } function BackToDecoder($bakto=""winking smiley { $temp = explode("~",$bakto); for($i=0;$i $value) { if($i==$c-1) $tl = ''; $tm = $tm.$key.'^'.$value.$tl; $i++; } //echo $bakto; return $tm; } function BackToEncoder($bakto=""winking smiley { $bakto = ereg_replace("=","^",$bakto); $bakto = ereg_replace("&","~",$bakto); return $bakto; } } ?>



Any help highly appreciated.
Jackons

Options: ReplyQuote
Re: Merry Christmas and Happy New Year!
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: January 01, 2009 07:25PM

looks like this program uses <? ?> tags instead of <?php ?> tags,



left click wamp icon and goto PHP> SETTINGS> Short Open Tags ---and tick it

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Merry Christmas and Happy New Year!
Posted by: picante (---.cncdnh.east.verizon.net)
Date: January 02, 2009 03:58PM

You too. Have a wonderful 2009.

Options: ReplyQuote
Re: Merry Christmas and Happy New Year!
Posted by: student101 (---.telkom-ipnet.co.za)
Date: January 03, 2009 10:15PM

Quote

stevenmartin99 Wrote:
-------------------------------------------------------
> looks like this program uses <? ?> tags
> instead of <?php ?> tags,
> left click wamp icon and goto PHP> SETTINGS>
> Short Open Tags ---and tick it

Not safe... not all hosts support "Short Open Tags", check with your host first.

Cheers

Compliments of the season to all!

-----------------------
Thanks for your support!

Options: ReplyQuote
Re: Merry Christmas and Happy New Year!
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: January 03, 2009 10:27PM

its perfectly safe.. just not transportable

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Merry Christmas and Happy New Year!
Posted by: student101 (---.telkom-ipnet.co.za)
Date: January 03, 2009 10:47PM

My words were misleading, sorry.
Yes not transportable is better.

Cheers

Options: ReplyQuote


Sorry, only registered users may post in this forum.