public function Form() { if ($this->setting['title'] == null) { $title = _lg('Link generator'); } else { $title = $this->setting['title']; } if ($this->setting['type'] == null) { $type = null; } else { $type = $this->setting['type']; } if ($this->setting['id'] == null) { $id = null; } else { $id = $this->setting['id']; } // $result = 'title:<input type="text" name="title" value="' . $title . '" />'; // $result .= 'type:<select>' // . '<option value="0" > category </option>' // . '<option value="1" > tag </option>' // . '<option value="2" > topic </option>' // . '</select>'; // $result .= 'id:<input type="text" id="autocomp" />'; // $result .= '<input type="hidden" name="id" value="' . $id . '" />'; // $result .= 'id:<input type="submit" value="save" />'; $form = new TForm(); $form->AddField('select', 'title', $type, array('name' => 'type'), array(0 => array('0', 'category'), 1 => array('1', 'tag'), 2 => array('2', 'topic'))); $form->AddField('text', 'title', $title, array('class' => 'autocomplete', 'name' => 'title')); $form->AddField('hidden', '', $id, array('name' => 'id', 'class' => 'hidden')); $form->AddField('submit', '', _lg('save')); return $form->FormBody(); }
public function Form() { $form = new TForm(); if ($this->setting['title'] == null) { $title = _lg('Simple Text widget title'); } else { $title = $this->setting['title']; } $form->AddField('text', _lg('title'), $title, array('name' => 'title')); $form->AddField('submit', '', _lg('send')); $result = $form->FormBody(); return $result; }
<?php global $MANAGER_TYPE; $frm = new TForm(UR_MP . 'Manager/Insert', 'post', array('class' => 'form')); $frm->AddField('text', 'نام کاربری', null, array('name' => 'manager_username')); $frm->AddField('email', 'ایمیل', null, array('name' => 'manager_email')); $frm->AddField('password', 'گذرواژه', null, array('name' => 'manager_password')); $frm->AddField('text', 'نام نمایشی', null, array('name' => 'manager_displayname')); $frm->AddField('select', 'نوع', null, array('name' => 'manager_type'), $MANAGER_TYPE); $frm->AddField('checkbox', 'محاظت شده', 1, array('name' => 'manager_protected')); $frm->AddField('submit', '', 'ارسال'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <div class="row"> <div class="grd-primary"> <?php $frm->Render(); ?> </div> <div class="grd-secondary"> </div>
$listview->AddColum(_lg('plugin author'), 'plugin_author', 10); $listview->SetPattern(1, '<img src="' . UR_MP_ASSETS . 'images/active%s.png" alt="[plugin status]" />'); $listview->AddColum(_lg('status'), '%1plugin_status', 2); $listview->AddColum('', 'plugin_discrption', 16); $pattern = '<a class="button delete" href="' . UR_MP . 'Plugin/Delete/%id%"> ' . _lg('Delete') . ' </a> <a class="button active" href="' . UR_MP . 'Plugin/Status/%id%/1"> ' . _lg('Active') . ' </a> <a class="button deactive" href="' . UR_MP . 'Plugin/Status/%id%/0"> ' . _lg('Deactive') . '</a>'; $listview->AddAction($pattern, 6, 'plugin_status'); $listview->AddFilter(_lg('Deactived'), 'plugin_status', '0'); $listview->AddFilter(_lg('Actived'), 'plugin_status', '1'); $listview->AddBulkAcction(_lg('Deactive'), 'Edit', 'plugin_status,0'); $listview->AddBulkAcction(_lg('Active'), 'Edit', 'plugin_status,1'); $listview->AddBulkAcction(_lg('Delete'), 'Delete', null); $listview->Render('Plugin'); $frm = new TForm(UR_MP . 'Plugin/upload'); $frm->AddField('file', _lg('zip file'), null, array('name' => 'file')); $frm->AddField('submit', '', _lg('Upload')); ?> <br /> <div style="background: #1392e9;padding:1em;margin:1em;"> <h2> <?php _lp('Upload new plugin'); ?> </h2> <br /> <?php $frm->Render(); ?> </div>
<?php $frm = new TForm(UR_MP . 'Member/Insert', 'post', array('class' => 'form rtl')); $frm->AddField('text', 'نام', null, array('name' => 'member_name')); $frm->AddField('email', 'ایمیل', null, array('name' => 'member_email')); $frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password')); $frm->AddField('text', 'استاتوس', null, array('name' => 'member_status')); $frm->AddField('text', 'زمان تمدید', null, array('name' => 'member_active_time', 'class' => _lg('datepicker'))); $frm->AddField('file', 'آواتار', null, array('name' => 'member_avatar')); $frm->AddField('text', 'مقطع', null, array('name' => 'member_degree')); $frm->AddField('text', 'رشته تحصیلی', null, array('name' => 'member_field')); $frm->AddField('text', 'شماره تماس', null, array('name' => 'member_number')); $frm->AddField('text', 'شهر', null, array('name' => 'member_city')); $frm->AddField('select', 'نوع', null, array('name' => 'member_type'), array(0 => array('0', 'تایید نشده'), 1 => array('1', 'تایید شده'), 2 => array('2', 'اخراجی'))); $frm->AddField('submit', '', 'ارسال'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <div class="row"> <div class="grd-primary"> <?php $frm->Render(); ?> </div>
<?php //var_dump($this->record); $date = TDate::GetInstance(); $frm = new TForm(UR_MP . 'Member/Update/' . $this->record['member_id'], 'post', array('class' => 'form rtl')); $frm->AddField('text', 'نام', $this->record['member_name'], array('name' => 'member_name')); $frm->AddField('email', 'ایمیل', $this->record['member_email'], array('name' => 'member_email')); $frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password')); $frm->AddField('text', 'استاتوس', $this->record['member_status'], array('name' => 'member_status')); $frm->AddField('text', 'زمان تمدید', $date->PDate('Y/m/d', $this->record['member_active_time']), array('name' => 'member_active_time', 'class' => _lg('datepicker'))); $frm->AddField('file', 'آواتار', $this->record['member_id'], array('name' => 'member_avatar')); $frm->AddField('text', 'مقطع', $this->record['member_degree'], array('name' => 'member_degree')); $frm->AddField('text', 'رشته تحصیلی', $this->record['member_field'], array('name' => 'member_field')); $frm->AddField('text', 'شماره تماس', $this->record['member_number'], array('name' => 'member_number')); $frm->AddField('text', 'شهر', $this->record['member_city'], array('name' => 'member_city')); $frm->AddField('textarea', 'توصیه مشاور/ پشتیبان', $this->record['member_comment'], array('name' => 'member_comment', 'class' => 'full-width')); $frm->AddField('select', 'نوع', $this->record['member_type'], array('name' => 'member_type'), array(0 => array('0', 'تایید نشده'), 1 => array('1', 'تایید شده'), 2 => array('2', 'اخراجی'))); $frm->AddField('select', 'وضعیت چت', $this->record['member_chat'], array('name' => 'member_chat'), array(0 => array('1', ' فعال'), 1 => array('0', 'اخراجی'))); $frm->AddField('submit', '', 'ویرایش'); //print_r($this->reports); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <div class="row"> <div class="grd-primary">
<?php //var_dump($this->record); $frm = new TForm(UR_MP . 'Topic/Update/' . $this->record['topic_id'], 'post', array('class' => 'form rtl')); $topic_status = array(0 => array('0', 'پیش نویس'), 1 => array('1', ' انتشار عمومی'), 2 => array('2', 'ویژه اعضا')); $frm->AddField('text', 'عنوان ', $this->record['topic_title'], array('name' => 'topic_title')); $frm->AddField('text', ' کلمه کلیدی', $this->record['topic_keyword'], array('name' => 'topic_keyword')); $frm->AddField('textarea', 'چکیده', $this->record['topic_abstract'], array('name' => 'topic_abstract')); $frm->AddField('textarea', 'متن', $this->record['topic_text'], array('name' => 'topic_text', 'class' => 'ckeditor')); $frm->AddField('select', 'وضعیت', $this->record['topic_status'], array('name' => 'topic_status'), $topic_status); $frm->AddField('hidden', '', $this->record['topic_icon'], array('name' => 'topic_icon', 'id' => 'topic_icon')); $frm->AddField('submit', '', 'ویرایش یادداشت'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <?php echo $frm->FormHeader(); ?> <div class="row"> <div class="grd-primary"> <?php echo $frm->FormBody(); ?> </div>
<?php /** * @package Toos FrameWork * @author Phoenix Tech <*****@*****.**> * @date : 22-March-2013 (2-1-1392) * @time : 16:32 * @subpackage index.php * @todo : index - index page view */ $this->cat = new TCategory(); $frm = new TForm('', 'post'); $frm->AddField('select', 'دسته اول', $this->Setting['s']['1'], array('name' => 's[1]'), $this->cat->CategoryByExpect(0)); $frm->AddField('select', 'دسته دوم', $this->Setting['s']['2'], array('name' => 's[2]'), $this->cat->CategoryByExpect(0)); ?> <div class="row autofit rtl" > <div class="grd-primary"> <form class="real" method="post" action="<?php echo UR_MP; ?> /Index/SaveSetting" style="padding: 2em;"> <label> <span> عنوان سایت </span> <input type="text" value="<?php echo $this->Setting['title']; ?> " name="title" />
<?php $frm = new TForm(UR_MP . 'Comment/Insert', 'post', array('class' => 'form rtl')); $frm->AddField('textarea', 'متن پاسخ', null, array('name' => 'comment_text', 'class' => 'ckeditor')); $frm->AddField('hidden', '', $_SESSION['MN_ID'] * -1, array('name' => 'comment_member_id')); $frm->AddField('hidden', '', $this->prn, array('name' => 'comment_parent')); $frm->AddField('hidden', '', $this->tid, array('name' => 'comment_topic_id')); $frm->AddField('submit', '', 'ارسال'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <?php $frm->Render(); ?>
<?php //var_dump($this->record); $frm = new TForm(UR_MP . 'Category/Update/' . $this->record['category_id'], 'post', array('class' => 'form rtl')); $frm->AddField('text', 'عنوان دسته ', $this->record['category_title'], array('name' => 'category_title', 'size' => 90)); $frm->AddField('select', 'مادر', $this->record['category_parent'], array('name' => 'category_parent'), $this->cat->CategoryByExpect($this->record['category_id'])); $frm->AddField('textarea', 'توضیح', $this->record['category_description'], array('name' => 'category_description', 'cols' => '90', "rows" => '10', 'class' => 'ckeditor')); $frm->AddField('file', 'عکس', null, array('name' => 'image')); $frm->AddField('submit', '', 'ارسال'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> <img alt="[category_image]" src="<?php echo UR_UPLOAD; ?> category/<?php echo $this->record['category_id']; ?> .png" /> </h2> <br /> <br /> <?php $frm->Render(); ?>
<?php $frm = new TForm('', 'post', array('class' => 'form ajax')); $frm->AddField('text', 'نام کامل', null, array('name' => 'member_name')); $frm->AddField('email', 'ایمیل', null, array('name' => 'member_email')); $frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password')); $frm->AddField('password', 'تکرار گذرواژه', null, array('name' => 'member_password2')); $frm->AddField('text', 'مقطع', null, array('name' => 'member_degree')); $frm->AddField('text', 'رشته تحصیلی', null, array('name' => 'member_field')); $frm->AddField('text', 'شماره تماس', null, array('name' => 'member_number')); $frm->AddField('text', 'شهر', null, array('name' => 'member_city')); $frm->AddField('hidden', '', '/form/regiter', array('class' => 'action')); $frm->AddField('submit', '', 'ارسال'); $reg_frm = $frm->FormHeader(); $reg_frm .= $frm->FormBody(); $reg_frm .= $frm->FormFooter(); $smarty->assign('reg_frm', $reg_frm);
<?php //var_dump($this->record); $date = TDate::GetInstance(); $frm = new TForm(UR_MP . 'Member/Update/' . $this->record['member_id'], 'post', array('class' => 'form rtl')); $frm->AddField('text', 'نام', $this->record['member_name'], array('name' => 'member_name')); $frm->AddField('email', 'ایمیل', $this->record['member_email'], array('name' => 'member_email')); $frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password')); $frm->AddField('text', 'استاتوس', $this->record['member_status'], array('name' => 'member_status')); $frm->AddField('text', 'زمان تمدید', $date->PDate('Y/m/d', $this->record['member_active_time']), array('name' => 'member_active_time')); $frm->AddField('file', 'آواتار', $this->record['member_id'], array('name' => 'member_avatar')); $frm->AddField('select', 'نوع', $this->record['member_type'], array('name' => 'member_type'), array(0 => array('0', 'تایید نشده'), 1 => array('1', 'تایید شده'), 2 => array('2', 'اخراجی'))); $frm->AddField('submit', '', 'ویرایش'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <?php $frm->Render(); ?>
<?php $topic_status = array(0 => array('0', 'پیش نویس'), 1 => array('1', ' انتشار عمومی'), 2 => array('2', 'ویژه اعضا')); $frm = new TForm(UR_MP . 'Topic/Insert', 'post', array('class' => 'form rtl')); $frm->AddField('text', 'عنوان ', null, array('name' => 'topic_title')); $frm->AddField('text', ' کلمه کلیدی', null, array('name' => 'topic_keyword')); $frm->AddField('textarea', 'چکیده', null, array('name' => 'topic_abstract')); $frm->AddField('textarea', 'متن', null, array('name' => 'topic_text', 'class' => 'ckeditor')); $frm->AddField('select', 'وضعیت', null, array('name' => 'topic_status'), $topic_status); $frm->AddField('submit', '', 'ارسال'); // $frm->AddField('text', 'label', null, array('name' => '')); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <div class="row"> <div class="grd-primary"> <?php $frm->Render(); ?> </div> <div class="grd-secondary"> </div> </div>
<?php $frm = new TForm(UR_MP . 'Member/RIns', 'post', array('class' => 'form rtl')); $frm->AddField('text', 'عنوان ', null, array('name' => 'report_title')); $frm->AddField('hidden', '', $this->id, array('name' => 'report_member_id')); $frm->AddField('textarea', 'کارنامه', null, array('name' => 'report_text', 'class' => 'ckeditor')); $frm->AddField('submit', '', 'ارسال'); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <div class="row"> <div class="grd-primary"> <?php $frm->Render(); ?> </div> <div class="grd-secondary"> </div> </div>
<?php $frm = new TForm(UR_MP . 'Category/Insert', 'post', array('class' => 'form rtl')); $frm->AddField('text', 'عنوان دسته ', null, array('name' => 'category_title', 'class' => 'full-width')); $frm->AddField('select', 'مادر', null, array('name' => 'category_parent'), $this->cat->CategoryByExpect()); $frm->AddField('textarea', 'توضیح', null, array('name' => 'category_description', "rows" => '10', 'class' => 'ckeditor')); $frm->AddField('submit', '', 'ارسال'); ?> <div class="row"> <div class="grd12"> <div class="margin"> <ul class="listview"> <li class="pinned animate"> <div class="row"> <div class="grd2">ش</div> <div class="grd16"> عنوان</div> <div class="grd6"> عملیات </div> </div> </li> <?php foreach ($this->cls_list as $cls) { ?> <li> <div class="row"> <div class="grd2"><?php
<?php if (!isset($_COOKIE['mid'])) { Redirect('/ورود'); } $m = newUR_MP_ASSETS("member", 'member_'); $record = $m->GetRecord($_COOKIE['mid']); $frm = new TForm('', 'post', array('class' => 'form')); $frm->AddField('text', 'نام', $record['member_name'], array('name' => 'member_name')); $frm->AddField('text', 'استاتوس', $record['member_status'], array('name' => 'member_status')); $frm->AddField('file', 'آواتار', $record['member_id'], array('name' => 'member_avatar')); $frm->AddField('text', 'مقطع', $record['member_degree'], array('name' => 'member_degree')); $frm->AddField('text', 'رشته تحصیلی', $record['member_field'], array('name' => 'member_field')); $frm->AddField('text', 'شماره تماس', $record['member_number'], array('name' => 'member_number')); $frm->AddField('text', 'شهر', $record['member_city'], array('name' => 'member_city')); $frm->AddField('hidden', '', '/form/profile', array('class' => 'action')); $frm->AddField('submit', '', 'ویرایش'); $reg_frm = $frm->FormHeader(); $reg_frm .= $frm->FormBody(); $reg_frm .= $frm->FormFooter(); $smarty->assign('reg_frm', $reg_frm);
<?php //var_dump($this->record); //$date = TDate::GetInstance(); global $MANAGER_TYPE; $frm = new TForm(UR_MP . 'Manager/Update/' . $this->record['manager_id'], 'post', array('class' => 'form rtl')); $frm->AddField('text', 'نام', $this->record['manager_username'], array('name' => 'manager_username')); $frm->AddField('email', 'ایمیل', $this->record['manager_email'], array('name' => 'manager_email')); $frm->AddField('password', 'گذرواژه', '', array('name' => 'manager_password')); $frm->AddField('text', 'نام نمایشی', $this->record['manager_displayname'], array('name' => 'manager_displayname')); $frm->AddField('select', 'نوع', $this->record['manager_type'], array('name' => 'manager_type'), $MANAGER_TYPE); $frm->AddField('submit', '', 'ویرایش'); //print_r($this->reports); $promise = explode(',', $this->record['manager_permission']); ?> <br /> <h2 class="rtl"> <?php echo $this->title; ?> </h2> <br /> <br /> <?php echo $frm->FormHeader(); ?> <div class="row"> <div class="grd-primary"> <?php echo $frm->FormBody(); ?>