public function getcontent() { $result = ''; $plugin = titemsreplacer::i(); $views = tviews::i(); $html = tadminhtml::i(); $args = targs::i(); $lang = tplugins::getlangabout(__FILE__); $adminurl = tadminhtml::getadminlink('/admin/plugins/', 'plugin=' . basename(dirname(__FILE__))); if (!empty($_GET['id'])) { $id = (int) $_GET['id']; if (isset($plugin->items[$id])) { $args->formtitle = sprintf($lang->formtitle, $views->items[$id]['name']); $tabs = new tuitabs(); $tabs->add($lang->add, $html->getinput('text', 'addtag', '', $lang->addtag) . $html->getinput('editor', 'addreplace', '', $lang->replace)); $i = 0; foreach ($plugin->items[$id] as $tag => $replace) { $tabs->add($tag, $html->getinput('editor', "replace-{$i}", tadminhtml::specchars($replace), $lang->replace)); $i++; } $result .= $html->adminform($tabs->get(), $args); } } $result .= "<h4>{$lang->viewlist}</h4><ul>"; foreach (array_keys($plugin->items) as $id) { $name = $views->items[$id]['name']; $result .= "<li><a href='{$adminurl}&id={$id}'>{$name}</a></li>"; } $result .= '</ul>'; $form = "<h3>{$lang->addview}</h3>\n <form name='form' action='{$adminurl}&action=add' method='post' >\n " . $html->getinput('text', 'viewname', '', $lang->viewname) . "\n <p><input type='submit' name='submitbutton' id='idsubmitbutton' value='{$lang->add}' /></p>\n </form>"; $result .= $form; return $result; }
public function getcontent() { $merger = tlocalmerger::i(); $tabs = new tuitabs(); $html = $this->html; $lang = tlocal::i('options'); $args = targs::i(); foreach ($merger->items as $section => $items) { $tab = new tuitabs(); $tab->add($lang->files, $html->getinput('editor', $section . '_files', tadminhtml::specchars(implode("\n", $items['files'])), $lang->files)); $tabtext = new tuitabs(); foreach ($items['texts'] as $key => $text) { $tabtext->add($key, $html->getinput('editor', $section . '_text_' . $key, tadminhtml::specchars($text), $key)); } $tab->add($lang->text, $tabtext->get()); $tabs->add($section, $tab->get()); } $tabs->add('HTML', $html->getinput('editor', 'adminhtml_files', tadminhtml::specchars(implode("\n", $merger->html)), $lang->files)); $args->formtitle = $lang->optionslocal; $args->dateformat = litepublisher::$options->dateformat; $dirs = tfiler::getdir(litepublisher::$paths->languages); $args->language = tadminhtml::array2combo(array_combine($dirs, $dirs), litepublisher::$options->language); $zones = timezone_identifiers_list(); $args->timezone = tadminhtml::array2combo(array_combine($zones, $zones), litepublisher::$options->timezone); return $html->adminform('[text=dateformat] [combo=language] [combo=timezone]' . $tabs->get(), $args); }
public function getcontent() { $result = ''; $types = tpolltypes::i(); $html = tadminhtml::i(); $lang = tlocal::admin('polls'); $args = new targs(); $type = isset($_GET['type']) ? $_GET['type'] : ''; if (isset($types->items[$type])) { $args->type = $type; $tabs = new tuitabs(); foreach ($types->items[$type] as $name => $value) { $args->{$name} = $value; $tabs->add($lang->{$name}, "[editor={$name}]"); } $args->formtitle = $lang->edittype; $result .= $html->adminform($tabs->get(), $args); } $result .= $html->h4->alltypes; $result .= '<ul>'; $adminurl = $html->getadminlink($this->url, 'type='); foreach ($types->items as $type => $item) { $result .= sprintf('<li><a href="%s%2$s" title="%2$s">%2$s</a></li>', $adminurl, $type); } $result .= '</ul>'; return $result; }
public function getcontent() { $plugin = ttagreplacer::i(); $html = tadminhtml::i(); $tabs = new tuitabs(); $args = targs::i(); $about = tplugins::getabout('tagreplacer'); $args->formtitle = $about['name']; $tabs->add($about['new'], $html->getinput('text', 'where-add', '', $about['where']) . $html->getinput('text', 'search-add', '', $about['search']) . $html->getinput('editor', 'replace-add', '', $about['replace'])); foreach ($plugin->items as $i => $item) { $tabs->add($item['where'], $html->getinput('text', "where-{$i}", tadminhtml::specchars($item['where']), $about['where']) . $html->getinput('text', "search-{$i}", tadminhtml::specchars($item['search']), $about['search']) . $html->getinput('editor', "replace-{$i}", tadminhtml::specchars($item['replace']), $about['replace'])); } return $html->adminform($tabs->get(), $args); }
public function getcontent() { $plugin = tregservices::i(); $html = tadminhtml::i(); $tabs = new tuitabs(); $args = targs::i(); $lang = tplugins::getnamelang($plugin->dirname); $args->formtitle = $lang->options; foreach ($plugin->items as $id => $classname) { $service = getinstance($classname); $tabs->add($service->title, $service->gettab($html, $args, $lang)); } return $html->adminform($tabs->get(), $args); }
public function getcontent() { $plugin = tblackip::i(); $lang = tplugins::getlangabout('black-ip'); $args = new targs(); $args->ip = implode("\n", $plugin->ip); $args->words = implode("\n", $plugin->words); $args->ipstatus = tadminhtml::array2combo(tlocal::i()->ini['commentstatus'], $plugin->ipstatus); $args->wordstatus = tadminhtml::array2combo(tlocal::i()->ini['commentstatus'], $plugin->wordstatus); $tabs = new tuitabs(); $tabs->add($lang->wordtitle, '[combo=wordstatus] [editor=words]'); $tabs->add('IP', '[combo=ipstatus] [editor=ip]'); $args->formtitle = $lang->formtitle; $html = tadminhtml::i(); return tuitabs::gethead() . $html->adminform($tabs->get(), $args); }
public function getcontent() { $merger = $this->getmerger(); $tabs = new tuitabs(); $html = $this->html; $lang = tlocal::i('views'); $args = targs::i(); $args->formtitle = $this->title; foreach ($merger->items as $section => $items) { $tab = new tuitabs(); $tab->add($lang->files, $html->getinput('editor', $section . '_files', tadminhtml::specchars(implode("\n", $items['files'])), $lang->files)); $tabtext = new tuitabs(); foreach ($items['texts'] as $key => $text) { $tabtext->add($key, $html->getinput('editor', $section . '_text_' . $key, tadminhtml::specchars($text), $key)); } $tab->add($lang->text, $tabtext->get()); $tabs->add($section, $tab->get()); } return $html->adminform($tabs->get(), $args); }
public function getcontent() { $plugin = tmlstorage::i(); $args = new targs(); $args->formtitle = 'Template storage'; $html = tadminhtml::i(); $tabs = new tuitabs(); foreach ($plugin->items as $classname) { if (is_array($obj->data['tml'])) { $tab = new tuitabs(); $obj = getinstance($classname); foreach ($obj->data['tml'] as $key => $value) { $tab->add($key, $html->getinput('editor', $classname . '_text_' . $key, tadminhtml::specchars($value), $key)); } $tabs->add($classname, $tab->get()); } else { $tabs->add($classname, $html->getinput('editor', $classname . '_text', tadminhtml::specchars($obj->data['tml']), $classname)); } } return tuitabs::gethead() . $html->adminform($tabs->get(), $args); }
public function getcontent() { $result = ''; $users = tusers::i(); $html = $this->gethtml('users'); $lang = tlocal::admin('users'); $args = new targs(); if (!($id = $this->getiduser())) { if (litepublisher::$options->ingroup('admin')) { return $this->getuserlist(); } return $this->notfound; } $pages = tuserpages::i(); $item = tusers::i()->getitem($id) + $pages->getitem($id); if (!isset($item['url'])) { $item['url'] = $item['idurl'] ? litepublisher::$urlmap->getidurl($item['idurl']) : ''; } $args->add($item); $args->formtitle = sprintf('<a href="$site.url%s">%s</a>', $item['url'], $item['name']); $tabs = new tuitabs(); $tabs->add($lang->title, '[text=name] [text=website]'); if ('admin' == litepublisher::$options->group) { $tabs->add($lang->view, tadminviews::getcomboview($item['idview'])); $tabs->add('SEO', '[text=url] [text=keywords] [text=description] [editor=head]'); } $tabs->add($lang->text, '[editor=rawcontent]'); $opt = tuseroptions::i()->getitem($id); $args->subscribe = $opt['subscribe'] == 'enabled'; $args->authorpost_subscribe = $opt['authorpost_subscribe'] == 'enabled'; $tabs->add($lang->options, ' [checkbox=subscribe] [checkbox=authorpost_subscribe] '); return $html->adminform($tabs->get(), $args); }
public function getcontent() { $result = ''; $users = tusers::i(); $groups = tusergroups::i(); $html = $this->html; $lang = tlocal::i('users'); $args = targs::i(); $id = $this->idget(); switch ($this->action) { case 'edit': if (!$users->itemexists($id)) { $result .= $this->notfound(); } else { $statuses = array(); foreach (array('approved', 'hold', 'comuser') as $name) { $statuses[$name] = $lang->{$name}; } $item = $users->getitem($id); $args->add($item); $args->registered = tuserpages::i()->getvalue($id, 'registered'); $args->formtitle = $item['name']; $args->status = tadminhtml::array2combo($statuses, $item['status']); $tabs = new tuitabs(); $tabs->add($lang->login, '[text=email] [password=password]'); $tabs->add($lang->groups, '[combo=status]' . tadmingroups::getgroups($item['idgroups'])); $tabs->add('Cookie', '[text=cookie] [text=expired] [text=registered] [text=trust]'); $args->password = ''; $result .= $html->adminform($tabs->get(), $args); } break; case 'delete': $result .= $html->confirm_delete($users, $this->adminurl); break; default: $args->formtitle = $lang->newuser; $args->email = ''; $args->action = 'add'; $tabs = new tuitabs(); $tabs->add($lang->login, '[text=email] [password=password] [text=name] [hidden=action]'); $tabs->add($lang->groups, tadmingroups::getgroups(array())); $result .= $html->adminform($tabs->get(), $args); } $args->search = ''; //table $perpage = 20; $count = $users->count; $from = $this->getfrom($perpage, $count); $where = ''; $params = ''; if (!empty($_GET['idgroup'])) { $idgroup = (int) tadminhtml::getparam('idgroup', 0); if ($groups->itemexists($idgroup)) { $grouptable = litepublisher::$db->prefix . $users->grouptable; $where = "{$users->thistable}.id in (select iduser from {$grouptable} where idgroup = {$idgroup})"; $params = "idgroup={$idgroup}"; } } elseif ($search = trim(tadminhtml::getparam('search', ''))) { $params = 'search=' . urlencode($search); $args->search = $search; $search = litepublisher::$db->escape($search); $search = strtr($search, array('%' => '\\%', '_' => '\\_')); $where = "email like '%{$search}%' or name like '%{$search}%' "; $count = $users->db->getcount($where); $from = $this->getfrom($perpage, $count); } $items = $users->select($where, " order by id desc limit {$from}, {$perpage}"); if (!$items) { $items = array(); } $args->adminurl = $this->adminurl; $args->formtitle = $lang->userstable; $args->table = $html->items2table($users, $items, array($html->get_table_checkbox('user'), array('left', $lang->edit, sprintf('<a href="%s=$id&action=edit">$name</a>', $this->adminurl)), $html->get_table_item('status'), array('left', $lang->comments, sprintf('<a href="%s">%s</a>', tadminhtml::getadminlink('/admin/comments/', 'iduser=$id'), $lang->comments)), array('left', $lang->page, sprintf('<a href="%s">%s</a>', tadminhtml::getadminlink('/admin/users/pages/', 'id=$id'), $lang->page)), $html->get_table_link('delete', $this->adminurl))); $result .= $html->deletetable($args); $result = $html->fixquote($result); $theme = ttheme::i(); $result .= $theme->getpages($this->url, litepublisher::$urlmap->page, ceil($count / $perpage), $params); $form = new adminform($args); $form->method = 'get'; $form->inline = true; $form->items = '[text=search]'; $form->submit = 'find'; $result .= $form->get(); return $result; }
public function getcontent() { $result = ''; $views = tviews::i(); $html = $this->html; $lang = tlocal::i('views'); $args = new targs(); switch ($this->name) { case 'views': $html->addsearch('views'); $lang->addsearch('views'); $id = tadminhtml::getparam('idview', 0); if (!$id || !$views->itemexists($id)) { $adminurl = $this->adminurl . 'view'; return $html->h4($html->getlink($this->url . '/addview/', $lang->add)) . $html->buildtable($views->items, array(array('left', $lang->name, "<a href=\"{$adminurl}=\$id\">\$name</a>"), array('center', $lang->delete, "<a href=\"{$adminurl}=\$id&action=delete\" class=\"confirm-delete-link\">{$lang->delete}</a>"))); } $result = self::getviewform($this->url); $tabs = new tuitabs(); $menuitems = array(); foreach ($views->items as $itemview) { $class = $itemview['menuclass']; $menuitems[$class] = $class == 'tmenus' ? $lang->stdmenu : ($class == 'tadminmenus' ? $lang->adminmenu : $class); } $itemview = $views->items[$id]; $args->add($itemview); $tabs->add($lang->widgets, $this->get_view_sidebars($id, $html, $lang, $args)); $args->menu = tadminhtml::array2combo($menuitems, $itemview['menuclass']); $tabs->add($lang->name, '[text=name]' . ($id == 1 ? '' : '[checkbox=customsidebar] [checkbox=disableajax]') . '[checkbox=hovermenu] [combo=menu]'); $view = tview::i($id); $lang->firstsearch('themes'); $tabs->add($lang->theme, tadminthemes::getlist($html->radiotheme, $view->theme->name)); if (count($view->custom)) { $tabs->add($lang->custom, $this->get_custom($view)); } $result .= $html->h4->help; $form = new adminform($args); $form->id = 'admin-view-form'; $form->title = $lang->edit; $form->items = $tabs->get(); $result .= $form->get(); $result .= ttemplate::i()->getjavascript(ttemplate::i()->jsmerger_adminviews); break; case 'addview': $args->formtitle = $lang->addview; $result .= $html->adminform('[text=name]', $args); break; case 'spec': $tabs = new tuitabs(); $inputs = ''; foreach (self::getspecclasses() as $classname) { $obj = getinstance($classname); $args->classname = $classname; $name = substr($classname, 1); $args->title = $lang->{$name}; $inputs = self::getcomboview($obj->idview, "idview-{$classname}"); if (isset($obj->data['keywords'])) { $inputs .= $html->getedit("keywords-{$classname}", $obj->data['keywords'], $lang->keywords); } if (isset($obj->data['description'])) { $inputs .= $html->getedit("description-{$classname}", $obj->data['description'], $lang->description); } if (isset($obj->data['head'])) { $inputs .= $html->getinput('editor', "head-{$classname}", tadminhtml::specchars($obj->data['head']), $lang->head); } $tabs->add($lang->{$name}, $inputs); } $args->formtitle = $lang->defaults; $result .= tuitabs::gethead() . $html->adminform($tabs->get(), $args); break; case 'group': $args->formtitle = $lang->viewposts; $result .= $html->adminform(self::getcomboview($views->defaults['post'], 'postview') . '<input type="hidden" name="action" value="posts" />', $args); $args->formtitle = $lang->viewmenus; $result .= $html->adminform(self::getcomboview($views->defaults['menu'], 'menuview') . '<input type="hidden" name="action" value="menus" />', $args); $args->formtitle = $lang->themeviews; $view = tview::i(); $list = tfiler::getdir(litepublisher::$paths->themes); sort($list); $themes = array_combine($list, $list); $result .= $html->adminform($html->getcombo('themeview', tadminhtml::array2combo($themes, $view->themename), $lang->themename) . '<input type="hidden" name="action" value="themes" />', $args); break; case 'defaults': $items = ''; $theme = ttheme::i(); $tml = $theme->templates['content.admin.combo']; foreach ($views->defaults as $name => $id) { $args->name = $name; $args->value = self::getcombo($id); $args->data['$lang.$name'] = $lang->{$name}; $items .= $theme->parsearg($tml, $args); } $args->items = $items; $args->formtitle = $lang->defaultsform; $result .= $theme->parsearg($theme->content->admin->form, $args); break; case 'headers': $tabs = new tuitabs(); $args->heads = ttemplate::i()->heads; $tabs->add($lang->headstitle, '[editor=heads]'); $args->adminheads = tadminmenus::i()->heads; $tabs->add($lang->admin, '[editor=adminheads]'); $ajax = tajaxposteditor::i(); $args->ajaxvisual = $ajax->ajaxvisual; $args->visual = $ajax->visual; $args->show_file_perm = litepublisher::$options->show_file_perm; $tabs->add($lang->posteditor, '[checkbox=show_file_perm] [checkbox=ajaxvisual] [text=visual]'); $args->formtitle = $lang->headstitle; $result = $html->adminform($tabs->get(), $args); $result .= tuitabs::gethead(); break; case 'admin': return $this->adminoptionsform->getform(); } return $html->fixquote($result); }
public function getcontent() { $result = ''; $istags = $this->name == 'tags' || $this->name == 'addtag'; $tags = $istags ? litepublisher::$classes->tags : litepublisher::$classes->categories; if (dbversion) { $tags->loadall(); } $parents = array(0 => '-----'); foreach ($tags->items as $id => $item) { $parents[$id] = $item['title']; } $this->basename = 'tags'; $html = $this->html; $lang = tlocal::i('tags'); $id = $this->idget(); $args = new targs(); $args->id = $id; $args->adminurl = $this->adminurl; $ajax = tadminhtml::getadminlink('/admin/ajaxtageditor.htm', sprintf('id=%d&type=%s&get', $id, $istags ? 'tags' : 'categories')); $args->ajax = $ajax; if (isset($_GET['action']) && $_GET['action'] == 'delete' && $tags->itemexists($id)) { if ($this->confirmed) { $tags->delete($id); $result .= $html->h4->successdeleted; } else { return $html->confirmdelete($id, $this->adminurl, $lang->confirmdelete); } } $result .= $html->h4(tadminhtml::getlink('/admin/posts/' . ($istags ? 'addtag' : 'addcat') . '/', $lang->add)); $item = false; if ($id && $tags->itemexists($id)) { $item = $tags->getitem($id); $args->formtitle = $lang->edit; } elseif ($this->name == 'addcat' || $this->name == 'addtag') { $id = 0; $item = array('id' => 0, 'title' => '', 'parent' => 0, 'customorder' => 0); $args->formtitle = $lang->add; } if ($item) { $args->add($item); $args->parent = tadminhtml::array2combo($parents, $item['parent']); $args->order = tadminhtml::array2combo(array_combine(range(0, 9), range(1, 10)), $item['customorder']); $tabs = new tuitabs(); $tabs->add($lang->title, ' [text=title] [combo=parent] [combo=order] [hidden=id]' . $html->p->ordernote); $tabs->ajax($lang->text, "{$ajax}=text"); $tabs->ajax($lang->view, "{$ajax}=view"); $tabs->ajax('SEO', "{$ajax}=seo"); $form = new adminform($args); $result .= $html->adminform($tabs->get(), $args) . tuitabs::gethead(); } //table $perpage = 20; $count = $tags->count; $from = $this->getfrom($perpage, $count); if ($tags->dbversion) { $iditems = $tags->db->idselect("id > 0 order by parent asc, title asc limit {$from}, {$perpage}"); } else { $iditems = array_slice(array_keys($tags->items), $from, $perpage); } $items = array(); foreach ($iditems as $id) { $item = $tags->items[$id]; $item['parentname'] = $parents[$item['parent']]; $items[] = $item; } $result .= $html->buildtable($items, array(array('right', $lang->count2, '$itemscount'), array('left', $lang->title, '<a href="$link" title="$title">$title</a>'), array('left', $lang->parent, '$parentname'), array('center', $lang->edit, "<a href=\"{$this->adminurl}=\$id\">{$lang->edit}</a>"), array('center', $lang->delete, "<a class=\"confirm-delete-link\" href=\"{$this->adminurl}=\$id&action=delete\">{$lang->delete}</a>"))); $result = $html->fixquote($result); $theme = ttheme::i(); $result .= $theme->getpages($this->url, litepublisher::$urlmap->page, ceil($count / $perpage)); return $result; }
public function getcontent() { $result = ''; $polls = tpolls::i(); $html = tadminhtml::i(); $lang = tlocal::admin('polls'); $args = new targs(); $dir = litepublisher::$paths->data . 'polls'; $adminurl = $this->adminurl; if ($action = $this->action) { $id = $this->idget(); switch ($action) { case 'delete': $man = tpollsman::i(); if ($id == $man->pollpost) { return $html->h4->deletepullpost; } if ($this->confirmed) { tfilestorage::delete($dir . DIRECTORY_SEPARATOR . "{$id}.php"); tfilestorage::delete($dir . DIRECTORY_SEPARATOR . "{$id}.bak.php"); unset($polls->tml_items[$id]); $polls->db->update('id_tml = ' . $man->pollpost, "id_tml = {$id}"); $result .= $html->h4->deleted; } else { $result .= $html->confirmdelete($id, $adminurl, $lang->confirmdelete); } break; case 'edit': if ($tml = $polls->get_tml($id)) { $args->add($tml); $args->id = $id; $args->name = tcontentfilter::unescape($tml['name']); $args->title = tcontentfilter::unescape($tml['title']); //$args->items = implode("\n", $tml['items']); $tabs = new tuitabs(); //$tabs->add($lang->pollitems, "[editor=items]"); $tabs->add($lang->opened, "[editor=opened]"); $tabs->add($lang->closed, "[editor=closed]"); $args->formtitle = $lang->edittemplate; $result .= $html->adminform(' [text=name] [text=title]' . $tabs->get(), $args); } break; case 'add': $types = array_keys(tpolltypes::i()->items); $args->type = tadminhtml::array2combo(array_combine($types, $types), $types[0]); $args->name = ''; $args->title = ''; $args->newitems = ''; $args->formtitle = $lang->newtemplate; $result .= $html->adminform('[text=name] [text=title] [combo=type] [editor=newitems]', $args); break; } } $result .= $html->h3("<a href='{$adminurl}=0&action=add'>{$lang->addtemplate}</a>"); $result .= $html->h4->alltemplates; $args->adminurl = $adminurl; $table = ''; $tr = '<tr> <td><a href="$adminurl=$id&action=edit">$name</a></td> <td><a href="$adminurl=$id&action=delete">$lang.delete</a></td> </tr>'; $polls->loadall_tml(); foreach ($polls->tml_items as $id => $tml) { $args->id = $id; $args->name = $tml['name']; $args->title = $tml['title']; $table .= $html->parsearg($tr, $args); } $head = "<tr>\n <th>{$lang->edit}</th>\n <th>{$lang->delete}</th>\n </tr>"; $result .= $html->gettable($head, $table); return $result; }
public function getcontent() { if ($form = $this->getautoform($this->name)) { return $form->getform(); } $options = litepublisher::$options; $template = ttemplate::i(); ttheme::$vars['template'] = $template; $result = ''; $args = new targs(); $lang = tlocal::admin('options'); $html = $this->html; switch ($this->name) { case 'options': $site = litepublisher::$site; $args->fixedurl = $site->fixedurl; $args->redirdom = litepublisher::$urlmap->redirdom; $args->url = $site->url; $args->name = $site->name; $args->description = $site->description; $args->keywords = $site->keywords; $args->author = $site->author; $args->footer = $template->footer; $args->formtitle = $lang->options; return $html->adminform(' [checkbox=fixedurl] [checkbox=redirdom] [text=url] [text=name] [text=description] [text=keywords] [text=author] [editor=footer] ', $args); case 'home': $home = thomepage::i(); $tabs = new tuitabs(); $args->image = $home->image; $args->parsetags = $home->parsetags; $args->showmidle = $home->showmidle; $args->midlecat = tposteditor::getcombocategories(array(), $home->midlecat); $args->showposts = $home->showposts; $args->invertorder = $home->invertorder; $args->showpagenator = $home->showpagenator; $args->idhome = $home->id; $menus = tmenus::i(); $args->homemenu = $menus->home; $tabs->add($lang->options, ' [checkbox=homemenu] [text=image] [checkbox=parsetags] [checkbox=showmidle] [combo=midlecat] [checkbox=showposts] [checkbox=invertorder] [checkbox=showpagenator] '); $tabs->add($lang->includecats, $html->h4->includehome . tposteditor::getcategories($home->includecats)); $tabs->add($lang->excludecats, $html->h4->excludehome . str_replace('category-', 'exclude_category-', tposteditor::getcategories($home->excludecats))); $args->formtitle = $lang->homeform; return tuitabs::gethead() . $html->adminform('<h4><a href="$site.url/admin/menu/edit/{$site.q}id=$idhome">$lang.hometext</a></h4>' . $tabs->get(), $args); case 'mail': $args->adminemail = $options->email; $args->fromemail = $options->fromemail; $args->mailer = $options->mailer == 'smtp'; $subscribers = tsubscribers::i(); $args->subscribeemail = $subscribers->fromemail; $mailer = TSMTPMailer::i(); $args->host = $mailer->host; $args->smtplogin = $mailer->login; $args->password = $mailer->password; $args->port = $mailer->port; $args->formtitle = $lang->mailoptions; return $html->adminform(' [text=adminemail] [text=fromemail] [text=subscribeemail] [checkbox=mailer] [text=host] [text=smtplogin] [password=password] [text=port] ', $args); case 'view': $args->perpage = $options->perpage; $filter = tcontentfilter::i(); $args->usefilter = $filter->usefilter; $args->automore = $filter->automore; $args->automorelength = $filter->automorelength; $args->autolinks = $filter->autolinks; $args->commentautolinks = $filter->commentautolinks; $args->icondisabled = $options->icondisabled; $args->hidefilesonpage = $options->hidefilesonpage; $themeparser = tthemeparser::i(); $args->replacelang = $themeparser->replacelang; $args->stylebefore = $themeparser->stylebefore; $args->formtitle = $lang->viewoptions; return $html->adminform(' [text=perpage] [checkbox=usefilter] [checkbox=automore] [text=automorelength] [checkbox=autolinks] [checkbox=commentautolinks] [checkbox=hidefilesonpage] [checkbox=icondisabled] [checkbox=replacelang] [checkbox=stylebefore] ', $args); break; case 'files': $parser = tmediaparser::i(); $args->enablepreview = $parser->enablepreview; $args->ratio = $parser->ratio; $args->clipbounds = $parser->clipbounds; $args->previewwidth = $parser->previewwidth; $args->previewheight = $parser->previewheight; $args->maxwidth = $parser->maxwidth; $args->maxheight = $parser->maxheight; $args->alwaysresize = $parser->alwaysresize; $args->quality_original = $parser->quality_original; $args->quality_snapshot = $parser->quality_snapshot; $args->audioext = $parser->audioext; $args->videoext = $parser->videoext; $args->video_width = litepublisher::$site->video_width; $args->video_height = litepublisher::$site->video_height; $args->formtitle = $lang->files; return $html->adminform(' <h4>$lang.imagesize</h4> [checkbox=alwaysresize] [text=maxwidth] [text=maxheight] [text=quality_original] <h4>$lang.previewsize</h4> [checkbox=enablepreview] [checkbox=ratio] [checkbox=clipbounds] [text=previewwidth] [text=previewheight] [text=quality_snapshot] <h4>$lang.extfile</h4> [text=audioext] [text=videoext] [text=video_width] [text=video_height] ', $args); break; case 'links': $linkgen = tlinkgenerator::i(); $args->urlencode = $linkgen->urlencode; $args->post = $linkgen->post; $args->menu = $linkgen->menu; $args->category = $linkgen->category; $args->tag = $linkgen->tag; $args->archive = $linkgen->archive; $args->formtitle = $lang->schemalinks; return $html->adminform(' <p>$lang.taglinks</p> [checkbox=urlencode] [text=post] [text=menu] [text=category] [text=tag] [text=archive] ', $args); case 'cache': $args->enabledcache = $options->cache; $args->expiredcache = $options->expiredcache; $args->admincache = $options->admincache; $args->ob_cache = $options->ob_cache; $args->compress = $options->compress; $args->commentspull = $options->commentspull; $args->memcache_classes = litepublisher::$classes->memcache; $args->formtitle = $lang->optionscache; $result = $html->adminform(' [checkbox=enabledcache] [text=expiredcache] [checkbox=ob_cache] [checkbox=admincache] [checkbox=commentspull] [checkbox=memcache_classes] ', $args); $form = new adminform($args); $form->submit = 'clearcache'; $result .= $form->get(); return $result; case 'catstags': case 'lite': //old version suports $args->litearch = litepublisher::$classes->archives->lite; $cats = litepublisher::$classes->categories; $args->litecats = $cats->lite; $args->parentcats = $cats->includeparents; $args->childcats = $cats->includechilds; $tags = litepublisher::$classes->tags; $args->litetags = $tags->lite; $args->parenttags = $tags->includeparents; $args->childtags = $tags->includechilds; $lang = tlocal::admin('options'); $args->formtitle = $lang->catstags; $html = $this->html; return $html->adminform('[checkbox=litearch] [checkbox=litecats] [checkbox=parentcats] [checkbox=childcats] [checkbox=litetags] [checkbox=parenttags] [checkbox=childtags]', $args) . $html->p->notecatstags; case 'robots': $html = $this->html; $args->formtitle = 'robots.txt'; $args->robots = trobotstxt::i()->text; $args->appcache = appcache_manifest::i()->text; $tabs = new tuitabs(); $tabs->add('robots.txt', '[editor=robots]'); $tabs->add('manifest.appcache', '[editor=appcache]'); return tuitabs::gethead() . $html->adminform($tabs->get(), $args); break; case 'secure': $args->echoexception = $options->echoexception; $args->usersenabled = $options->usersenabled; $args->reguser = $options->reguser; $args->parsepost = $options->parsepost; $args->show_draft_post = $options->show_draft_post; $args->xxxcheck = $options->xxxcheck; $filter = tcontentfilter::i(); $args->phpcode = $filter->phpcode; $args->removephp = tthemeparser::i()->removephp; $args->useshell = tupdater::i()->useshell; $backuper = tbackuper::i(); $args->filertype = tadminhtml::array2combo(array('auto' => 'auto', 'file' => 'file', 'ftp' => 'ftp', 'ftpsocket' => 'ftpsocket'), $backuper->filertype); $args->formtitle = $lang->securehead; $result = $html->adminform(' [checkbox=echoexception] [checkbox=xxxcheck] [checkbox=usersenabled] [checkbox=reguser] [checkbox=removephp] [checkbox=phpcode] [checkbox=parsepost] [checkbox=show_draft_post] [combo=filertype] [checkbox=useshell] ', $args); $form = new adminform($args); $form->title = $lang->changepassword; $args->oldpassword = ''; $args->newpassword = ''; $args->repassword = ''; $form->items = '[password=oldpassword] [password=newpassword] [password=repassword]'; $form->submit = 'changepassword'; $result .= $form->get(); return $result; } $result = $this->html->{$this->name}($args); return $this->html->fixquote($result); }
public function getcontent() { $result = ''; $cm = tcommentmanager::i(); $options = litepublisher::$options; $html = $this->gethtml('comments'); $lang = tlocal::admin('commentmanager'); $args = new targs(); $tabs = new tuitabs(); $args->comstatus = tadminhtml::array2combo(array('closed' => $lang->closed, 'reg' => $lang->reg, 'guest' => $lang->guest, 'comuser' => $lang->comuser), $options->comstatus); $args->filterstatus = $cm->filterstatus; $args->commentsapproved = $cm->defstatus == 'approved'; $args->checkduplicate = $cm->checkduplicate; $args->commentsdisabled = $options->commentsdisabled; $args->pingenabled = $options->pingenabled; $tabs->add($lang->options, ' [combo=comstatus] [checkbox=filterstatus] [checkbox=commentsapproved] [checkbox=checkduplicate] [checkbox=commentsdisabled] [checkbox=pingenabled] '); $args->commentpages = $options->commentpages; $args->commentsperpage = $options->commentsperpage; $args->comments_invert_order = $options->comments_invert_order; $args->hidelink = $cm->hidelink; $args->redir = $cm->redir; $args->nofollow = $cm->nofollow; $tabs->add($lang->templates, ' [checkbox=commentpages] [text=commentsperpage] [checkbox=comments_invert_order] [checkbox=hidelink] [checkbox=redir] [checkbox=nofollow] '); $rss = trssholdcomments::i(); $args->rsscount = $rss->count; $args->rsstemplate = $rss->template; $tabs->add($lang->holdrss, ' <h4><a href="$site.url/rss/holdcomments.xml">$lang.holdrss</a></h4> [text=rsscount] [editor=rsstemplate] '); $args->canedit = $cm->canedit; $args->candelete = $cm->candelete; $args->confirmlogged = $cm->confirmlogged; $args->confirmguest = $cm->confirmguest; $args->confirmcomuser = $cm->confirmcomuser; $args->confirmemail = $cm->confirmemail; $tabs->add($lang->perms, ' [checkbox=canedit] [checkbox=candelete] [checkbox=confirmlogged] [checkbox=confirmguest] [checkbox=confirmcomuser] [checkbox=confirmemail] '); $args->sendnotification = $cm->sendnotification; $args->comuser_subscribe = $cm->comuser_subscribe; $useroptions = tuseroptions::i(); $args->defaultsubscribe = $useroptions->defvalues['subscribe'] == 'enabled'; $args->authorpost_subscribe = $useroptions->defvalues['authorpost_subscribe'] == 'enabled'; $subscribe = tsubscribers::i(); $args->locklist = $subscribe->locklist; $args->subscribe_enabled = $subscribe->enabled; $tab = new tuitabs(); $tab->add($lang->options, ' [checkbox=sendnotification] [checkbox=defaultsubscribe] [checkbox=subscribe_enabled] [checkbox=authorpost_subscribe] [checkbox=comuser_subscribe] '); $tab->add($lang->locklist, '[editor=locklist]'); $tabs->add($lang->subscribe, $tab->get()); $mesgtabs = new tuitabs(); $tc = ttemplatecomments::i(); foreach (array('logged', 'reqlogin', 'regaccount', 'guest', 'comuser', 'loadhold') as $name) { $args->{$name} = $tc->{$name}; $mesgtabs->add($lang->{$name}, "[editor={$name}]"); } $tabs->add($lang->mesgtabs, $mesgtabs->get()); $args->formtitle = $lang->title; return $html->adminform($tabs->get(), $args); }
public function getcontent() { $result = ''; switch ($this->name) { case 'menu': if (isset($_GET['action']) && in_array($_GET['action'], array('delete', 'setdraft', 'publish'))) { $result .= $this->doaction($this->idget(), $_GET['action']); } $result .= $this->getmenulist(); return $result; case 'edit': case 'editfake': $id = tadminhtml::idparam(); $menus = tmenus::i(); $parents = array(0 => '-----'); foreach ($menus->items as $item) { $parents[$item['id']] = $item['title']; } $html = $this->html; $lang = tlocal::i('menu'); $args = new targs(); $args->adminurl = $this->adminurl; $args->ajax = tadminhtml::getadminlink('/admin/ajaxmenueditor.htm', "id={$id}&get"); $args->editurl = tadminhtml::getadminlink('/admin/menu/edit', 'id'); if ($id == 0) { $args->id = 0; $args->title = ''; $args->parent = tadminhtml::array2combo($parents, 0); $args->order = tadminhtml::array2combo(range(0, 10), 0); $status = 'published'; } else { if (!$menus->itemexists($id)) { return $this->notfound; } $menuitem = tmenu::i($id); $args->id = $id; $args->title = $menuitem->getownerprop('title'); $args->parent = tadminhtml::array2combo($parents, $menuitem->parent); $args->order = tadminhtml::array2combo(range(0, 10), $menuitem->order); $status = $menuitem->status; } $args->status = tadminhtml::array2combo(array('draft' => $lang->draft, 'published' => $lang->published), $status); if ($this->name == 'editfake' || $id > 0 && $menuitem instanceof tfakemenu) { $args->url = $id == 0 ? '' : $menuitem->url; $args->type = 'fake'; $args->formtitle = $lang->faketitle; return $html->adminform('[text=title] [text=url] [combo=parent] [combo=order] [combo=status] [hidden=type] [hidden=id]', $args); } $tabs = new tuitabs(); $tabs->add($lang->title, ' [text=title] [combo=parent] [combo=order] [combo=status] [hidden=id] '); $ajaxurl = tadminhtml::getadminlink('/admin/ajaxmenueditor.htm', "id={$id}&get"); $tabs->ajax($lang->view, "{$ajaxurl}=view"); $tabs->ajax('SEO', "{$ajaxurl}=seo"); $ajaxeditor = tajaxmenueditor::i(); $args->formtitle = $lang->edit; return tuitabs::gethead() . $html->adminform($tabs->get() . sprintf('<div>%s</div>', $ajaxeditor->geteditor('raw', $id == 0 ? '' : $menuitem->rawcontent, true)), $args); } }