• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP MailForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: XedReplaceForm

 function XedReplaceForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/xed/forms/replace/settings.php');
     $this->widgets['find']->setValue(session_get('xed_source_find'));
     $this->widgets['replace']->setValue(session_get('xed_source_replace'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例2: SiteblogEditForm

 function SiteblogEditForm()
 {
     parent::MailForm();
     global $cgi;
     $refer = $_SERVER['HTTP_REFERER'];
     $this->parseSettings('inc/app/siteblog/forms/edit/settings.php');
     $this->widgets['refer']->setValue($refer);
     //if add is true, we're creating a blog post, otherwise we're editing a blog post
     $add = isset($cgi->_key) && !empty($cgi->_key) ? false : true;
     $this->widgets['status']->setValues(array('Live', 'Not Live'));
     $cats = db_pairs('select id, title from siteblog_category where status = "on"');
     if ($add) {
         page_title('Adding a Blog Post');
         $this->widgets['author']->setValue(session_username());
         unset($this->widgets['icategory']);
         $this->widgets['category']->setValues($cats);
     } else {
         loader_import('cms.Versioning.Rex');
         $rex = new Rex('siteblog_post');
         $document = $rex->getCurrent($cgi->_key);
         page_title('Editing a Blog Post');
         //populate fields
         $this->widgets['subject']->setValue($document->subject);
         $this->widgets['author']->setValue($document->author);
         $this->widgets['status']->setValue($document->status);
         unset($this->widgets['category']);
         $catname = db_shift('select title from siteblog_category where id = ?', $document->category);
         $this->widgets['icategory']->setValue($catname);
         $this->widgets['oldcat']->setValue($document->category);
         $this->widgets['body']->setValue($document->body);
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:32,代码来源:index.old.php


示例3: SitefaqEditForm

    function SitefaqEditForm()
    {
        parent::MailForm();
        global $page, $cgi;
        $this->extra = 'id="cms-edit-form"';
        // get copy from repository
        loader_import('cms.Versioning.Rex');
        $rex = new Rex($cgi->_collection);
        // default: database, database
        $_document = $rex->getCurrent($cgi->_key);
        $widgets = $rex->getStruct();
        if (!$widgets) {
            $widgets = array();
        }
        // edit widgets go here
        $this->widgets = array_merge($this->widgets, $widgets);
        foreach ($this->widgets as $k => $v) {
            if (isset($_document->{$k})) {
                $this->widgets[$k]->setValue($_document->{$k});
            }
        }
        $w =& $this->addWidget('hidden', '_key');
        $w =& $this->addWidget('hidden', '_collection');
        $w =& $this->addWidget('hidden', '_return');
        if ($rex->isVersioned) {
            $t =& $this->addWidget('textarea', 'changelog');
            $t->alt = intl_get('Change Summary');
            $t->rows = 3;
            $t->labelPosition = 'left';
            $t->extra = 'id="changelog"';
        }
        // submit buttons
        $w =& $this->addWidget('msubmit', 'submit_button');
        $b =& $w->getButton();
        $b->setValues(intl_get('Save'));
        $b =& $w->addButton('submit_button', intl_get('Cancel'));
        $b->extra = 'onclick="return cms_cancel (this.form)"';
        $this->error_mode = 'all';
        if ($rex->info['Collection']['singular']) {
            page_title(intl_get('Editing') . ' ' . $rex->info['Collection']['singular'] . ': ' . $_document->{$rex->key});
        } else {
            page_title(intl_get('Editing Item') . ': ' . $_document->{$rex->key});
        }
        // the SiteFAQ additions:
        if (appconf('user_anonymity')) {
            unset($this->widgets['name']);
            unset($this->widgets['email']);
            unset($this->widgets['url']);
            unset($this->widgets['ip']);
            unset($this->widgets['member_id']);
        }
        $admin_roles = session_admin_roles();
        $this->widgets['assigned_to']->setValues(db_pairs('select username, concat(lastname, ", ", firstname, " (", username, ")")
				from sitellite_user
				where role in("' . join('", "', $admin_roles) . '")
				order by lastname, firstname, username'));
        if (!$_document->assigned_to) {
            $this->widgets['assigned_to']->setValue(session_username());
        }
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:60,代码来源:index.php


示例4: SiteglossaryEditForm

    function SiteglossaryEditForm()
    {
        parent::MailForm();
        $this->parseSettings('inc/app/siteglossary/forms/edit/settings.php');
        global $cgi;
        page_title(intl_get('Editing Glossary Term') . ': ' . $cgi->_key);
        page_add_script('
			function cms_cancel (f) {
				if (arguments.length == 0) {
					window.location.href = "/index/cms-app";
				} else {
					if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
						window.location.href = f.elements["_return"].value;
					} else {
						window.location.href = "/index/siteglossary-app";
					}
				}
				return false;
			}
		');
        // add cancel handler
        $this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
        $res = db_single('select * from siteglossary_term where word = ?', $cgi->_key);
        foreach (get_object_vars($res) as $k => $v) {
            $this->widgets[$k]->setValue($v);
        }
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例5: EntryAddForm

 function EntryAddForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/timetracker/forms/entry/add/settings.php');
     $res = db_fetch('select username, firstname, lastname from sitellite_user order by lastname asc');
     if (!$res) {
         $res = array();
     } elseif (is_object($res)) {
         $res = array($res);
     }
     $users = array();
     foreach ($res as $row) {
         if (!empty($row->lastname)) {
             $users[$row->username] = $row->lastname;
             if (!empty($row->firstname)) {
                 $users[$row->username] .= ', ' . $row->firstname;
             }
             $users[$row->username] .= ' (' . $row->username . ')';
         } else {
             $users[$row->username] = $row->username;
         }
     }
     $this->widgets['users']->setValues($users);
     $this->widgets['users']->setDefault(session_username());
     $this->widgets['users']->addRule('not empty', 'You must select at least one user.');
     $this->widgets['started']->setDefault(date('Y-m-d H:i:s'));
     $this->widgets['ended']->setDefault(date('Y-m-d H:i:s'));
     global $cgi;
     $this->widgets['proj_name']->setValue(db_shift('select name from timetracker_project where id = ?', $cgi->project));
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="history.go (-1); return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php


示例6: SiteblogBrowseForm

 function SiteblogBrowseForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/siteblog/forms/browse/settings.php');
     echo '<h2> Search for Posts </h2>';
     $years = array();
     $years[] = 'All Years';
     $currYear = date('Y');
     for ($i = 2000; $i <= $currYear + 1; $i++) {
         $years[$i] = $i;
     }
     $months = array(0 => 'All Months', 1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December');
     $authors[] = 'All Users';
     foreach (db_shift_array('select distinct author from siteblog_post') as $a) {
         $authors[$a] = $a;
     }
     $cats = db_fetch_array('select * from siteblog_category');
     $newcats = array();
     foreach ($cats as $c) {
         $newcats[$c->id] = $c->title;
     }
     $this->widgets['author']->setValues($authors);
     $this->widgets['month']->setValues($months);
     $this->widgets['year']->setValues($years);
     $this->widgets['category']->setValues($newcats);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:index.php


示例7: UsradmCacheForm

    function UsradmCacheForm()
    {
        parent::MailForm(__FILE__);
        page_add_style('
			td.label {
				width: 200px;
			}
			td.field {
				padding-left: 7px;
				padding-right: 7px;
			}
		');
        $cache = ini_parse('inc/conf/cache.php');
        foreach ($cache['Cache'] as $k => $v) {
            $this->widgets[$k]->setValue($v);
        }
        $cacheable = '';
        foreach ($cache['Cacheable'] as $k => $v) {
            if (in_array($k, $this->ignore)) {
                continue;
            }
            if ($v) {
                $cacheable .= $k . " = yes\n";
            } else {
                $cacheable .= $k . " = no\n";
            }
        }
        $this->widgets['cacheable']->setValue($cacheable);
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:29,代码来源:index.php


示例8: SiteblogPropertiesForm

 function SiteblogPropertiesForm()
 {
     parent::MailForm();
     global $cgi;
     if (empty($cgi->blog)) {
         return;
     }
     $this->parseSettings('inc/app/siteblog/forms/properties/settings.php');
     page_title('Editing Category Properties: ' . $cgi->blog);
     $category = db_single('select * from siteblog_category where id = ?', $cgi->blog);
     $set = array();
     if ($category->comments == 'on') {
         $set[] = 'Enable Comments';
     }
     if ($category->poster_visible == 'yes') {
         $set[] = 'Author Visible';
     }
     if ($category->display_rss == 'yes') {
         $set[] = 'Include RSS Links';
     }
     if ($category->status == 'on') {
         $set[] = 'Enabled';
     }
     $this->widgets['blog_properties']->setValue($set);
     $this->widgets['blog']->setValue($cgi->blog);
     $this->widgets['refer']->setValue($_SERVER['HTTP_REFERER']);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例9: CmsMessagesCategoryEditForm

 function CmsMessagesCategoryEditForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/cms/forms/messages/category/edit/settings.php');
     global $cgi;
     $this->widgets['name']->setDefault($cgi->category);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例10: AppdocTranslationAddForm

 function AppdocTranslationAddForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/appdoc/forms/translation/add/settings.php');
     page_title(intl_get('Add Language'));
     global $cgi;
     if ($cgi->appname == 'GLOBAL') {
         $this->_file = 'inc/lang/languages.php';
     } else {
         $this->_file = 'inc/app/' . $cgi->appname . '/lang/languages.php';
     }
     $list = array('no' => 'None');
     $info = ini_parse($this->_file);
     foreach ($info as $k => $v) {
         $list[$k] = $v['name'];
     }
     $this->widgets['fallback']->setValues($list);
     $this->widgets['default']->setValues(array('yes' => 'Yes', 'no' => 'No'));
     if (count($list) == 1) {
         $this->widgets['default']->setDefault('yes');
     } else {
         $this->widgets['default']->setDefault('no');
     }
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="window.history.go (-1); return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:index.php


示例11: SitepresenterEditSlideForm

    function SitepresenterEditSlideForm()
    {
        parent::MailForm();
        $this->parseSettings('inc/app/sitepresenter/forms/edit/slide/settings.php');
        page_add_script('
			function cms_cancel (f) {
				if (arguments.length == 0) {
					window.location.href = "/index/cms-app";
				} else {
					if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
						window.location.href = f.elements["_return"].value;
					} else {
						window.location.href = "/index/sitepresenter-app";
					}
				}
				return false;
			}
		');
        $this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
        global $cgi;
        page_title(intl_get('Adding Slide to Presentation') . ': ' . db_shift('select title from sitepresenter_presentation where id = ?', $cgi->presentation));
        $res = db_single('select * from sitepresenter_slide where id = ?', $cgi->id);
        foreach (get_object_vars($res) as $k => $v) {
            $this->widgets[$k]->setValue($v);
        }
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:index.php


示例12: SitetemplateNewtplForm

 function SitetemplateNewtplForm()
 {
     parent::MailForm();
     global $cgi;
     $this->parseSettings('inc/app/sitetemplate/forms/newtpl/settings.php');
     if (@file_exists('inc/app/xed/lib/Widget/Linker.php')) {
         $this->link_chooser = true;
     }
     $mode = 'html';
     $name = 'new file';
     $set = $cgi->set_name;
     $sname = $set;
     session_set('imagechooser_path', site_prefix() . '/inc/html/' . $set . '/pix');
     if (@file_exists('inc/html/' . $set . '/config.ini.php')) {
         $info = parse_ini_file('inc/html/' . $set . '/config.ini.php');
         if (isset($info['set_name'])) {
             $sname = $info['set_name'];
         }
     }
     page_title(intl_get('Editing New Template in') . ': ' . $sname);
     $set = str_replace('/' . $mode . '.' . $name . '.' . $ext, '', $cgi->path);
     //$this->widgets['edit_buttons']->data = array ('mode' => strtoupper ($mode), 'name' => ucfirst ($name), 'link_chooser' => $this->link_chooser);
     //$this->widgets['body']->setValue (join ('', file ('inc/html/' . $sname)));
     $this->widgets['submit_buttons']->data = array('set' => $set);
     $this->widgets['path']->setValue($set);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:index.php


示例13: EditForm

 function EditForm()
 {
     parent::MailForm();
     global $cgi, $_helpdoc;
     $this->addWidget('hidden', 'appname');
     $this->addWidget('hidden', 'lang');
     $this->addWidget('hidden', 'helpfile');
     $w =& $this->addWidget('text', 'filename');
     $w->alt = intl_get('File Name (ie. 001-about-myApp)');
     $w->addRule('not empty', intl_get('You must specify a file name.'));
     $w->addRule('not contains ".."', intl_get('Your file name contains invalid characters.'));
     $w->setValue($cgi->helpfile);
     $w =& $this->addWidget('text', 'title');
     $w->alt = intl_get('Title');
     $w->addRule('not empty', intl_get('You must specify a title.'));
     $w->setValue($_helpdoc->title);
     session_set('imagechooser_path', 'inc/app/' . $cgi->appname . '/pix');
     $this->extra = 'onsubmit="xed_copy_value (this, \'body\')"';
     $w =& $this->addWidget('xed.Widget.Xeditor', 'body');
     $w->setValue($_helpdoc->body);
     $w =& $this->addWidget('msubmit', 'submit_button');
     $b =& $w->getButton();
     $b->setValues(intl_get('Save'));
     $b =& $w->addButton('submit_button');
     $b->setValues(intl_get('Cancel'));
     $b->extra = 'onclick="window.location.href = \'' . site_prefix() . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang . '\'; return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例14: SitetemplateEditsetForm

 function SitetemplateEditsetForm()
 {
     parent::MailForm();
     global $cgi;
     $set = $cgi->set;
     $this->parseSettings('inc/app/sitetemplate/forms/editset/settings.php');
     $settings = array();
     if (file_exists('inc/html/' . $set . '/config.ini.php')) {
         $settings = ini_parse('inc/html/' . $set . '/config.ini.php', false);
     }
     $name = $settings['set_name'];
     if (!$name) {
         $name = $set;
     }
     $settings['set'] = $set;
     //put form values into respective forms
     foreach ($settings as $k => $v) {
         $this->widgets[$k]->setDefault($v);
     }
     if (@file_exists('inc/html/' . $set . '/modes.php')) {
         $this->widgets['modes']->setDefault(@join('', @file('inc/html/' . $set . '/modes.php')));
     } else {
         $this->widgets['modes']->setDefault($modesd);
     }
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="history.go (-1); return false"';
     page_title(intl_get('Editing Properties') . ': ' . $name);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例15: DeadlinesAddForm

 function DeadlinesAddForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/deadlines/forms/add/settings.php');
     page_title('Deadlines - Add Item');
     $this->widgets['ts']->setDefault(date('Y-m-d H:i:s'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例16: BoxchooserSettingsForm

 function BoxchooserSettingsForm()
 {
     parent::MailForm();
     page_title(intl_get('Box Settings'));
     //set(array('title'=>'Add a Box'));
     global $cgi;
     //set
     if (!$cgi->box) {
         echo 'Missing parameter: box';
         exit;
     }
     ini_add_filter('ini_filter_split_comma_single', array('rule 0', 'rule 1', 'rule 2', 'rule 3', 'rule 4', 'rule 5', 'rule 6', 'rule 7', 'rule 8', 'button 0', 'button 1', 'button 2', 'button 3', 'button 4', 'button 5', 'button 6', 'button 7', 'button 8'));
     $this->_box_settings = ini_parse('inc/app/' . $cgi->app . '/boxes/' . $cgi->box . '/settings.php');
     ini_clear();
     unset($this->_box_settings['Meta']);
     if (count($this->_box_settings) === 0) {
         $this->onSubmit((array) $cgi);
         return;
     }
     foreach ($this->_box_settings as $k => $v) {
         $this->createWidget($k, $v);
     }
     $this->addWidget('hidden', 'app');
     $this->addWidget('hidden', 'box');
     $this->addWidget('hidden', 'name');
     $w =& $this->addWidget('submit', 'sub');
     $w->setValues(intl_get('Done'));
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:28,代码来源:index.php


示例17: SitetemplateEditForm

 function SitetemplateEditForm()
 {
     parent::MailForm();
     global $cgi;
     $this->parseSettings('inc/app/sitetemplate/forms/edit/settings.php');
     if (@file_exists('inc/app/xed/lib/Widget/Linker.php')) {
         $this->link_chooser = true;
     }
     list($set, $tpl) = explode('/', $cgi->path);
     list($mode, $name, $ext) = preg_split('|\\.|', basename($cgi->path));
     if (@file_exists('inc/html/' . $set . '/config.ini.php')) {
         $info = parse_ini_file('inc/html/' . $set . '/config.ini.php');
         if (isset($info['set_name'])) {
             $sname = $info['set_name'];
         } else {
             $sname = $set;
         }
     } else {
         $sname = $set;
     }
     session_set('imagechooser_path', site_prefix() . '/inc/html/' . $set . '/pix');
     page_title(intl_get('Editing Template') . ': ' . $sname . ' / ' . strtoupper($mode) . ' / ' . ucfirst($name));
     $set = str_replace('/' . $mode . '.' . $name . '.' . $ext, '', $cgi->path);
     $this->widgets['edit_buttons']->data = array('mode' => strtoupper($mode), 'name' => ucfirst($name), 'link_chooser' => $this->link_chooser);
     $this->widgets['body']->setValue(join('', file('inc/html/' . $cgi->path)));
     $this->widgets['submit_buttons']->data = array('set' => $set);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php


示例18: DevtoolsTplForm

 function DevtoolsTplForm()
 {
     parent::MailForm();
     $this->parseSettings('inc/app/devtools/forms/tpl/settings.php');
     page_title(intl_get('Create a New Template Set'));
     $this->widgets['submit_button']->buttons[1]->extra = 'onclick="window.location.href = \'' . site_prefix() . '/index/devtools-app\'; return false"';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例19: SitepresenterAddForm

    function SitepresenterAddForm()
    {
        parent::MailForm();
        global $page, $cgi;
        $this->parseSettings('inc/app/sitepresenter/forms/add/settings.php');
        page_title(intl_get('Adding Presentation'));
        loader_import('ext.phpsniff');
        $sniffer = new phpSniff();
        $this->_browser = $sniffer->property('browser');
        // include formhelp, edit panel init, and cancel handler
        page_add_script(site_prefix() . '/js/formhelp.js');
        page_add_script(CMS_JS_FORMHELP_INIT);
        page_onload('cms_init_edit_panels ()');
        page_add_script('
			function cms_cancel (f) {
				if (arguments.length == 0) {
					window.location.href = "/index/cms-app";
				} else {
					if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
						window.location.href = f.elements["_return"].value;
					} else {
						window.location.href = "/index/sitepresenter-app";
					}
				}
				return false;
			}
		');
        // add cancel handler
        $this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:30,代码来源:index.php


示例20: SiteblogCommentForm

 function SiteblogCommentForm()
 {
     parent::MailForm();
     global $cgi;
     $this->parseSettings('inc/app/siteblog/forms/comment/settings.php');
     if (isset($cgi->_key) && !empty($cgi->_key)) {
         //edit a comment
         page_title('Editing Comment');
         $comment = db_single('select * from siteblog_comment where id = ?', $cgi->_key);
         $this->widgets['name']->setValue($comment->author);
         $this->widgets['email']->setValue($comment->email);
         $this->widgets['url']->setValue($comment->url);
         $this->widgets['body']->setValue($comment->body);
     } elseif (!isset($cgi->post)) {
         header('Location: ' . site_prefix() . '/index');
         exit;
     } else {
         if (session_valid()) {
             $this->widgets['name']->setValue(session_username());
             $user = session_get_user();
             $this->widgets['email']->setValue($user->email);
             $this->widgets['url']->setValue($user->website);
         }
         $this->widgets['post']->setValue($cgi->post);
         //page_title ('Post a Comment');
     }
     if (!appconf('comments_security')) {
         unset($this->widgets['security_test']);
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:30,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP MailTemplate类代码示例发布时间:2022-05-23
下一篇:
PHP MailChimp类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap