diff --git a/README.md b/README.md index e91a83e..da689a4 100644 --- a/README.md +++ b/README.md @@ -40,4 +40,4 @@ Be sure to include a title and clear description,as much relevant information as ## License -**PBRaiders Vanilla** is open-source and are licensed under the [MIT License](https://github.com/pbraiders/pbraiders.vanilla/blob/master/LICENSE). +**PBRaiders Vanilla** is open-source and are licensed under the [GNU General Public License v3.0 License License](https://github.com/pbraiders/pbraiders.vanilla/blob/master/LICENSE). diff --git a/src/404.html b/src/404.html index a3cf56e..a663072 100644 --- a/src/404.html +++ b/src/404.html @@ -1,18 +1,17 @@ - - - + +
Error 404
-We’re sorry, we couldn’t find what you are looking for.
-This may be because:
+Nous sommes désolés, nous ne pouvons pas trouver ce que vous cherchez.
+Les raisons peuvent être :
©JOT 2010
diff --git a/src/contact.php b/src/contact.php index a5b43fa..901b14d 100644 --- a/src/contact.php +++ b/src/contact.php @@ -40,7 +40,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/contactdelete.php b/src/contactdelete.php index 6534c4a..6cdae7c 100644 --- a/src/contactdelete.php +++ b/src/contactdelete.php @@ -40,7 +40,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/contactnew.php b/src/contactnew.php index a18ca36..2e6dbb1 100644 --- a/src/contactnew.php +++ b/src/contactnew.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/contacts.php b/src/contacts.php index 940b880..06055fc 100644 --- a/src/contacts.php +++ b/src/contacts.php @@ -39,7 +39,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/contactsexport.php b/src/contactsexport.php deleted file mode 100644 index 0192cec..0000000 --- a/src/contactsexport.php +++ /dev/null @@ -1,181 +0,0 @@ - - * author: Olivier JULLIEN - 2010-02-04 - * update: Olivier JULLIEN - 2010-05-24 - use ErrorLog instead of TraceWarning - *************************************************************************/ - - /** Defines - **********/ - define('PBR_VERSION','1.1.0'); - define('PBR_PATH',dirname(__FILE__)); - - /** Include config - *****************/ - require(PBR_PATH.'/config.php'); - - /** Include functions - ********************/ - require(PBR_PATH.'/includes/function/functions.php'); - - /** Initialize - *************/ - require(PBR_PATH.'/includes/init/init.php'); - require(PBR_PATH.'/includes/init/initexport.php'); - $sSearch=''; - $sAction=null; - $sSended=FALSE; - $iPagingLimit=0; - $tCarriage=array("\r\n", "\r", "\n"); - - /** Authenticate - ***************/ - require(PBR_PATH.'/includes/init/inituser.php'); - - /** Mandatory Parameters - ***********************/ - if( CUser::GetInstance()->IsAuthenticated() && filter_has_var(INPUT_GET, 'act') ) - { - // Get action - $sAction = trim( filter_input( INPUT_GET, 'act', FILTER_SANITIZE_SPECIAL_CHARS)); - // Analyse - if( $sAction=='export' ) - { - // Get search name - if( filter_has_var(INPUT_GET, 'ctl') ) - { - $sSearch = rawurldecode( trim( filter_input( INPUT_GET, 'ctl', FILTER_UNSAFE_RAW))); - }//if( filter_has_var(INPUT_GET, 'ctl') ) - - /** Get contact count - ********************/ - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactsgetcount.php'); - $iPagingLimit=ContactsGetCount( CUser::GetInstance()->GetUsername() - ,CUser::GetInstance()->GetSession() - ,GetIP().GetUserAgent() - ,$sSearch); - if( $iPagingLimit<0 ) - { - // Failed - RedirectError( $iPagingLimit, __FILE__, __LINE__ ); - exit; - }//if( $iPagingLimit>0 ) - - // Get contact list - require(PBR_PATH.'/includes/db/'.PBR_DB_DIR.'/contactsget.php'); - $tRecordset=ContactsGet( CUser::GetInstance()->GetUsername() - ,CUser::GetInstance()->GetSession() - ,GetIP().GetUserAgent() - ,$sSearch - ,0 - ,$iPagingLimit); - if( is_array($tRecordset) ) - { - /** Refactoring - **************/ - $tCSV=array(); - $tCSV[]=array('nom','prénom','téléphone','email','adresse','ville','code postal','commentaire','date de création'); - foreach( $tRecordset as $tRecord ) - { - $tCSV[]=array( $tRecord['contact_lastname'], - $tRecord['contact_firstname'], - $tRecord['contact_tel'], - $tRecord['contact_email'], - $tRecord['contact_address'].' '.$tRecord['contact_addressmore'], - $tRecord['contact_addresscity'], - $tRecord['contact_addresszip'], - str_replace($tCarriage, ' ', $tRecord['contact_comment']), - $tRecord['creation_date']); - }//foreach( $tRecordset as $tRecord ) - - /** Open file - ************/ - if( CCSV::GetInstance()->Open()===FALSE ) - { - $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; - ErrorLog( CUser::GetInstance()->GetUsername(), $sTitle, 'impossible d\'ouvrir le fichier', E_USER_WARNING, TRUE); - }//if( CCSV::GetInstance()->Open($sExportDir)===FALSE ) - - /** Write data - *************/ - if( CCSV::GetInstance()->IsOpen()===TRUE ) - { - $sSended=CCSV::GetInstance()->Write($tCSV); - CCSV::GetInstance()->Close(); - - if( $sSended===FALSE ) - { - $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; - ErrorLog( CUser::GetInstance()->GetUsername(), $sTitle, 'impossible d\'exporter le fichier '.CCSV::GetInstance()->GetFilename(), E_USER_WARNING, TRUE); - } - else - { - /** Send data - ************/ - header("Content-disposition: attachment; filename=export.csv"); - header("Content-Type: application/force-download"); - header("Content-Transfer-Encoding: text/csv\n"); // ne pas enlever le \n - header("Content-Length: ".filesize(CCSV::GetInstance()->GetFilename())); - header("Pragma: no-cache"); - header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public"); - header("Expires: 0"); - readfile(CCSV::GetInstance()->GetFilename()); - }//if( CCSV::GetInstance()->Write($tCSV))===FALSE ) - }//if( CCSV::GetInstance()->IsOpen()===TRUE ) - - /** Display - **********/ - if( $sSended===FALSE ) - { - require(PBR_PATH.'/includes/display/displaycontactsexport.php'); - }//if( $sSended===FALSE ) - } - else - { - echo 'Liste vide.',"\n"; - }//if( is_array($tRecordset) ) - } - else - { - // Parameters are not good - $sTitle='fichier: '.basename(__FILE__).', ligne:'.__LINE__; - ErrorLog( CUser::GetInstance()->GetUsername(), $sTitle, 'possible tentative de piratage', E_USER_WARNING, FALSE); - }//if( $sAction=='export' ) - }//if( filter_has_var(... - - /** Delete objects - *****************/ - CCSV::DeleteInstance(); - include(PBR_PATH.'/includes/init/initclean.php'); -?> diff --git a/src/css/mobile.css b/src/css/mobile.css index cfc0b00..871577f 100644 --- a/src/css/mobile.css +++ b/src/css/mobile.css @@ -5,6 +5,7 @@ Style sheet name: PBRaiders mobile browser Version: 1.1 Author: Olivier JULLIEN - 2010-02-03 Update: Olivier JULLIEN - 2010-06-15 - improvement + Update: Olivier JULLIEN - 2010-09-01 - improvement The 'PBRaiders mobile browser style sheet' is released under: private licence. The logos 'PBRaiders' are under copyrights. W3C: This document was successfully checked as CSS level 3! @@ -49,7 +50,7 @@ fieldset legend.legendmain{font-weight:700;} .inputText,.inputTextS,.inputSelect,.inputParam{margin:2px;} .inputText,.inputTextS,.inputTextarea,.inputRadio,.inputSelect,.inputButton,.inputParam{font-size:1.7em;} .inputText,.inputTextarea,.inputSelect{width:95%;} -.inputButton{font-weight:700;} +.inputButton{font-weight:700;width:45%;} .graph{height:470px;overflow:auto;white-space:nowrap;overflow-y:hidden;} /** LIST **/ .records li{font-size:larger;line-height:1.875;text-align:justify;border-top:1px solid #346B9E;} diff --git a/src/css/mobilize.css b/src/css/mobilize.css index 446d6fd..5647c89 100644 --- a/src/css/mobilize.css +++ b/src/css/mobilize.css @@ -5,6 +5,7 @@ Style sheet name: PBRaiders mobile browser Version: 1.1 Author: Olivier JULLIEN - 2010-02-03 Update: Olivier JULLIEN - 2010-06-15 - improvement + Update: Olivier JULLIEN - 2010-09-01 - improvement The 'PBRaiders mobile browser style sheet' is released under: private licence. The logos 'PBRaiders' are under copyrights. W3C: This document was successfully checked as CSS level 3! @@ -18,6 +19,7 @@ body{font-size:106.3%;} .label,.labelF{float:none;width:auto;text-align:left;clear:none;} .inputText,.inputTextS,.inputTextarea,.inputRadio,.inputSelect,.inputButton,.inputParam{font-size:1.7em;} .inputSelect{width:95%;} +.inputButton{width:45% !important;} .listbuttons,.listbuttonitem{clear:none;} .fieldsetformgroup{float:none;width:auto;} .records li{font-size:larger;font-weight:400;} diff --git a/src/css/style.css b/src/css/style.css index 26f3d3e..34a144d 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -5,6 +5,7 @@ Style sheet name: PBRaiders desktop browser Version: 1.1 Author: Olivier JULLIEN - 2010-02-03 Update: Olivier JULLIEN - 2010-06-15 - improvement + Update: Olivier JULLIEN - 2010-09-01 - improvement The 'PBRaiders desktop browser style sheet' is released under: private licence. The logos 'PBRaiders' are under copyrights. W3C: This document was successfully checked as CSS level 3! @@ -54,7 +55,7 @@ fieldset legend.legendmain{font-weight:700;} .inputText,.inputTextS,.inputSelect,.inputParam{margin:2px;} .inputText,.inputTextS,.inputTextarea,.inputRadio,.inputSelect,.inputButton,.inputParam{font-size:1em;} .inputText,.inputTextarea{width:95%;} -.inputButton{font-weight:700;} +.inputButton{font-weight:700;width:113px;} .fieldsetformgroup{float:left;width:33%;} .graph{height:470px;overflow:auto;white-space:nowrap;overflow-y:hidden;} /** LIST **/ diff --git a/src/day.php b/src/day.php index 458509c..518a8e9 100644 --- a/src/day.php +++ b/src/day.php @@ -39,7 +39,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/dayprint.php b/src/dayprint.php index 3478f9c..5e26664 100644 --- a/src/dayprint.php +++ b/src/dayprint.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/graphs.php b/src/graphs.php index 481400c..8b52f62 100644 --- a/src/graphs.php +++ b/src/graphs.php @@ -37,7 +37,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__)); /** Include config diff --git a/src/graphs/agesyearcount.php b/src/graphs/agesyearcount.php index d682ca2..7d120df 100644 --- a/src/graphs/agesyearcount.php +++ b/src/graphs/agesyearcount.php @@ -37,7 +37,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); diff --git a/src/graphs/arrhesyearcount.php b/src/graphs/arrhesyearcount.php index 0b3db54..8e1083d 100644 --- a/src/graphs/arrhesyearcount.php +++ b/src/graphs/arrhesyearcount.php @@ -37,7 +37,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); diff --git a/src/graphs/contactsmonthcount.php b/src/graphs/contactsmonthcount.php index 3167907..37dd6c8 100644 --- a/src/graphs/contactsmonthcount.php +++ b/src/graphs/contactsmonthcount.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); @@ -137,4 +137,4 @@ *****************/ unset( $pGraph, $pCCSV); include(PBR_PATH.'/includes/init/clean.php'); -?> \ No newline at end of file +?> diff --git a/src/graphs/contactsyearcount.php b/src/graphs/contactsyearcount.php index 4ddd1d9..d4cd16d 100644 --- a/src/graphs/contactsyearcount.php +++ b/src/graphs/contactsyearcount.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); @@ -133,4 +133,4 @@ *****************/ unset( $pGraph, $pCCSV); include(PBR_PATH.'/includes/init/clean.php'); -?> \ No newline at end of file +?> diff --git a/src/graphs/rentsmonthcount.php b/src/graphs/rentsmonthcount.php index cc50a18..69b4418 100644 --- a/src/graphs/rentsmonthcount.php +++ b/src/graphs/rentsmonthcount.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); @@ -137,4 +137,4 @@ *****************/ unset( $pGraph, $pCCSV); include(PBR_PATH.'/includes/init/clean.php'); -?> \ No newline at end of file +?> diff --git a/src/graphs/rentsmonthsum.php b/src/graphs/rentsmonthsum.php index 5276a08..992f638 100644 --- a/src/graphs/rentsmonthsum.php +++ b/src/graphs/rentsmonthsum.php @@ -37,7 +37,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); diff --git a/src/graphs/rentsyearcount.php b/src/graphs/rentsyearcount.php index 8603170..fe0cd2b 100644 --- a/src/graphs/rentsyearcount.php +++ b/src/graphs/rentsyearcount.php @@ -38,7 +38,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); diff --git a/src/graphs/rentsyearsum.php b/src/graphs/rentsyearsum.php index d7a4451..7fc8ec4 100644 --- a/src/graphs/rentsyearsum.php +++ b/src/graphs/rentsyearsum.php @@ -37,7 +37,7 @@ /** Defines **********/ - define('PBR_VERSION','1.2.0'); + define('PBR_VERSION','1.2.1'); define('PBR_PATH',dirname(__FILE__).'/..'); define('PBR_FONT_PATH',dirname(__FILE__)); @@ -133,4 +133,4 @@ *****************/ unset( $pGraph, $pCCSV); include(PBR_PATH.'/includes/init/clean.php'); -?> \ No newline at end of file +?> diff --git a/src/images/pbrmid.png b/src/images/pbrmid.png index 6b2c983..ead934e 100644 Binary files a/src/images/pbrmid.png and b/src/images/pbrmid.png differ diff --git a/src/includes-install/database/data-config.sql b/src/includes-install/database/data-config.sql index c590ccb..7d3c1ac 100644 --- a/src/includes-install/database/data-config.sql +++ b/src/includes-install/database/data-config.sql @@ -33,7 +33,7 @@ USE `_PBR_DB_DBN_`; -- ----------------------------------------------------- SET AUTOCOMMIT=0; INSERT INTO `config` (`name`,`value`,`role`) VALUES -('data_version','1.2.0-SD',10), +('data_version','1.2.0',10), ('max_rent_1','300',10), ('max_rent_2','300',10), ('max_rent_3','300',10), diff --git a/src/includes-install/database/schema.sql b/src/includes-install/database/schema.sql index c9f8a4f..f91182b 100644 --- a/src/includes-install/database/schema.sql +++ b/src/includes-install/database/schema.sql @@ -124,6 +124,7 @@ CREATE INDEX `fk_contact_user_update` ON `_PBR_DB_DBN_`.`contact` (`update_iduse CREATE INDEX `ix_contact_lastname` ON `_PBR_DB_DBN_`.`contact` (`lastname` ASC) ; +CREATE INDEX `ix_contact_createdate` ON `_PBR_DB_DBN_`.`contact` (`create_date` ASC) ; -- ----------------------------------------------------- -- Table `_PBR_DB_DBN_`.`reservation` @@ -185,6 +186,6 @@ CREATE INDEX `ix_reservation_day` ON `_PBR_DB_DBN_`.`reservation` (`day` ASC) ; -- ----------------------------------------------------- SET AUTOCOMMIT=0; USE `_PBR_DB_DBN_`; -INSERT INTO `config` (`name`, `value`, `role`) VALUES ('schema_version', '1.2.0-SD', 10); +INSERT INTO `config` (`name`, `value`, `role`) VALUES ('schema_version', '1.2.0', 10); COMMIT; diff --git a/src/includes-install/welcome.php b/src/includes-install/welcome.php index 8492974..4c11be9 100644 --- a/src/includes-install/welcome.php +++ b/src/includes-install/welcome.php @@ -38,9 +38,13 @@ * - $sPHPVersion (string) * - $sMYSQLVersion (string) * - $pUser (instance of CUser) + * - $pHeader (instance of CHeader) * author: Olivier JULLIEN - 2010-02-04 + * update: Olivier JULLIEN - 2010-09-01 - HTML 4.01 Strict + * W3C: This document was successfully checked as XHTML 1.0 Strict + * and HTML 4.01 Strict *************************************************************************/ -if( !defined('PBR_VERSION') || !defined('PBR_URL') || !is_array($tMessageCode) || !isset($sPHPVersionRequired) || !isset($sMYSQLVersionRequired) || !isset($sPHPVersion) || !isset($sMYSQLVersion) || !isset($pUser) ) +if( !defined('PBR_VERSION') || !defined('PBR_URL') || !is_array($tMessageCode) || !isset($sPHPVersionRequired) || !isset($sMYSQLVersionRequired) || !isset($sPHPVersion) || !isset($sMYSQLVersion) || !isset($pUser) || !isset($pHeader) ) die('-1'); /** @@ -62,7 +66,7 @@ function BuildMessage($iCode) } elseif($iCode===2) { - $sBuffer.='L'application PBRaiders est déjà installée. Si vous souhaitez la re-installer, vous devez dabord détruire la base de données, effacer le dossier qui contient l'application puis suivre les instructions du fichier lisezmoi.txt.
'; + $sBuffer.='L'application PBRaiders est déjà installée. Si vous souhaitez la re-installer, vous devez d'abord détruire la base de données, effacer le dossier qui contient l'application puis suivre les instructions du fichier lisezmoi.txt.
'; } elseif($iCode===3) { @@ -104,19 +108,19 @@ function BuildMessage($iCode)MYSQL version:
Addresse du serveur:
Nom de la base de données:
-Nom de lutilisateur de la base de données:
+Nom de l'utilisateur de la base de données:
diff --git a/src/includes/class/cheader.php b/src/includes/class/cheader.php index eeccac8..8cb0c35 100644 --- a/src/includes/class/cheader.php +++ b/src/includes/class/cheader.php @@ -41,6 +41,10 @@ * update GetKeyword() * add AcceptXML() * add AnalyseMIMEType() + * update: Olivier JULLIEN - 2010-09-01 - add GetCloseTag() + * add GetBR() + * add GetHR() + * add GetAnchor() *************************************************************************/ if( !defined('PBR_VERSION') ) die('-1'); @@ -325,6 +329,71 @@ public function SetToDefault() $this->m_bPrint = FALSE; $this->m_bAcceptXML = FALSE; } + + /** + * function: GetCloseTag + * description: return the close tag depending of the doctype + * parameter: none + * return: STRING + * author: Olivier JULLIEN - 2010-09-01 + */ + public function GetCloseTag() + { + if( $this->m_bAcceptXML ) + $sReturn = ' />'; + else + $sReturn = '>'; + return $sReturn; + } + + /** + * function: GetBR + * description: return the BR tag depending of the doctype + * parameter: none + * return: STRING + * author: Olivier JULLIEN - 2010-09-01 + */ + public function GetBR() + { + if( $this->m_bAcceptXML ) + $sReturn = 'Connecté en tant que GetUsername(1); ?>