当前位置: 首页>>代码示例>>PHP>>正文


PHP pathos_lang_loadDictionary函数代码示例

本文整理汇总了PHP中pathos_lang_loadDictionary函数的典型用法代码示例。如果您正苦于以下问题:PHP pathos_lang_loadDictionary函数的具体用法?PHP pathos_lang_loadDictionary怎么用?PHP pathos_lang_loadDictionary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pathos_lang_loadDictionary函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 function update($name, $dest, $object, $destname = null)
 {
     pathos_lang_loadDictionary('modules', 'filemanager');
     if (!defined('SYS_FILES')) {
         require_once BASE . 'subsystems/files.php';
     }
     $err = sprintf(TR_FILEMANAGER_CANTUPLOAD, $object->filename) . '<br />';
     switch ($_FILES[$name]['error']) {
         case UPLOAD_ERR_OK:
             // Everything looks good.  Continue with the update.
             break;
         case UPLOAD_ERR_INI_SIZE:
         case UPLOAD_ERR_FORM_SIZE:
             // This is a tricky one to catch.  If the file is too large for POST, then the script won't even run.
             // But if its between post_max_size and upload_file_max_size, we will get here.
             return $err . TR_FILEMANAGER_FILETOOLARGE;
         case UPLOAD_ERR_PARTIAL:
             return $err . TR_FILEMANAGER_PARTIALFILE;
         case UPLOAD_ERR_NO_FILE:
             return $err . TR_FILEMANAGER_NOFILEUPLOADED;
         default:
             return $err . TR_FILEMANAGER_UNKNOWNERROR;
             break;
     }
     $object->mimetype = $_FILES[$name]['type'];
     if ($destname == null) {
         $object->filename = $_FILES[$name]['name'];
     } else {
         $object->filename = $destname;
     }
     // General error message.  This will be made more explicit later on.
     $object->filename = pathos_files_fixName($object->filename);
     if (file_exists(BASE . $dest . '/' . $object->filename)) {
         echo sprintf(TR_FILEMANAGER_FILEEXISTS, $object->filename);
         return null;
     }
     pathos_files_moveUploadedFile($_FILES[$name]['tmp_name'], BASE . $dest . '/' . $object->filename);
     if (!file_exists(BASE . $dest . '/' . $object->filename)) {
         echo sprintf(TR_FILEMANAGER_CANTUPLOAD, $object->filename);
         return null;
     }
     $object->directory = $dest;
     $object->accesscount = 0;
     $object->filesize = $_FILES[$name]['size'];
     $object->posted = time();
     global $user;
     if ($user) {
         $object->poster = $user->id;
     }
     $object->last_accessed = time();
     $object->is_image = 0;
     // Get image width and height:
     $size = @getimagesize(BASE . $object->directory . '/' . $object->filename);
     if ($size !== false) {
         $object->is_image = 1;
         $object->image_width = $size[0];
         $object->image_height = $size[1];
     }
     return $object;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:60,代码来源:file.php

示例2: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'newsmodule');
     global $user;
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->internal_name = '';
         $object->body = '';
         $object->publish = null;
         $object->unpublish = null;
     } else {
         $form->meta('id', $object->id);
         if ($object->publish == 0) {
             $object->publish = null;
         }
         if ($object->unpublish == 0) {
             $object->unpublish = null;
         }
     }
     $form->register('title', TR_NEWSMODULE_HEADLINE, new textcontrol($object->title));
     $form->register('internal_name', 'Internal Name', new textcontrol($object->internal_name));
     $form->register('body', TR_NEWSMODULE_BODY, new htmleditorcontrol($object->body));
     $form->register('publish', TR_NEWSMODULE_PUBLISH, new popupdatetimecontrol($object->publish, TR_NEWSMODULE_NOPUBLISH));
     $form->register('unpublish', TR_NEWSMODULE_UNPUBLISH, new popupdatetimecontrol($object->unpublish, TR_NEWSMODULE_NOUNPUBLISH));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:33,代码来源:newsitem.php

示例3: form

 function form($object)
 {
     pathos_lang_loadDictionary('modules', 'contactmodule');
     pathos_lang_loadDictionary('standard', 'core');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->subject = 'Email Communication From Site';
         $object->replyto_address = '';
         $object->from_name = 'Webmaster';
         $object->from_address = 'info@' . HOSTNAME;
         $object->final_message = 'Thank you for your submission.';
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('subject', TR_CONTACTMODULE_MESSAGETITLE, new textcontrol($object->subject));
     $form->register('from_name', TR_CONTACTMODULE_FROMNAME, new textcontrol($object->from_name));
     $form->register('from', TR_CONTACTMODULE_FROMADDRESS, new textcontrol($object->from_address));
     $form->register('replyto', TR_CONTACTMODULE_REPLYTO, new textcontrol($object->replyto_address));
     $form->register('final_message', 'Confirmation Message', new htmleditorcontrol($object->final_message));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:26,代码来源:contactmodule_config.php

示例4: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'weblogmodule');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->internal_name = '';
         $object->body = '';
         global $user;
         $object->poster = $user->id;
         $object->is_private = 0;
         $object->is_draft = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('title', TR_WEBLOGMODULE_TITLE, new textcontrol($object->title));
     $form->register('internal_name', 'Internal Name', new textcontrol($object->internal_name));
     $form->register('body', TR_WEBLOGMODULE_BODY, new htmleditorcontrol($object->body));
     $form->register('is_private', TR_WEBLOGMODULE_ISPRIVATE, new checkboxcontrol($object->is_private, true));
     if ($object->is_draft == 1 || !isset($object->id)) {
         $form->register('is_draft', 'Save as Draft?', new checkboxcontrol($object->is_draft, true));
     }
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:30,代码来源:weblog_post.php

示例5: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'imagemanagermodule');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
         $object->scale = 20;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('name', TR_IMAGEMANAGERMODULE_NAME, new textcontrol($object->name));
     $form->register('description', TR_IMAGEMANAGERMODULE_DESCRIPTION, new texteditorcontrol($object->description));
     if (!isset($object->id)) {
         $form->register('maxsizemsg', '', new htmlcontrol(pathos_core_maxUploadSizeMessage()));
         $form->register('file', TR_IMAGEMANAGERMODULE_IMAGE, new uploadcontrol());
     }
     $form->register('scale', TR_IMAGEMANAGERMODULE_SCALE, new textcontrol($object->scale));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:26,代码来源:imagemanageritem.php

示例6: form

 function form($object)
 {
     if (!defined("SYS_FORMS")) {
         require_once BASE . "subsystems/forms.php";
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = "";
         $object->affiliate_id = 0;
         $object->url = "http://";
     } else {
         $form->meta("id", $object->id);
         global $db;
         $file = $db->selectObject("file", "id=" . $object->file_id);
         $form->register(uniqid(""), "", new htmlcontrol("<img src='" . $file->directory . "/" . $file->filename . "'/>"));
     }
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'bannermodule');
     $affiliates = bannermodule::listAffiliates();
     $form->register('name', TR_BANNERMODULE_INTERNALNAME, new textcontrol($object->name));
     $submit = new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL);
     if (count($affiliates)) {
         $form->register('affiliate_id', TR_BANNERMODULE_AFFILIATE, new dropdowncontrol($object->affiliate_id, $affiliates));
     } else {
         $form->registerBefore('name', null, '', new htmlcontrol('<div class="error">' . TR_BANNERMODULE_NOAFFILIATES . '</div>'));
         $submit->disabled = 1;
     }
     $form->register('url', TR_BANNERMODULE_DESTURL, new texteditorcontrol($object->url, 2, 40));
     $form->register('submit', '', $submit);
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:32,代码来源:banner_ad.php

示例7: show

 function show($view, $loc = null, $title = '')
 {
     $template = new template("imagegallerymodule", $view, $loc);
     if (!defined('SYS_FILES')) {
         require BASE . 'subsystems/files.php';
     }
     $directory = 'files/imagegallerymodule/' . $loc->src;
     if (!file_exists(BASE . $directory)) {
         $err = pathos_files_makeDirectory($directory);
         if ($err != SYS_FILES_SUCCESS) {
             pathos_lang_loadDictionary('modules', 'filemanager');
             $template->assign('noupload', 1);
             $template->assign('uploadError', $err);
         }
     }
     global $db;
     $galleries = $db->selectObjects('imagegallery_gallery', "location_data='" . serialize($loc) . "'");
     $iloc = pathos_core_makeLocation($loc->mod, $loc->src);
     for ($i = 0; $i < count($galleries); $i++) {
         $iloc->int = $galleries[$i]->id;
         $galleries[$i]->permissions = array('edit' => pathos_permissions_check('edit', $iloc), 'delete' => pathos_permissions_check('delete', $iloc));
     }
     $template->assign('galleries', $galleries);
     $template->assign('moduletitle', $title);
     $template->register_permissions(array('administrate', 'create', 'edit', 'delete', 'manage'), $loc);
     $template->output();
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:27,代码来源:class.php

示例8: form

 function form($object)
 {
     pathos_lang_loadDictionary('modules', 'contactmodule');
     pathos_lang_loadDictionary('standard', 'core');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $type = 0;
     $default = 0;
     $form = new form();
     if (!isset($object->id)) {
         $object->user_id = 0;
         $object->addressbook_contact_id = 0;
         $object->email = '';
         $object->contact_info = '';
     } else {
         $form->meta('id', $object->id);
         if ($object->user_id != 0) {
             $type = 0;
             $default = $object->user_id;
         } else {
             $type = 1;
             $default = $object->email;
         }
     }
     $form->register('contact', TR_CONTACTMODULE_CONTACT, new contactcontrol($default, $type));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:30,代码来源:contact_contact.php

示例9: permissions

 function permissions($internal = '')
 {
     pathos_lang_loadDictionary('modules', 'addressbookmodule');
     if ($internal == '') {
         return array('administrate' => TR_ADDRESSBOOKMODULE_PERM_ADMIN, 'configure' => 'Configure', 'post' => TR_ADDRESSBOOKMODULE_PERM_POST, 'edit' => TR_ADDRESSBOOKMODULE_PERM_EDIT, 'delete' => TR_ADDRESSBOOKMODULE_PERM_DELETE);
     } else {
         return array('administrate' => TR_ADDRESSBOOKMODULE_PERM_ADMIN, 'edit' => TR_ADDRESSBOOKMODULE_PERM_EDITONE, 'delete' => TR_ADDRESSBOOKMODULE_PERM_DELETEONE);
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:9,代码来源:class.php

示例10: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'formbuilder');
     global $db;
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->name = '';
         $object->description = '';
         $object->text = '';
         $object->column_names = '';
     }
     $form->register('name', TR_FORMBUILDER_NAME, new textcontrol($object->name));
     $form->register('description', TR_FORMBUILDER_DESCRIPTION, new texteditorcontrol($object->description));
     $form->register(null, '', new htmlcontrol('<br><br>' . TR_FORMBUILDER_BLANKREPORTMSG . '<br><br>'));
     $form->register('text', TR_FORMBUILDER_REPORTDEF, new htmleditorcontrol($object->text));
     $fields = array();
     $column_names = array();
     $cols = array();
     if ($object->column_names != '') {
         $cols = explode('|!|', $object->column_names);
     }
     if (isset($object->form_id)) {
         foreach ($db->selectObjects('formbuilder_control', 'form_id=' . $object->form_id . ' and is_readonly=0') as $control) {
             $ctl = unserialize($control->data);
             $control_type = get_class($ctl);
             $def = call_user_func(array($control_type, 'getFieldDefinition'));
             if ($def != null) {
                 $fields[$control->name] = $control->caption;
                 if (in_array($control->name, $cols)) {
                     $column_names[$control->name] = $control->caption;
                 }
             }
         }
         $fields['ip'] = TR_FORMBUILDER_FIELD_IP;
         if (in_array('ip', $cols)) {
             $column_names['ip'] = TR_FORMBUILDER_FIELD_IP;
         }
         $fields['user_id'] = TR_FORMBUILDER_FIELD_USERNAME;
         if (in_array('user_id', $cols)) {
             $column_names['user_id'] = TR_FORMBUILDER_FIELD_USERNAME;
         }
         $fields['timestamp'] = TR_FORMBUILDER_FIELD_TIMESTAMP;
         if (in_array('timestamp', $cols)) {
             $column_names['timestamp'] = TR_FORMBUILDER_FIELD_TIMESTAMP;
         }
     }
     $form->register('column_names', TR_FORMBUILDER_REPORTCOLS, new listbuildercontrol($column_names, $fields));
     $form->register(null, '', new htmlcontrol('<br><br><br>'));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:56,代码来源:formbuilder_report.php

示例11: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'addressbookmodule');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->firstname = '';
         $object->lastname = '';
         $object->address1 = '';
         $object->address2 = '';
         $object->city = '';
         $object->state = '';
         $object->zip = '';
         $object->country = '';
         $object->email = '';
         $object->phone = '';
         $object->cell = '';
         $object->fax = '';
         $object->pager = '';
         $object->notes = '';
         $object->webpage = '';
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('firstname', TR_ADDRESSBOOKMODULE_FIRSTNAME, new textcontrol($object->firstname));
     $form->register('lastname', TR_ADDRESSBOOKMODULE_LASTNAME, new textcontrol($object->lastname));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('address1', TR_ADDRESSBOOKMODULE_ADDRESS, new textcontrol($object->address1, 30));
     $form->register('address2', TR_ADDRESSBOOKMODULE_ADDRESS2, new textcontrol($object->address2, 30));
     $form->register('city', TR_ADDRESSBOOKMODULE_CITY, new textcontrol($object->city));
     $form->register('state', TR_ADDRESSBOOKMODULE_STATE, new textcontrol($object->state));
     $form->register('zip', TR_ADDRESSBOOKMODULE_ZIPCODE, new textcontrol($object->zip));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('email', TR_ADDRESSBOOKMODULE_EMAIL, new textcontrol($object->email));
     $form->register('webpage', TR_ADDRESSBOOKMODULE_HOMEPAGE, new textcontrol($object->webpage));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('phone', TR_ADDRESSBOOKMODULE_PHONE, new textcontrol($object->phone));
     $form->register('cell', TR_ADDRESSBOOKMODULE_MOBILE, new textcontrol($object->cell));
     $form->register('fax', TR_ADDRESSBOOKMODULE_FAX, new textcontrol($object->fax));
     $form->register('pager', TR_ADDRESSBOOKMODULE_PAGER, new textcontrol($object->pager));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('notes', TR_ADDRESSBOOKMODULE_NOTES, new texteditorcontrol($object->notes, 12, 50));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:50,代码来源:addressbook_contact.php

示例12: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!$object) {
         $object->text = '';
         $form->meta('id', 0);
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('text', '', new htmleditorcontrol($object->text));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:rotator_item.php

示例13: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->sort_type = 'lastname_asc';
     } else {
         $form->meta('id', $object->id);
     }
     $sort = array('lastname_asc' => 'by Last Name, Alphabetical', 'lastname_desc' => 'by Last Name, Reverse Alphabetical', 'firstname_asc' => 'by First Name, Alphabetical', 'firstname_desc' => 'by First Name, Reverse Alphabetical');
     $form->register('sort_type', 'Sort Entries', new dropdowncontrol($object->sort_type, $sort));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:addressbookmodule_config.php

示例14: form

 function form($object)
 {
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'searchmodule');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->is_categorized = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('is_categorized', TR_SEARCHMODULE_CATEGORIZE, new checkboxcontrol($object->is_categorized, true));
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:searchmodule_config.php

示例15: form

 function form()
 {
     pathos_lang_loadDictionary('modules', 'database');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     //Form is created to collect information from the user
     //Values set previously (defaults or user-entered) are displayed
     $form->register('dbengine', TR_DATABASE_DBTYPE, new dropdowncontrol('', pathos_database_backends()));
     $form->register('host', TR_DATABASE_HOST, new textcontrol(DB_HOST));
     $form->register('port', TR_DATABASE_PORT, new textcontrol(DB_PORT));
     $form->register('dbname', TR_DATABASE_DBNAME, new textcontrol(''));
     $form->register('username', TR_DATABASE_USER, new textcontrol(DB_USER));
     $form->register('pwd', TR_DATABASE_PWD, new passwordcontrol(''));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:18,代码来源:database_importer.php


注:本文中的pathos_lang_loadDictionary函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。