예제 #1
0
 /**
  * creates the html of the whole page, localizes the HTML
  * @return string html of page
  * @uses innerCreate() used to create the actual content of the page
  * @global string additional footer info of page
  */
 function create()
 {
     $l = Localizer::getSingleton();
     return $l->translateHTML($this->delegate->create($this));
 }
 /**
  * create the personal options options form, using the {@link TableEditor}
  * 
  * {@link TableEditor} is able to handle saving of the data himself
  * @uses TableEditor
  * @return string html-content
  * @global array country acronyms and names
  * @global DB used for database access
  */
 function createOptionsForm()
 {
     global $country, $db;
     $cont = '<fieldset class="options-options">';
     $cont .= '<legend>Change your options</legend>';
     $tEdit = new TableEditor($db, TABLE_USERS, 'userid', array('id' => 'hidden', 'usertype' => 'hidden', 'password' => 'hidden', 'reg_email' => 'hidden', 'confirm_hash' => 'hidden', 'lastLogin' => 'hidden', 'limitEntries' => 'text-5', 'bdayDisplay' => array('NULL' => 'default', '0' => 'no', '1' => 'yes'), 'bdayInterval' => 'text-3', 'telURI' => 'text-30', 'faxURI' => 'text-30', 'language' => array_merge(array('NULL' => 'autodetect'), Localizer::getSingleton()->availableLanguages()), 'useMailScript' => 'hidden', 'failedLogins' => 'hidden', 'lastRemoteIP' => 'hidden'), array('limitEntries' => 'Main list: limit entries per page', 'bdayInterval' => 'Main list: display dates and recently changed contacts n days back', 'bdayDisplay' => 'Main list: display dates', 'telURI' => 'URI: Replace tel: (e.g. skype:$?call)', 'faxURI' => 'URI: Replace fax: (e.g. sip:$@sip.com:5060)', 'language' => 'User interface language', 'useMailScript' => 'Users can send email with a web interface from the server (not supported in 3.0)'), 'SELECT * FROM ' . TABLE_USERS . ' WHERE userid = ' . ($this->user !== null ? $db->escape($this->user->id) : $_SESSION['user']->id), 'text', true, $this->user !== null ? 'userid=' . $this->user->id : '');
     $cont .= $tEdit->create('', '');
     $cont .= '</fieldset>';
     return $cont;
 }
 /**
  * create the options form, using the {@link TableEditor}
  * 
  * {@link TableEditor} is able to handle saving of the data himself
  * @uses TableEditor
  * @return string html-content
  * @global array country acronyms and names
  * @global DB used for database access
  */
 function createOptionsForm()
 {
     global $country, $db, $CONFIG_INSTALL_SUBDIR;
     $x = PageAdminPanel::scanSubdirectories($CONFIG_INSTALL_SUBDIR . 'styles');
     $styles = array();
     foreach ($x as $q) {
         $styles[$q] = $q;
     }
     $cont = '<fieldset class="options-options">';
     $cont .= '<legend>Change Global Options</legend>';
     $tEdit = new TableEditor($db, TABLE_OPTIONS, 'optID', array('optID' => 'hidden', 'interfaceStyle' => $styles, 'requireLogin' => array('0' => 'no', '1' => 'yes'), 'msgLogin' => 'textarea-4-30', 'allowUserReg' => array('no' => 'no', 'everyone' => 'allow for everyone', 'contactOnly' => 'only allow for contacts', 'contactOnlyNoConfirm' => 'only allow for contacts, no confirmation'), 'msgWelcome' => 'textarea-4-30', 'defaultGroup' => 'text-30', 'limitEntries' => 'text-5', 'autocompleteLimit' => 'text-3', 'bdayDisplay' => array('0' => 'no', '1' => 'yes'), 'recentlyChangedDisplay' => array('0' => 'no', '1' => 'yes'), 'recentlyChangedLimit' => 'text-3', 'bdayInterval' => 'text-3', 'picAlwaysDisplay' => array('0' => 'no', '1' => 'yes'), 'picWidth' => 'text-5', 'picHeight' => 'text-5', 'deleteTrashMode' => array('0' => 'no', '1' => 'yes'), 'picAllowUpload' => array('0' => 'no', '1' => 'yes'), 'picCrop' => array('0' => 'Resize', '1' => 'Resize and Crop', '2' => 'Resize and Fit'), 'picForceWidth' => array('0' => 'no', '1' => 'yes'), 'picForceHeight' => array('0' => 'no', '1' => 'yes'), 'countryDefault' => $country, 'language' => array_merge(array('NULL' => 'autodetect'), Localizer::getSingleton()->availableLanguages()), 'eMailAdmin' => array('0' => 'no', '1' => 'yes'), 'adminEmailSubject' => 'text-40', 'adminEmailFooter' => 'textarea-4-30', 'administrativeLock' => array('0' => 'no', '1' => 'yes'), 'telURI' => 'hidden', 'faxURI' => 'hidden', 'TABversion' => 'hidden', 'useMailScript' => array('0' => 'no', '1' => 'yes')), array('interfaceStyle' => 'User interface: CSS style', 'bdayDisplay' => 'Main list: display dates', 'recentlyChangedDisplay' => 'Main list: display recently changed contacts', 'recentlyChangedLimit' => 'Main list: maximum number for recently changed contacts and dates', 'bdayInterval' => 'Main list: display dates/recently changed contacts n days forward/backward', 'limitEntries' => 'Main list: limit entries per page', 'autocompleteLimit' => 'Main list: maximum number of autocomplete search results', 'msgWelcome' => 'Main list: welcome message', 'defaultGroup' => 'Main list: default group', 'picAlwaysDisplay' => 'Contact: always display picture', 'picWidth' => 'Contact: picture width', 'picHeight' => 'Contact: picture height', 'picForceWidth' => 'Contact: force picture width by html', 'picForceHeight' => 'Contact: force picture height by html', 'deleteTrashMode' => 'Edit: trash mode (only admin deletes contacts permanently)', 'countryDefault' => 'Edit: default country', 'picAllowUpload' => 'Edit: allow picture upload', 'picCrop' => 'Edit: picture clip mode', 'picDupeMode' => 'Edit: duplicate picture mode', 'msgLogin' => 'Login: login message', 'allowUserReg' => 'Login: allow self registration', 'requireLogin' => 'Login: require login to access contacts', 'eMailAdmin' => 'Login: BCC email to all admins upon self registration (admin can confirm)', 'useMailScript' => 'Users can send email with a web interface from the server (feature will be dropped if not in demand - post to discussion forums if you need this)', 'language' => 'User interface language', 'adminEmailSubject' => 'ADMIN: email subject', 'adminEmailFooter' => 'ADMIN: email signature', 'administrativeLock' => 'ADMIN: lock modifications (edit and delete)'), null, 'text', true);
     $cont .= $tEdit->create('', '');
     $cont .= '</fieldset>';
     return $cont;
 }