owp-cvs Mailing List for OWP
Status: Inactive
Brought to you by:
scader
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <owp...@li...> - 2006-04-25 22:27:17
|
Update of /cvsroot/owp/owp/inc/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8738/functions Added Files: incoming_data_functions.inc Log Message: integrated main class with everything we need for work --- NEW FILE: incoming_data_functions.inc --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Functions we need to process unsave input date to save input data * @author Artem Sidorenko <ar...@2r...> * @version $Id: incoming_data_functions.inc,v 1.1 2006/04/25 22:27:07 scader Exp $ * @package functions * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**Max count of dimensions of input array*/ @ define('security_input_array_max_level',5); /**Parse our incoming data *@param array $data incoming data *@param integer $level security issue, for no buffer overflow *@return array an array with clean and save data */ function parse_incoming_data($data,$level=1){ //overflow? if($level>=security_input_array_max_level) return array(); $rarray = array(); foreach($data as $k=>$v){ if(is_scalar($v)) $rarray[htmlspecialchars($k,ENT_QUOTES)]=htmlspecialchars($v,ENT_QUOTES); elseif(is_array($v)) $rarray[htmlspecialchars($k,ENT_QUOTES)] = parse_incoming_data($v,$level+1); }//\\foreach return $rarray; }//\\parse_incoming_data /**Function stripes magic quotes if they are enabled in php *@param array $data input data *@param integer $level security issue, for no overflow *@return array array without magic quotes */ function strip_magic_quotes($data,$level=1){ //overflow? if($level>=security_input_array_max_level) return array(); if(!get_magic_quotes_gpc()) return $data; $rarray = array(); foreach($data as $k=>$v){ if(is_scalar($v)) $rarray[$k]=stripslashes($v); elseif(is_array($v)) $rarray[$k] = strip_magic_quotes($v,$level+1); }//\\foreach return $rarray; }//\\strip_magic_quotes ?> |
From: <owp...@li...> - 2006-04-25 22:27:16
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8738/classes Added Files: tmain.class tusersession.class Log Message: integrated main class with everything we need for work --- NEW FILE: tmain.class --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Main class, contains everything we need to work * @package owp * @author Artem Sidorenko <ar...@2r...> * @version $Id: tmain.class,v 1.1 2006/04/25 22:27:07 scader Exp $ * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**Max length of GET string*/ @ define('security_get_max_length',150); /**we need some functions for parsing*/ include_once 'incoming_data_functions.inc'; /**Class for working with session and cookies*/ include_once 'tusersession.class'; class tmain{ /**Contains all input data, added only for compatibility and is deprecated, please don't use in anymore *@var array */ var $input = array(); /**Contains all unsafe input data, added only for compatibility and is deprecated, please don't use in anymore *@var array */ var $input_unsafe = array(); /**Contains save GET data *@var array */ var $get = array(); /**Contains save POST data *@var array */ var $post = array(); /**Contains unsafe GET data *@var array */ var $get_unsafe = array(); /**Contains unsafe POST data *@var array */ var $post_unsafe = array(); /**Contains save FILES data *@var array */ var $files = array(); /**Contains unsafe FILES data *@var array */ var $files_unsafe = array(); /**Object for working with cookies and session *@var tusersession */ var $usersession = false; /**Constructor */ function tmain(){ //processing GET data $get = substr(getenv ('QUERY_STRING') ,0,security_get_max_length); if(strpos($get,'?')!==false){//if we have GET data $get = ereg_replace(".*\\?","",$get); parse_str($get,$this->get_unsafe); $this->get_unsafe = strip_magic_quotes($this->get_unsafe); $this->get = parse_incoming_data($this->get_unsafe); }//\\if //processing POST data $this->post_unsafe = strip_magic_quotes($_POST); $this->post = parse_incoming_data($this->post_unsafe); //processing FILES data /**/ //meging our data, order GET,POST,FILES #unsafe data $this->input_unsafe = array_merge($this->get_unsafe,$this->post_unsafe,$this->files_unsafe); #save data $this->input = array_merge($this->get,$this->post,$this->files); //creating usersession object $this->usersession = &new tusersession(); }//\\tmain }//\\tmain ?> --- NEW FILE: tusersession.class --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Class for working with user sessions and cookies * @package owp * @author Artem Sidorenko <ar...@2r...> * @version $Id: tusersession.class,v 1.1 2006/04/25 22:27:07 scader Exp $ * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**constant to define cookies in methods of tusersession*/ define('USER_COOKIES',1); /**constant to define session in methods of tusersession*/ define('USER_SESSION',2); /**name of test cookie*/ @ define('usersession_test_cookie_name','test_cookie'); /**name of var with first call data*/ @ define('usersession_first_call_session_var','usersession_first_call'); /**name of var with cookies data, in case if cookies are disabled*/ @ define('usersession_cookies_session_var','usersession_cookies'); /**name of var with cookie status data, internal use only*/ @ define('usersession_cookies_processed','usersession_cookies_processed'); /**we need some functions for parsing*/ include_once 'incoming_data_functions.inc'; class tusersession{ /**array with cookies, readonly *@var array */ var $cookies = array(); /**array with session data, readwrite, but it's recommended to use methods *@var array */ var $session = array(); /**status of cookies *@var bool */ var $cookies_enabled = false; /**constructor*/ function tusersession(){ //start session session_start(); //linking our property $this->session = &$_SESSION; //init cookies $this->session[usersession_cookies_session_var] = array(); //first call? if(!$this->get_data(usersession_first_call_session_var)){//sending test cookie setcookie(usersession_test_cookie_name,1); $this->edit_data(usersession_first_call_session_var,1); }//\\if elseif(isset($_COOKIE[usersession_test_cookie_name])){ $this->cookies_enabled = true; //checking if existing cookies already processed if(!$this->get_data(usersession_cookies_processed)){ $this->edit_data(usersession_cookies_processed,1); foreach($this->session[usersession_cookies_session_var] as $k=>$v){ setcookie($k,$v); $_COOKIE[$k]=$v; }//\\foreach }//\\if //processing our cookies $this->cookies = strip_magic_quotes($_COOKIE); //it must be safe! $this->cookies = parse_incoming_data($this->cookies); }//\\if else $this->cookies = $this->session[usersession_cookies_session_var] ; }//\\tusersession /**Edit or add data *@param string $name name *@param mixed $value value *@param integer $type type of var: USER_COOKIES or USER_SESSION. These are constants */ function edit_data($name,$value,$type=USER_SESSION){ if($type==USER_SESSION) $this->session[$name]=$value; elseif($type==USER_COOKIES){ if($this->cookies_enabled) setcookie($name,$value); else $this->sesson[usersession_cookies_session_var][$name]=$value; }//\\elseif else return false; }//\\edit_data /**Remove data *@param string $name name *@param integer $type type of var: USER_COOKIES or USER_SESSION. These are constants */ function remove_data($name,$type=USER_SESSION){ if($type==USER_SESSION) unset($this->session[$name]); elseif($type==USER_COOKIES){ if($this->cookies_enabled) setcookie($name,''); else unset($this->sesson[usersession_cookies_session_var][$name]); }//\\elseif else return false; }//\\remove_data /**returns requered data, or false if not defined *@param string $name name of var *@param integer $type type of var: USER_COOKIES or USER_SESSION. These are constants *@return bool value or bool false */ function get_data($name,$type=USER_SESSION){ if($type==USER_SESSION){ if(!isset($this->session[$name]))//doesn't exists return false; return $this->session[$name];//OK }//\\if elseif($type==USER_COOKIES){ if(isset($this->cookies[$name])) return $this->cookies[$name]; }//\\elseif else return false; }//\\get_data }//\\tusersession ?> |
From: <owp...@li...> - 2006-04-25 22:27:15
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8738/startup Modified Files: owp.inc Log Message: integrated main class with everything we need for work Index: owp.inc =================================================================== RCS file: /cvsroot/owp/owp/inc/startup/owp.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** owp.inc 20 Apr 2006 01:48:36 -0000 1.4 --- owp.inc 25 Apr 2006 22:27:07 -0000 1.5 *************** *** 41,44 **** --- 41,47 ---- @ define('owp_handlers_input','_process_input'); + /**Main class with environment info*/ + include_once 'tmain.class'; + /**Creates owp page and object if needed * @param string $file_name path to the template or owp file *************** *** 50,56 **** //if owp object was not created yet if(!is_object($smarty->owp)){ - include_once 'towp.class'; - $smarty->owp = &new towp($_SESSION); //creating main object, todo! }//\\if --- 53,63 ---- //if owp object was not created yet if(!is_object($smarty->owp)){ //creating main object, todo! + global $main; + $main = &new tmain(); + //owp object + include_once 'towp.class'; + $smarty->owp = &new towp($main->usersession->session); + }//\\if |
From: <owp...@li...> - 2006-04-25 22:26:33
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8277/classes Modified Files: twebpage.class Log Message: the right name of var is requered, fixed Index: twebpage.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/twebpage.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twebpage.class 20 Apr 2006 23:05:19 -0000 1.1 --- twebpage.class 25 Apr 2006 22:26:29 -0000 1.2 *************** *** 37,41 **** * @var array */ ! var $includes = array(); }//\\twebpage --- 37,41 ---- * @var array */ ! var $requered = array(); }//\\twebpage |
From: <owp...@li...> - 2006-04-25 22:25:23
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7311/classes Modified Files: twebobject.class Log Message: fixed a bug: forgotten the constant in the last revision Index: twebobject.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/twebobject.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** twebobject.class 20 Apr 2006 01:48:36 -0000 1.3 --- twebobject.class 25 Apr 2006 22:25:13 -0000 1.4 *************** *** 31,34 **** --- 31,37 ---- */ + /**Name of handler used by the smarty compiler to get html*/ + @ define('owp_handlers_get_html','_get_html'); + class twebobject{ /**owner of this object |
From: <owp...@li...> - 2006-04-20 23:05:27
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17222/inc/classes Modified Files: towp.class Added Files: twebpage.class Log Message: Added twebpage class needed by pages Index: towp.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/towp.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** towp.class 20 Apr 2006 01:47:01 -0000 1.3 --- towp.class 20 Apr 2006 23:05:19 -0000 1.4 *************** *** 105,109 **** $file = $rfile; ! if(!in_array($file,$this->includes))//if this file isn't exists in list, adding it $this->includes[]=$file; --- 105,109 ---- $file = $rfile; ! if(!in_array($file,$this->includes))//if this file isn't exist in list, adding it $this->includes[]=$file; *************** *** 117,122 **** $this->elements->$page_name = &new $page_name($this,$this,$this); ! //foreach($this->elements->$page_name->requered as $v) ! // $this->create_page($v); return $page_name; --- 117,126 ---- $this->elements->$page_name = &new $page_name($this,$this,$this); ! foreach($this->elements->$page_name->requered as $v){ ! $path = realpath($v.".".files_ext_owp);//building file path ! if(!file_exists($path))//file doesn't exist, error ! trigger_error("OWP Error: File $path, requered by $file doesn't exist.",E_USER_ERROR); ! $this->create_page($path); ! }//\\foreach return $page_name; --- NEW FILE: twebpage.class --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * Contains class for pages * @package owp * @author Artem Sidorenko <ar...@2r...> * @version $Id: twebpage.class,v 1.1 2006/04/20 23:05:19 scader Exp $ * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**our parent*/ include_once 'twebobject.class'; class twebpage extends twebobject{ /**pages we need for working * @var array */ var $includes = array(); }//\\twebpage ?> |
From: <owp...@li...> - 2006-04-20 01:53:44
|
Update of /cvsroot/owp/owp/tpl/compiled In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4040/compiled Added Files: .cvsignore Log Message: added ignore file --- NEW FILE: .cvsignore --- * |
From: <owp...@li...> - 2006-04-20 01:48:42
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31912/inc/classes Modified Files: twebobject.class Log Message: Added onshow event. Added some commentars. Index: twebobject.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/twebobject.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** twebobject.class 20 Apr 2006 00:45:44 -0000 1.2 --- twebobject.class 20 Apr 2006 01:48:36 -0000 1.3 *************** *** 23,29 **** - /**Name of handler that returns html code*/ - @ define('owp_handlers_get_html','_get_html'); - /** * Contains root class for all owp classes --- 23,26 ---- *************** *** 33,36 **** --- 30,34 ---- * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ + class twebobject{ /**owner of this object *************** *** 80,83 **** --- 78,85 ---- }//\\oncreate + /**called before showing this object*/ + function onshow(){ + }//\\onshow + /**internal event * @access private *************** *** 96,99 **** --- 98,102 ---- * @param string $access_string complete access string to the this object * @return string php code for compiler + * @access private */ function _get_php($open,$access_string){ *************** *** 106,109 **** --- 109,116 ---- }//\\_get_php + /**handler for getting html code + * @access private + * @return string HTML + */ function _get_html(){ }//\\get_html |
From: <owp...@li...> - 2006-04-20 01:48:39
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31912/inc/startup Modified Files: owp.inc Log Message: Added onshow event. Added some commentars. Index: owp.inc =================================================================== RCS file: /cvsroot/owp/owp/inc/startup/owp.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** owp.inc 20 Apr 2006 00:45:44 -0000 1.3 --- owp.inc 20 Apr 2006 01:48:36 -0000 1.4 *************** *** 132,137 **** --- 132,141 ---- //creating owp page create_owp($file_name,$smarty,false); + //page name + $page_name = $smarty->owp->get_class_name($file_name); //processing input data + //onshow events + $smarty->owp->process_event($smarty->owp->elements->$page_name,owp_events_onshow); }//\\start_owp |
From: <owp...@li...> - 2006-04-20 01:47:09
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31140/inc/classes Modified Files: towp.class Log Message: fixed a bug Index: towp.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/towp.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** towp.class 20 Apr 2006 00:45:44 -0000 1.2 --- towp.class 20 Apr 2006 01:47:01 -0000 1.3 *************** *** 166,170 **** foreach($object as $k=>$v) if(is_object($v)) ! process_event($object->$k,$function_name,$level+1);//recursion }//\\process_onload --- 166,170 ---- foreach($object as $k=>$v) if(is_object($v)) ! $this->process_event($object->$k,$function_name,$level+1);//recursion }//\\process_onload |
From: <owp...@li...> - 2006-04-20 00:45:48
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17620/classes Modified Files: towp.class twebobject.class Log Message: Made a part of html integration. Moved some constants. Created some default handlers. Index: towp.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/towp.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** towp.class 19 Apr 2006 02:26:32 -0000 1.1 --- towp.class 20 Apr 2006 00:45:44 -0000 1.2 *************** *** 46,59 **** @ define('owp_events_onload','_onload'); ! /**Name of onshow event, called before collecting HTML code*/ ! @ define('owp_events_onshow','onshow'); ! ! /**Name of input data handler*/ ! @ define('owp_handlers_input','_process_input'); ! ! /**Name of handler that returns html code*/ ! @ define('owp_handlers_get_html','_get_html'); ! ! class elements_container{} class towp{ --- 46,50 ---- @ define('owp_events_onload','_onload'); ! class elements_container{}//container for pages class towp{ *************** *** 88,102 **** $this->session_data = &$this->session['data'];//link $this->elements = &new elements_container(); }//\\towp ! /**calls create_page() with file, build from templaate filename ! * @param string $file path to the template file ! * @return string result of create_page() */ ! function create_page_using_template($file){ $pathinfo = pathinfo($file); $file = build_path($pathinfo['dirname'],basename($pathinfo['basename'],'.'.$pathinfo['extension']).'.'.files_ext_owp); ! return $this->create_page($file); ! }//\\create_page_using_template /**creates a page and created requered pages --- 79,95 ---- $this->session_data = &$this->session['data'];//link $this->elements = &new elements_container(); + + $this->load_serialized(); }//\\towp ! /**returns owp file file path ! * @param string $file path to the template ! * @return string path to the owp file */ ! function get_owp_file_path($file){ $pathinfo = pathinfo($file); $file = build_path($pathinfo['dirname'],basename($pathinfo['basename'],'.'.$pathinfo['extension']).'.'.files_ext_owp); ! return $file; ! }//\\get_owp_file_path /**creates a page and created requered pages *************** *** 140,144 **** }//\\get_class_name ! /**loads a saved data * @access private */ --- 133,137 ---- }//\\get_class_name ! /**loads a saved data if needed * @access private */ *************** *** 148,155 **** include_once $v; ! //unserializing data ! $this->elements = unserialize($this->session_data); ! //calling events ! $this->process_event($this->elements,owp_events_onload); }//\\load_serialized --- 141,151 ---- include_once $v; ! //do we have serialized data? ! if($data = unserialize($this->session_data)){ ! //unserialized data ! $this->elements = $data; ! //calling events ! $this->process_event($this->elements,owp_events_onload); ! }//\\if }//\\load_serialized Index: twebobject.class =================================================================== RCS file: /cvsroot/owp/owp/inc/classes/twebobject.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twebobject.class 19 Apr 2006 02:26:32 -0000 1.1 --- twebobject.class 20 Apr 2006 00:45:44 -0000 1.2 *************** *** 23,26 **** --- 23,29 ---- + /**Name of handler that returns html code*/ + @ define('owp_handlers_get_html','_get_html'); + /** * Contains root class for all owp classes *************** *** 90,93 **** --- 93,99 ---- /**returns php code, used by the Smarty compiler + * @param bool $open open or close tag? + * @param string $access_string complete access string to the this object + * @return string php code for compiler */ function _get_php($open,$access_string){ *************** *** 95,103 **** 'push'=>false, 'pop'=>false, ! 'code'=>false, ); return $rarray; }//\\_get_php }//\\twebobject --- 101,112 ---- 'push'=>false, 'pop'=>false, ! 'code'=>'<?=$this->owp->elements->'.$access_string.'->'.owp_handlers_get_html.'()?>', ); return $rarray; }//\\_get_php + function _get_html(){ + }//\\get_html + }//\\twebobject |
From: <owp...@li...> - 2006-04-20 00:45:48
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17620/startup Modified Files: owp.inc Log Message: Made a part of html integration. Moved some constants. Created some default handlers. Index: owp.inc =================================================================== RCS file: /cvsroot/owp/owp/inc/startup/owp.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** owp.inc 19 Apr 2006 02:26:32 -0000 1.2 --- owp.inc 20 Apr 2006 00:45:44 -0000 1.3 *************** *** 22,26 **** */ ! /**Contains function, called by smarty compiler for owp tags * @author Artem Sidorenko <sc...@us...> * @version $Id$ --- 22,26 ---- */ ! /**Contains function, called by smarty for owp tags * @author Artem Sidorenko <sc...@us...> * @version $Id$ *************** *** 35,38 **** --- 35,69 ---- @ define('owp_handlers_get_php','_get_php'); + /**Name of onshow event, called before collecting HTML code*/ + @ define('owp_events_onshow','onshow'); + + /**Name of input data handler*/ + @ define('owp_handlers_input','_process_input'); + + /**Creates owp page and object if needed + * @param string $file_name path to the template or owp file + * @param Smarty $smarty Smarty object + * @param bool $template shows if $file_name is a path to template file + * @return string path to the owp file + */ + function create_owp($file_name,&$smarty,$template=true){ + //if owp object was not created yet + if(!is_object($smarty->owp)){ + include_once 'towp.class'; + $smarty->owp = &new towp($_SESSION); + //creating main object, todo! + }//\\if + + //building path to the owp file + if($template) + $file_name = $smarty->owp->get_owp_file_path($file_name); + + //creating page + $smarty->owp->create_page($file_name); + + return $file_name; + }//\\create_owp + + /**This is a handler for carrying about owp tags in Smarty * @param bool $open is it an open or close tag? *************** *** 47,58 **** if($open&&empty($params)){//first init tag - - //if owp object was not created yet - if(!is_object($smarty->parent->owp)){ - include_once 'towp.class'; - $smarty->parent->owp = &new towp($_SESSION); - //creating main object, todo! - }//\\if - //file name $params = array('resource_name'=>$smarty->_current_file); --- 78,81 ---- *************** *** 60,70 **** $file_name = $params['resource_name']; ! //loading page data ! $page_name = $smarty->parent->owp->create_page_using_template($file_name); ! //reseting our push array to page name $push_array = array($page_name); ! return '';//nothing to return for init tag }//\\if --- 83,94 ---- $file_name = $params['resource_name']; ! //creating owp page ! $owp_file = create_owp($file_name,$smarty->parent); ! $page_name = $smarty->parent->owp->get_class_name($owp_file);//our page name ! //reseting our push array to page name $push_array = array($page_name); ! return '<?php include_once "owp.inc";start_owp("'.$owp_file.'",$this);?>';//returning call of owp start function }//\\if *************** *** 78,86 **** #processing current element //building access string ! $access_string = implode('->',$push_array); $rarray = array();//init //I know, but without it won't work:-/ ! eval('$rarray = $smarty->parent->owp->elements->'.$access_string.'->'.$element.'->'.owp_handlers_get_php.'($open,$access_string);'); //checking if we need to push this tag --- 102,110 ---- #processing current element //building access string ! $access_string = implode('->',$push_array).'->'.$element; $rarray = array();//init //I know, but without it won't work:-/ ! eval('$rarray = $smarty->parent->owp->elements->'.$access_string.'->'.owp_handlers_get_php.'($open,$access_string);'); //checking if we need to push this tag *************** *** 99,104 **** return $rarray['code']; - }//\\process_owp ?> \ No newline at end of file --- 123,138 ---- return $rarray['code']; }//\\process_owp + /**Function starts OOP mode + * @param string $file_name path to the owp file + * @param Smarty $smarty object of smarty + */ + function start_owp($file_name,&$smarty){ + //creating owp page + create_owp($file_name,$smarty,false); + //processing input data + //onshow events + }//\\start_owp + ?> \ No newline at end of file |
From: <owp...@li...> - 2006-04-19 02:27:50
|
Update of /cvsroot/owp/owp/thirdparty/smarty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13225/thirdparty/smarty Modified Files: smarty.patch Log Message: Updated patch after last changes Index: smarty.patch =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/smarty.patch,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smarty.patch 14 Apr 2006 09:18:44 -0000 1.2 --- smarty.patch 19 Apr 2006 02:27:46 -0000 1.3 *************** *** 3,12 **** RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.1 ! diff -r1.1 Smarty_Compiler.class.php 29c29 < /* $Id$ */ --- > /* $Id$ */ ! 571a572,581 > case 'owp': > include_once 'owp.inc'; --- 3,16 ---- RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.1 ! retrieving revision 1.3 ! diff -r1.1 -r1.3 29c29 < /* $Id$ */ --- > /* $Id$ */ ! 75a76,77 ! > ! > var $parent = false; //link to the parent smarty object ! 571a574,583 > case 'owp': > include_once 'owp.inc'; *************** *** 19,20 **** --- 23,44 ---- > break; > + Index: libs/Smarty.class.php + =================================================================== + RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty.class.php,v + retrieving revision 1.1 + retrieving revision 1.2 + diff -r1.1 -r1.2 + 33c33 + < /* $Id$ */ + --- + > /* $Id$ */ + 562a563,569 + > + > /** + > * object of owp class + > * + > * @var towp + > */ + > var $owp = false; + 1483a1491 + > $smarty_compiler->parent = &$this; |
From: <owp...@li...> - 2006-04-19 02:26:37
|
Update of /cvsroot/owp/owp/thirdparty/smarty/libs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11500/thirdparty/smarty/libs Modified Files: Smarty.class.php Smarty_Compiler.class.php Log Message: Made compilations routine of owp objects Index: Smarty_Compiler.class.php =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Smarty_Compiler.class.php 14 Apr 2006 09:18:44 -0000 1.2 --- Smarty_Compiler.class.php 19 Apr 2006 02:26:33 -0000 1.3 *************** *** 74,77 **** --- 74,79 ---- var $_strip_depth = 0; var $_additional_newline = "\n"; + + var $parent = false; //link to the parent smarty object /**#@-*/ Index: Smarty.class.php =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty.class.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Smarty.class.php 13 Apr 2006 01:18:20 -0000 1.1.1.1 --- Smarty.class.php 19 Apr 2006 02:26:33 -0000 1.2 *************** *** 561,564 **** --- 561,571 ---- */ var $_cache_including = false; + + /** + * object of owp class + * + * @var towp + */ + var $owp = false; /**#@-*/ *************** *** 1482,1485 **** --- 1489,1493 ---- $smarty_compiler->_config = $this->_config; $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals; + $smarty_compiler->parent = &$this; if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) { |
From: <owp...@li...> - 2006-04-19 02:26:37
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11500/inc/startup Modified Files: owp.inc Log Message: Made compilations routine of owp objects Index: owp.inc =================================================================== RCS file: /cvsroot/owp/owp/inc/startup/owp.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** owp.inc 14 Apr 2006 01:59:43 -0000 1.1 --- owp.inc 19 Apr 2006 02:26:32 -0000 1.2 *************** *** 29,32 **** --- 29,38 ---- */ + /**Name of atrribut used to determine object name*/ + @ define('owp_element_attribut','element'); + + /**Name of handler used by the smarty compiler*/ + @ define('owp_handlers_get_php','_get_php'); + /**This is a handler for carrying about owp tags in Smarty * @param bool $open is it an open or close tag? *************** *** 35,38 **** --- 41,103 ---- */ function process_owp($open,$tag_args,&$smarty){ + //array to know where we are + static $push_array = array(); + + $params = $smarty->_parse_attrs($tag_args);//parsing parameters + + if($open&&empty($params)){//first init tag + + //if owp object was not created yet + if(!is_object($smarty->parent->owp)){ + include_once 'towp.class'; + $smarty->parent->owp = &new towp($_SESSION); + //creating main object, todo! + }//\\if + + //file name + $params = array('resource_name'=>$smarty->_current_file); + $smarty->parent->_parse_resource_name($params); + $file_name = $params['resource_name']; + + //loading page data + $page_name = $smarty->parent->owp->create_page_using_template($file_name); + + //reseting our push array to page name + $push_array = array($page_name); + + return '';//nothing to return for init tag + }//\\if + + if(!isset($params[owp_element_attribut]))//nothing to do + return ''; + + + $element = $smarty->_dequote($params[owp_element_attribut]); + + + #processing current element + //building access string + $access_string = implode('->',$push_array); + + $rarray = array();//init + //I know, but without it won't work:-/ + eval('$rarray = $smarty->parent->owp->elements->'.$access_string.'->'.$element.'->'.owp_handlers_get_php.'($open,$access_string);'); + + //checking if we need to push this tag + if($rarray['push']){ + $smarty->_push_tag('owp'); + array_push($push_array,$element); + }//\\if(push) + + //checking if we need to pop this tag + if($rarray['pop']){ + $smarty->_pop_tag('owp'); + $close_element = array_pop($push_array); + if($close_element!=$element) + trigger_error("OWP Error: mismatched close tag $close_element",E_USER_ERROR); + }//\\if(pop) + + return $rarray['code']; + }//\\process_owp |
From: <owp...@li...> - 2006-04-19 02:26:36
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11500/inc/classes Added Files: towp.class twebobject.class Log Message: Made compilations routine of owp objects --- NEW FILE: towp.class --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * Contains towp class and requered data for it. * @package owp * @author Artem Sidorenko <ar...@2r...> * @version $Id: towp.class,v 1.1 2006/04/19 02:26:32 scader Exp $ * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**functions for working with paths*/ include_once 'path_functions.inc'; /**Extension of OWP files*/ @ define('files_ext_owp','owp'); /**Name of session var, used by the OWP*/ @ define('owp_session_var','owp'); /**Upper value of level, security issue because of overflow possibility*/ @ define('owp_max_level',6); /**Name of onload event, called after unserializing*/ @ define('owp_events_onload','_onload'); /**Name of onshow event, called before collecting HTML code*/ @ define('owp_events_onshow','onshow'); /**Name of input data handler*/ @ define('owp_handlers_input','_process_input'); /**Name of handler that returns html code*/ @ define('owp_handlers_get_html','_get_html'); class elements_container{} class towp{ /**pointer to the session * @var array */ var $session = false; /**pointer to the part of session, contains serialized objects*/ var $session_data = false; /**Object, that contains all page objects * @var towp_elements */ var $elements = false; /**List of files, contains classes * @var array */ var $includes = false; /**Constructor * @param array $session pointer to the array, that contains session data * @param string $file path to the owp file * @param string $data data process to */ function towp(&$session){ //link to the session $this->session = &$session[owp_tag]; if(empty($this->session))//requered to init session $this->session = array('includes'=>array(),); $this->includes = &$this->session['includes'];//link $this->session_data = &$this->session['data'];//link $this->elements = &new elements_container(); }//\\towp /**calls create_page() with file, build from templaate filename * @param string $file path to the template file * @return string result of create_page() */ function create_page_using_template($file){ $pathinfo = pathinfo($file); $file = build_path($pathinfo['dirname'],basename($pathinfo['basename'],'.'.$pathinfo['extension']).'.'.files_ext_owp); return $this->create_page($file); }//\\create_page_using_template /**creates a page and created requered pages * @param string $file path to the file * @access private * @return string name of page */ function create_page($file){ $rfile = realpath($file); if(!$rfile) trigger_error("OWP Error: File '$file' doesn't exists",E_USER_ERROR); $file = $rfile; if(!in_array($file,$this->includes))//if this file isn't exists in list, adding it $this->includes[]=$file; $page_name = $this->get_class_name($file); if(isset($this->elements->$page_name))//if already exists ignoring return $page_name; /** @ignore*/ include_once $file; $this->elements->$page_name = &new $page_name($this,$this,$this); //foreach($this->elements->$page_name->requered as $v) // $this->create_page($v); return $page_name; }//\\create_page /**returns a page class name in the file * @access private * @param string $file file path * @return string */ function get_class_name($file){ $pathinfo = pathinfo($file); return basename($pathinfo['basename'],".".$pathinfo['extension']); }//\\get_class_name /**loads a saved data * @access private */ function load_serialized(){ //loading files with our classes foreach($this->includes as $v) include_once $v; //unserializing data $this->elements = unserialize($this->session_data); //calling events $this->process_event($this->elements,owp_events_onload); }//\\load_serialized /**Function processes events * @param object $object object process to * @param string $function_name name of event(function) * @param integer $level security issue * @access private */ function process_event(&$object,$function_name,$level=0){ //security issue if($level>=owp_max_level) return false; //if event exists, running it if(method_exists($object,$function_name)) $object->$function_name(); //processing child objects foreach($object as $k=>$v) if(is_object($v)) process_event($object->$k,$function_name,$level+1);//recursion }//\\process_onload }//\\towp ?> --- NEW FILE: twebobject.class --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * Contains root class for all owp classes * @package owp * @author Artem Sidorenko <ar...@2r...> * @version $Id: twebobject.class,v 1.1 2006/04/19 02:26:32 scader Exp $ * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ class twebobject{ /**owner of this object * @var twebobject */ var $owner = false; /**link to the page, contained this object * @var twebpage */ var $page = false; /**link to the root, in simple case it will be form * @var twebobjectscontainer */ var $root = false; /**name of current object * @var string */ var $name = false; /**created now? * @var bool */ var $new = true; /**Constructor * @param twebobject $owner owner of this object * @param twebpage $page link to the page, contained this object * @param twebobjectscontainer $root link to the root * @param string $name name of this object, if not given using class name */ function twebobject(&$owner,&$page,&$root,$name=false){ //setting our links $this->owner = &$owner; $this->page = &$page; $this->root = &$root; //if name given then using it, otherwise class name if($name) $this->name = $name; else $this->name = get_class($this); //calling event $this->oncreate(); }//\\twebobject #standard events /**called by the creation of object*/ function oncreate(){ }//\\oncreate /**internal event * @access private */ function _onload(){ $this->new = false; $this->onload();//calling event }//\\_onload /**called by the loading from session*/ function onload(){ }//\\onload /**returns php code, used by the Smarty compiler */ function _get_php($open,$access_string){ $rarray = array( 'push'=>false, 'pop'=>false, 'code'=>false, ); return $rarray; }//\\_get_php }//\\twebobject ?> |
From: <owp...@li...> - 2006-04-19 02:13:16
|
Update of /cvsroot/owp/owp/inc/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32405/inc/classes Log Message: Directory /cvsroot/owp/owp/inc/classes added to the repository |
From: <owp...@li...> - 2006-04-14 09:18:47
|
Update of /cvsroot/owp/owp/thirdparty/smarty/libs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1460/libs Modified Files: Smarty_Compiler.class.php Log Message: Changed the Smarty source, a diff with name smarty.patch was also done, you can rollback my changes to Smarty with patch -R <smarty.patch Index: Smarty_Compiler.class.php =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Smarty_Compiler.class.php 13 Apr 2006 01:18:16 -0000 1.1 --- Smarty_Compiler.class.php 14 Apr 2006 09:18:44 -0000 1.2 *************** *** 570,573 **** --- 570,583 ---- return $this->_compile_insert_tag($tag_args); + case 'owp': + include_once 'owp.inc'; + return process_owp(true,$tag_args,$this); + break; + + case '/owp': + include_once 'owp.inc'; + return process_owp(false,$tag_args,$this); + break; + default: if ($this->_compile_compiler_tag($tag_command, $tag_args, $output)) { |
From: <owp...@li...> - 2006-04-14 09:18:47
|
Update of /cvsroot/owp/owp/thirdparty/smarty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1460 Modified Files: smarty.patch Log Message: Changed the Smarty source, a diff with name smarty.patch was also done, you can rollback my changes to Smarty with patch -R <smarty.patch Index: smarty.patch =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/smarty.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** smarty.patch 14 Apr 2006 01:57:39 -0000 1.1 --- smarty.patch 14 Apr 2006 09:18:44 -0000 1.2 *************** *** 2,16 **** =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v ! retrieving revision 1.1.1.1 ! diff -r1.1.1.1 Smarty_Compiler.class.php 571a572,581 > case 'owp': > include_once 'owp.inc'; ! > process_owp(true,$tag_args,$this); > break; > > case '/owp': > include_once 'owp.inc'; ! > process_owp(false,$tag_args,$this); > break; > --- 2,20 ---- =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v ! retrieving revision 1.1 ! diff -r1.1 Smarty_Compiler.class.php ! 29c29 ! < /* $Id$ */ ! --- ! > /* $Id$ */ 571a572,581 > case 'owp': > include_once 'owp.inc'; ! > return process_owp(true,$tag_args,$this); > break; > > case '/owp': > include_once 'owp.inc'; ! > return process_owp(false,$tag_args,$this); > break; > |
From: <owp...@li...> - 2006-04-14 01:59:49
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1305/inc/startup Added Files: owp.inc Log Message: added a handler of owp tags --- NEW FILE: owp.inc --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Contains function, called by smarty compiler for owp tags * @author Artem Sidorenko <sc...@us...> * @version $Id: owp.inc,v 1.1 2006/04/14 01:59:43 scader Exp $ * @package owp * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**This is a handler for carrying about owp tags in Smarty * @param bool $open is it an open or close tag? * @param array $tag_args arguments of tag * @param Smarty_Compiler $smarty object of smarty */ function process_owp($open,$tag_args,&$smarty){ }//\\process_owp ?> |
From: <owp...@li...> - 2006-04-14 01:57:45
|
Update of /cvsroot/owp/owp/thirdparty/smarty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32314 Added Files: smarty.patch Log Message: Changed the Smarty source, a diff with name smarty.patch was also done, you can reject my changes to Smarty with patch -R <smarty.patch --- NEW FILE: smarty.patch --- Index: libs/Smarty_Compiler.class.php =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.1.1.1 diff -r1.1.1.1 Smarty_Compiler.class.php 571a572,581 > case 'owp': > include_once 'owp.inc'; > process_owp(true,$tag_args,$this); > break; > > case '/owp': > include_once 'owp.inc'; > process_owp(false,$tag_args,$this); > break; > |
From: <owp...@li...> - 2006-04-14 01:57:42
|
Update of /cvsroot/owp/owp/thirdparty/smarty/libs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32314/libs Modified Files: Smarty_Compiler.class.php Log Message: Changed the Smarty source, a diff with name smarty.patch was also done, you can reject my changes to Smarty with patch -R <smarty.patch Index: Smarty_Compiler.class.php =================================================================== RCS file: /cvsroot/owp/owp/thirdparty/smarty/libs/Smarty_Compiler.class.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Smarty_Compiler.class.php 13 Apr 2006 01:18:16 -0000 1.1.1.1 --- Smarty_Compiler.class.php 14 Apr 2006 01:57:39 -0000 1.2 *************** *** 570,573 **** --- 570,583 ---- return $this->_compile_insert_tag($tag_args); + case 'owp': + include_once 'owp.inc'; + process_owp(true,$tag_args,$this); + break; + + case '/owp': + include_once 'owp.inc'; + process_owp(false,$tag_args,$this); + break; + default: if ($this->_compile_compiler_tag($tag_command, $tag_args, $output)) { |
From: <owp...@li...> - 2006-04-14 00:51:15
|
Update of /cvsroot/owp/owp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17453 Added Files: .htaccess handler.php Log Message: added base handler and apache directives --- NEW FILE: .htaccess --- # Copyright (c) 2006, 2realities Group # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. # Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Apache settings # Artem Sidorenko <sc...@us...> # copyright (c) 2004-2006 2realities Group (www.2realities.com) # $Id: .htaccess,v 1.1 2006/04/14 00:51:12 scader Exp $ # # For more information please look in the apache manual at http://httpd.apache.org #Path to the handler Action owp "/handler.php?" #File assigsments AddHandler owp .htm --- NEW FILE: handler.php --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Handler, called by apache * @author Artem Sidorenko <sc...@us...> * @version $Id: handler.php,v 1.1 2006/04/14 00:51:13 scader Exp $ * @package owp * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**config routines*/ include_once 'config.php'; /**building our environment*/ include_once 'environment.inc'; /**functions for working with paths*/ include_once 'path_functions.inc'; /**using Smarty*/ include_once 'Smarty.class.php'; //creating Smaty object $smarty = new Smarty; //setting some path settings $smarty->config_dir = dirs_config; $smarty->template_dir = dirs_templates; $smarty->compile_dir = dirs_templates_compiled; $smarty->display("file:".build_path(dirs_root,dirs_current_path_framework_related)); ?> |
From: <owp...@li...> - 2006-04-14 00:50:36
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16883/inc/startup Added Files: environment.inc Log Message: environment building code added --- NEW FILE: environment.inc --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Building environment, like requested url or paths * @author Artem Sidorenko <sc...@us...> * @version $Id: environment.inc,v 1.1 2006/04/14 00:50:28 scader Exp $ * @package owp * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ #statical data //building hostname $hostname = $_SERVER['HTTP_HOST']; if($_SERVER['SERVER_PORT']!=80) $hostname.":".$_SERVER['SERVER_PORT']; //path to the root, related of server docroot dir $path_to_the_root = dirname($_SERVER['SCRIPT_NAME']); //building url to the root $root_url = "http://".$hostname.$path_to_the_root; //root path translated, realpath $root_path = dirname($_SERVER['PATH_TRANSLATED']); /**hostname*/ @ define('urls_hostname',$hostname); /**root url*/ @ define('urls_root',$root_url); /**root path, realpath*/ @ define('dirs_root',$root_path); /**path to the root, related of server docroot*/ @ define('dirs_root_server_related',$path_to_the_root); //cleaning unset($hostname,$root_url,$root_path,$path_to_the_root); #dynamical data //url to the currect page without GET params $end_pos = strpos($_SERVER['REQUEST_URI'],'?'); if($end_pos!==false)//GET data? $t_string = substr($_SERVER['REQUEST_URI'],0,$end_pos); else $t_string = $_SERVER['REQUEST_URI']; $current_url = "http://".urls_hostname.$t_string; //path related to the server docroot $current_path_server_related = $_SERVER['REDIRECT_URL']; //path related to the framework root $current_path_framework_related = str_replace(dirs_root_server_related,'',$current_path_server_related); //url to the current page with params $current_url_with_params = "http://".urls_hostname.$_SERVER['REQUEST_URI']; //remote ip of user $remote_ip = $_SERVER['REMOTE_ADDR']; /**current url wihtout params*/ define('urls_current',$current_url); /**current url with params*/ define('urls_current_with_params',$current_url_with_params); /**remote IP of user*/ define('urls_remote_ip',$remote_ip); /**path to the current document, related to the docroot of server*/ define('dirs_current_path_server_related',$current_path_server_related); /**path related to the framework root location*/ define('dirs_current_path_framework_related',$current_path_framework_related); //cleaning unset($current_url,$current_url_with_params,$remote_ip,$t_string,$end_pos,$current_path_server_related,$current_path_framework_related); ?> |
From: <owp...@li...> - 2006-04-14 00:49:55
|
Update of /cvsroot/owp/owp/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16187/config Added Files: config.ini Log Message: added config routines --- NEW FILE: config.ini --- ;$Id: config.ini,v 1.1 2006/04/14 00:49:42 scader Exp $ [php] include_path=inc:inc/startup:inc/functions:inc/classes:thirdparty/smarty/libs:thirdparty/smarty/libs/internals:thirdparty/smarty/libs/plugins |