[ Index ] |
|
Code source de phpMyVisites 2.3 |
1 <?php 2 /* 3 * phpMyVisites : website statistics and audience measurements 4 * Copyright (C) 2002 - 2006 5 * http://www.phpmyvisites.net/ 6 * phpMyVisites is free software (license GNU/GPL) 7 * Authors : phpMyVisites team 8 */ 9 10 // $Id: FormSiteUrls.class.php 29 2006-08-18 07:35:21Z matthieu_ $ 11 12 13 14 require_once INCLUDE_PATH . "/core/forms/Form.class.php"; 15 require_once INCLUDE_PATH . "/core/include/SiteConfigDb.class.php"; 16 17 class FormSiteUrls extends Form 18 { 19 var $a_urls; 20 21 function FormSiteUrls( &$template, $siteAdmin ) 22 { 23 parent::Form( $template ); 24 25 $this->siteAdmin = $siteAdmin; 26 27 $o_site = new Site( $siteAdmin ); 28 29 $this->a_urls = $o_site->getUrls(); 30 31 } 32 33 function process() 34 { 35 // general input 36 $formElements = array(); 37 38 for($i = 0; $i < NB_URLS_ALIAS_AVAILABLE; $i++) 39 { 40 $formElements[] = array('text', 41 'form_url'.$i, 42 sprintf($GLOBALS['lang']['admin_url_n'], $i), 43 'value="'. @$this->a_urls[$i] .'"'); 44 $formRules[] = $this->getRuleCheckUrl( 'form_url'.$i ); 45 } 46 $this->addElements( $formElements ); 47 48 $this->addRules( $formRules ); 49 50 // launche process 51 return parent::process( 'admin_alias_title'); 52 } 53 54 function postProcess() 55 { 56 57 for($i = 0; $i < NB_URLS_ALIAS_AVAILABLE; $i++) 58 { 59 $a_urls[] = array( $this->siteAdmin, databaseEscape($this->getSubmitValue('form_url'.$i))); 60 } 61 62 $confSite = new SiteConfigDb(); 63 $confSite->setUrls( $a_urls, $this->siteAdmin ); 64 65 } 66 } 67 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |