function doedit($wf) { $thisclass_string = wra_adminmenu::getbaseclass(); if ($thisclass_string != '') { eval('$thisclass=new ' . $thisclass_string . '($wf);'); if (!true) { WRA::gotopage('admin'); return; } if (wra_adminpage::isedit()) { $backurl = wra_adminmenu::getassoc(WRA::getcurpage()); if (!WRA::ir('id')) { WRA::gotopage($backurl); WRA::nicedie(); } if (!WRA::ir('type')) { $code = '$isexist=' . $thisclass_string . '::isexist($wf,' . WRA::r('id') . ');'; } else { $pid_class = wra_adminmenu::getclass(wra_adminmenu::getassoc(WRA::r('mod')) . '_' . WRA::r('type')); // echo $pid_class; $code = '$isexist=' . $pid_class . '::isexist($wf,' . WRA::r('id') . ');'; } eval($code); if (!$isexist && WRA::r('id') != -1) { WRA::gotopage($backurl); WRA::nicedie(); } } else { $backurl = WRA::getcurpage(); if (WRA::ir('pid')) { if (!WRA::ir('type')) { $code = '$isexist=' . $thisclass_string . '::isexist($wf,' . WRA::r('pid') . ');'; } else { $pid_class = wra_adminmenu::getclass(WRA::r('mod') . '_' . WRA::r('type')); // echo $pid_class; $code = '$isexist=' . $pid_class . '::isexist($wf,' . WRA::r('pid') . ');'; } eval($code); if (!$isexist) { WRA::gotopage($backurl); WRA::nicedie(); } } } $this->deletebyId($wf, $thisclass, $thisclass_string); } }
> <?php if ($this->useleftmenu != -1) { if ($this->inner_content_text) { ?> <?php if ($this->cap->addnewitem != "") { if (!strpos(WRA::getcurpage(), "edit")) { $addlink = wra_adminmenu::getassoc(WRA::getcurpage()) . '&id=-1'; } else { $addlink = WRA::getcurpage() . '&id=-1'; } if (WRA::ir("pid")) { $addlink .= "&pid=" . WRA::r("pid"); } $backlink = wra_adminmenu::getassoc(WRA::getcurpage()) . '&id=-1'; if ($this->cap->addnewitemlink != "") { $backlink .= $this->cap->addnewitemlink; } if (WRA::ir('pid')) { $backlink .= "&pid=" . WRA::r('pid'); } if ($this->useadd_button) { ?> <div class="add_block_inner"><a href="<?php WRA::e($addlink . $this->cap->addnewitemlink); ?> "><?php WRA::e($this->cap->addnewitem); ?>
function flush() { //есть шанс погибнуть разобравшись в этом коде //вывод таблицы ?> <?php if ($this->subtable) { ?> <br/> <div class="text_header_edit"> <?php WRA::e($this->headertext); ?> </div> <?php } ?> <?php $rowi = 0; $columni = 0; if ($this->pid != "-1" && $this->pid != "0" && $this->pid != "" && $this->useheader) { ?> <div><a href="<?php WRA::e(WRA::getcurpage() . '&pid=' . $this->parent_parentid); ?> ">←вверх</a></div> <?php } if (count($this->rows) == 0) { ?> <div class="sub_text"> <center>Нет ни одной записи</center> </div><?php } else { ?> <div><input type="text" id="filternow" value="Поиск"></div><?php } while ($rowi < count($this->rows)) { $columni = 0; ?> <div class="sub_text" id="sub_text-<?php WRA::e($this->rows[$rowi]["id"]); ?> "><?php while ($columni < count($this->columns)) { if ($this->columns[$columni]->header == "id" || $this->columns[$columni]->header == "Ключевые слова") { $columni++; continue; } $tdcontent = ""; $tdcontent = $this->columns[$columni]->prefix . $this->rows[$rowi][$columni] . $this->columns[$columni]->sufix; switch ($this->columns[$columni]->type) { case column_type_h2header: if (!$this->columns[$columni]->isparent) { WRA::e('<h2>' . $tdcontent . '</h2>'); } else { if ($this->info == "") { WRA::e('<h2><a href="' . WRA::getcurpage() . '&pid=' . $this->rows[$rowi]["id"] . '">' . $tdcontent . "</a></h2>"); } else { WRA::e('<h2><a href="' . WRA::getcurpage() . '&pid=' . $this->rows[$rowi]["id"] . '&type=' . $this->info . '">' . $tdcontent . "</a></h2>"); } } break; case column_type_date: WRA::e('<span class="date_content">' . $this->columns[$columni]->header . ': ' . $tdcontent . '</span>'); break; case column_type_link: WRA::e('<a target="_blank" href="' . $tdcontent . '">' . $tdcontent . "</a>"); break; case column_type_check: WRA::e('<p>' . $this->columns[$columni]->header . ': '); if ($tdcontent == 1) { WRA::e('Да'); } else { WRA::e('Нет'); } WRA::e('</p>'); break; case column_type_pic: if ($tdcontent != "") { WRA::e('<p><img src="' . WRA::base_url() . $tdcontent . '"/></p>'); } else { WRA::e($tdcontent); } break; case column_type_id: break; case column_type_text: default: ?> <p<?php if ($this->rowstyle != "") { WRA::e(' style="' . $this->rowstyle . '"'); } ?> ><?php if ($tdcontent != "") { WRA::e($this->columns[$columni]->header . ''); } if ($this->columns[$columni]->isparent) { WRA::e('<h2><a href="' . WRA::getcurpage() . '&pid=' . $this->rows[$rowi]["id"] . '">' . $tdcontent . "</a></h2>"); } else { WRA::e($tdcontent); } ?> </p><?php break; } $columni++; } ?> <div class="red_del"><?php if ($this->candelete) { ?> <a href="<?php WRA::e(WRA::getcurpage()); ?> &id=<?php WRA::e($this->rows[$rowi]["id"]); ?> " class="delete_link deletetd <?php WRA::e($this->deleteeditclass); ?> " style="display:none" id="del-<?php WRA::e($this->rows[$rowi]["id"]); if ($this->info != "") { WRA::e("-" . $this->info); } ?> ">Удалить</a><?php } if ($this->canedit) { ?> <a href="<?php WRA::e(WRA::getcurpage()); ?> &id=<?php WRA::e($this->rows[$rowi]["id"]); ?> " class="edit_link edittd <?php WRA::e($this->deleteeditclass); ?> " style="display:none" id="ed-<?php WRA::e($this->rows[$rowi]["id"]); if ($this->info != "") { WRA::e("-" . $this->info); } ?> ">Редактировать</a><?php } ?> </div><?php $rowi++; ?> </div> <?php } }
static function admintable($saveid = -1, $pid = -1) { //таблица просмотра для вывода в админке $wt = new wra_admintable(); $wt->link = WRA::getcurpage(); $wt->query = 'SELECT id, CONCAT(fb0.username,\' \',fb0.usersurname), fb0.points, fb0.access_token, fb0.email, fb0.phone, fb0.adres FROM `' . WRA_CONF::$db_prefix . "twu` as fb0 ORDER BY `points` desc "; $c0 = new wra_column('id', column_type_id); $c0->defaultvalue = $saveid; $wt->addcolumn($c0); $c0 = new wra_column('', column_type_h2header); $wt->addcolumn($c0); $c0 = new wra_column('баллы', column_type_text); $wt->addcolumn($c0); $wt->load($saveid, $pid); return $wt; }
<?php defined("WERUA") or die('<div style="margin:0 0 auto;width:200px">Ошибка запуска. Contact </div>'); ?> <td valign="top"> <div class="block_main_content_cn"> <?php switch ($useleftmenu) { case 0: $topmenu = wra_adminmenu::getlist0(); ?> <div> <?php $createltblock = 1; $curp = WRA::getcurpage(); foreach ($topmenu as $t0) { $level1 = wra_adminmenu::getlist1nosub($t0->id); $useblock = false; foreach ($level1 as $l1) { if ($l1->link . "edit" == $curp || $l1->link == $curp || wra_adminmenu::getassoc($curp) == $l1->link) { $useblock = true; if ($createltblock == 2) { ?> </ul> <?php $createltblock = 1; } } else { $levelsub = wra_adminmenu::getlistsub($t0->id, $l1->id); foreach ($levelsub as $ls0) {
static function admintable($saveid = -1, $pid = -1) { $wt = new wra_admintable(); $wt->link = WRA::getcurpage(); $wt->query = "SELECT \n\t\tne0.id,\n\t\tne0.value\n\t\tFROM `" . WRA_CONF::$db_prefix . "langed` as ne0 WHERE ne0.value <> '' and lang='ru'"; $c0 = new wra_column("id", column_type_id); $c0->defaultvalue = $saveid; $wt->addcolumn($c0); $c0 = new wra_column("value", column_type_h2header); $wt->addcolumn($c0); $wt->load($saveid, $pid); return $wt; }
static function admintable($saveid = -1, $pid = -1) { //таблица просмотра для вывода в админке $wt = new wra_admintable(); $wt->link = WRA::getcurpage(); $wt->query = "SELECT \nvi0.id,\nvi0.header,\nvi0.content,\nvi0.link,\nvi0.menuid,\nvi0.infoid\n FROM `" . WRA_CONF::$db_prefix . "virtualpage` as vi0 "; $c0 = new wra_column("id", column_type_id); $c0->defaultvalue = $saveid; $wt->addcolumn($c0); $c0 = new wra_column("название поля", column_type_h2header); $wt->addcolumn($c0); $wt->load($saveid, $pid); return $wt; }
WRA::e('Нет'); } break; case admincolumntype::pic: if ($tdcontent != "") { WRA::e('<img style="height:100px" src="' . WRA::base_url() . $tdcontent . '"/>'); } else { WRA::e($tdcontent); } break; case admincolumntype::id: break; case admincolumntype::text: default: if ($ac->isparent) { WRA::e('<h2><a href="' . WRA::getcurpage() . '&pid=' . $ad->id . '">' . $tdcontent . "</a></h2>"); } else { WRA::e($tdcontent); } } ?> </td> <?php } ?> <td><a href="<?php WRA::e(WRA::base_url() . $this->curnode->link . "/edit?id=" . $ad0->id); ?> ">редактировать</a> </td> <td><a href="<?php WRA::e(WRA::base_url() . $this->curnode->link . "/view?id=" . $ad0->id);