function getform($name, $type, $act, $id) { $objResponse = new xajaxResponse(); ob_start(); $_GET['InfoID'] = $id; $form = new cls_form($type, $act); $form->draw(); $output = ob_get_contents(); ob_end_clean(); //$objResponse->setCharEncoding("windows-1251"); $output = iconv('windows-1251', 'utf-8', $output); $objResponse->addAssign($name, "innerHTML", $output); return $objResponse; }
function rec($id) { global $_GET, $type, $_POST; $q = select("select AnswerID from ut_messages where MessageID='{$id}'"); $row = runsql("select * from ut_messages where MessageID='{$q['0']}'"); if (mysql_num_rows($row)) { while ($r1 = mysql_fetch_array($row)) { print "<img src=/images/hr.gif height=10px width=473px style=\"margin-top:5px;margin-bottom:5px\">"; $_GET['id'] = $r1[MessageID]; $f = new cls_form($type, "message"); $f->Draw(); } rec($q[0]); } }
if (!$id) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><h4>Наши новости</h4></td> </tr> <tr> <td valign="top" bgcolor="#f7f8f6"> <table width="100%" border="0" cellspacing="10" cellpadding="0"> <?php $form = new cls_form("main/news", "browse"); $res = $form->sqlres; //$res=runsql("select MaterialID,Date,Headline_$lang as Headline, Name_$lang as Title, Message_$lang as Message, Small from ut_materials where TypeID=7 order by Date desc limit 0,3"); while ($r = mysql_fetch_array($res)) { print "\r\n <tr>\r\n <td width=\"130\" align=\"center\" valign=\"top\"><img src=\"{$img_url}?id={$r['MaterialID']}&record=2\" alt=\"\" width=\"69\"></td>\r\n <td valign=\"top\"><h5>" . $r[Title] . "</h5>\r\n <p>" . $r[Headline] . "</p>\r\n <p align=\"right\"><a href=\"{$site_url}" . "news.php?id={$r['MaterialID']}\" class=\"lnk\">подробнее</a></p></td>\r\n </tr>\r\n\t "; } ?> </table> <?php print "<table width=100% cellspacing=0 cellpadding=2 border=0>"; $form->Pages(''); print "</table>"; ?> </td> </tr>
<?php require '../../config.php'; header("Content-type: text/html;charset=windows-1251"); require_once $engine_path . "xml/arena/load/jshttp.class.php"; $JsHttpRequest =& new Subsys_JsHttpRequest_Php("windows-1251"); $result['answer'] = ""; $form = new cls_form('arena/tournaments', 'group'); $form->draw(); print "<br>"; $_RESULT = $result;
images/bg.gif" style="margin-top:0px;background-repeat:repeat-x"> <?php print "<script src='" . $path . "functions.js' language='javascript' type='text/javascript'></script>"; print "<table width=600px height=500px bgcolor=ffffff cellspacing=0 cellpadding=0><td>"; drawheader(""); $q = select("select PermissionID from en_permissions where UserID='{$auth->user}'"); $q[0] = 1; if (!$q[0]) { print icon("error", "У вас нет прав доступа"); } else { if ($act == "delete" && $step && !$er) { $form = new cls_form($type, "select"); $act = "select"; } if ($act == "insert" && $step && !$er) { $form = new cls_form($type, "select"); $act = "select"; } print "\r\nВы авторизованы как {$auth->nick}. <a href=\"" . $site_url . "login.php?do=logout&act=auth&type=main/authorize\">[выйти]</a> <a href=\"/\">[ooo-parsek.ru]</a>"; print "<hr><center>"; $menu = new cls_menu("menu/menu", "toolbar", 1); $menu->Draw(''); $menu = new cls_menu("menu/toolbar", "toolbar/" . substr($type, 0, strpos($type, "/")), 2); $menu->bgcolor = "f3f3f3"; $menu->align = "center"; $menu->headerbg = ""; $menu->height = "25px"; $menu->width = "100%"; $menu->cellspacing = 1; $menu->bgcolor = "ffffff"; $menu->hcolor = "f3f3f3";
function rec($id) { global $type, $HTTP_POST_VARS; $q = select("select AnswerID from ut_messages where MessageID='{$id}'"); $row = runsql("select * from ut_messages where MessageID='{$q['0']}'"); if (mysql_num_rows($row)) { while ($r1 = mysql_fetch_array($row)) { print "<hr>"; $HTTP_GET_VARS['id'] = $r1[MessageID]; $HTTP_POST_VARS['id'] = $r1[MessageID]; $f = new cls_form($type, "message"); $f->Draw(); } rec($q[0]); } }
if ($form_ok) { $form = new cls_form($type, 'select'); $act = "select"; } require $site_path . "left.php"; ?> <center><img src="/images/art/market.jpg" width=500px height=300px></center> <?php $r1 = select("select sum(Slots) as Slots from tm_buildings where UserID='{$auth->user}'"); foreach ($auth->rst[Gladiators] as $k => $v) { $t = $v[TypeID]; $q = select("select Slots from ut_gladiator_types where TypeID='{$t}'"); $slots += $q[0]; } $slotsnum = $r1[Slots] - $slots; if ($act == "buy") { $r = select("select Slots from ut_slaves left outer join ut_gladiator_types using (TypeID) where GladiatorID='{$id}'"); if ($r[Slots] > $slotsnum) { print icon("error", "Не хватает слотов для покупки раба<br>У Вас осталось слотов: {$slotsnum}<br>Необходимо слотов: {$r3['Slots']}") . "<br>"; $act = 'select'; $form1 = new cls_form($type, $act); $form1->Draw(); } else { $form->Draw(); } } else { print "<br><h3>У Вас осталось слотов: {$slotsnum}</h3>"; print "<h3>Доступные рабы:</h3>"; $form->Draw(); } require $site_path . "bottom.php";
$app->draw(); //print "$type,$act1"."app"; } elseif ($myrecord[0] && ($act != "my" || !$step) && !$myrecord[UserID2]) { print "<br><br>"; $app = new cls_form($type, "my"); $app->draw(); } elseif (!$myrecord[UserID2]) { print "[<a href=arena.php?typeid={$typeid}&do=1>Подать заявку</a>] "; } } print "<br><br>"; print "<div id=battles>"; if ($act != "battles") { $form = new cls_form($type, "battles"); } $show = 1; require "get_battles.php"; if ($result["redirect"]) { print "<script>document.location.href='{$result['redirect']};'</script>"; } print "</div>"; print "<br><font size=4pt>"; print "Предыдущие " . downstr($f_type[$_GET[typeid]]); print "</font><br><br>"; unset($sort); $history = new cls_form($type, "history"); $history->draw(); print "<div align=right><a href={$PHP_SELF}?typeid={$typeid}&act=fullhistory>Все " . downstr($f_type[$_GET[typeid]]) . " »</a></div>"; } } require $site_path . "bottom.php";
<td height=20px style="background-image: url(/images/index2-menu3-bg.jpg); background-repeat: no-repeat; background-position: center top;" bgcolor=ffffff> <?php $menu->Draw(''); ?> </tr> <tr> <td height=100% valign=top ><table width=100% cellpadding=6 cellspacing=0 border=0><td> <?php if ($act == "search" && $step) { $searchform = new cls_form($type, 'search'); $form = new cls_form($type, 'select'); $searchform->set_form_params($searchform->sql); $form->sql = $searchform->sql; } else { $form = new cls_form($type, $act); if ($step || $act == "delete" || $act == "create" || $act == "drop") { $form->runsql(''); } if ($step && $act == "update" && !$er) { $form = new cls_form($type, "select"); unset($id); unset($act); } } if ($step && !$er && $type == "engine/tags" && $act == "translate") {
$type = "gladiators/builder"; $act = "select"; require $engine_path . "cls/auth/session.php"; $glad2 = get_gladiators($auth->user); $glad2 = $serialized; require $site_path . "up.php"; $fields = array(); if (!$id) { $q = select("select * from ft_agreements where (UserID1='{$auth->user}' or UserID2='{$auth->user}') and Approved=1"); $id = $q[RecordID]; } $ob = xml_contents($engine_path . "/xml/gladiators/builder.xml"); $ar = $ob->childNodes(); $localization = ""; foreach ($ar as $a) { $forma = new cls_form("gladiators/builder", $a->tagname); $arr = array(); foreach ($forma->getfields() as $field) { $control = new cls_controls($field, $this); if ($control) { $arr[$control->name] = $control; } } $fields[$a->tagname] = $arr; } function DrawControl($game, $type, $formaat) { global $fields; if ($fields[$game][$type]) { $fields[$game][$type]->format = $formaat; $fields[$game][$type]->Draw(0, '');
function drawform($type, $act) { $form = new cls_form($type, $act); $form->Draw(); }
$_GET['guild'] = $guild; print "<center><font size=+1><img src=/images/gd_guilds/small/{$q['GuildID']}.jpg> {$q['Name']}</center></font><br>"; print "Дата регистрации: " . date("d.m.Y", $q[Date]) . "<br>"; $q1 = select("select Login from ut_users where UserID='{$q['UserID']}'"); if ($q[UserID] != $q[FounderID]) { $q1 = select("select Login from ut_users where UserID='{$q['FounderID']}'"); } else { $q2[Login] = $q1[Login]; } print "Владелец: <a href=/users/{$q['UserID']}>" . $q1[Login] . "</a><br>"; print "Основатель: <a href=/users/{$q['FounderID']}>" . $q2[Login] . "</a><br>"; print "Адрес сайта: <a href={$q['Url']} target=_blank>{$q['Url']}</a><br>"; $gd = select("select GuildID,GuildStatusID from ut_users where UserID='{$auth->user}'"); if ($gd[GuildID] == $guild && $gd[GuildStatusID] == 1) { print "<a href={$PHP_SELF}?id={$guild}&act=leave&step=1 onclick=\"return confirm('Вы действительно хотите отказаться от членства в гильдии?')\">Покинуть гильдию</a><br>"; } elseif ($gd[GuildID] == $guild) { print "<i>Заявка на вступление в гильдию рассматривается</i><br>"; } elseif ((!$gd[GuildID] || !$gd[GuildStatusID]) && $q[Newbies] == 0) { print "<b>Прием членов в данную гильдию закрыт</b>"; } elseif (!$gd[GuildID] || !$gd[GuildStatusID]) { print "<a href={$PHP_SELF}?id={$guild}&act=join&step=1><b>Вступить в гильдию</b></a><br>"; } if ($q[Description]) { print "<br><i>{$q['Description']}</i><br>"; } print "<br>"; $f = new cls_form($type, "members"); $f->draw(); print "</center><div align=right><a href={$PHP_SELF}>вернуться к списку</a> <img src=\"/images/marker3.gif\" width=11 height=11 border=0></center><br>"; } require $site_path . "bottom.php";
<?php if ($type) { $form = new cls_form($type, $act); unset($form_result); if ($step && $form->act == "search") { $searchform = $form; $act = "select"; $form = new cls_form($type, 'select'); $form->sql = $searchform->sql; $form->vip = $searchform->vip; $form->numrows = $searchform->numrows; unset($step); } if ($step && !$form->sql) { $form->sql = $form->select; } unset($runsql); if ($step) { $form_result = $form->runsql(1); $runsql = 1; } if ($form_ok == 1) { $form_result = icon('ok', set_params($form->success)); //if($act=="insert"||$act=="update") $form = new cls_form($type); } if ($form->redirect) { $form->redirect = set_params($form->redirect); } if ($step && !$er && $form->redirect && $form_result) { if (strstr($form->redirect, "?")) {