} else { echo _NDEDICATED; } echo "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['hostport']) . "</a></td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>" . "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['gametype']) . "</td></tr>"; if ($data[$GSgame]['gamespermap']) { echo "<tr><td>" . _GAMESPERMAP . "</td><td>" . GetArrVal($data[$GSgame]['gamespermap']) . "</td></tr>"; } echo "<tr><td>" . _PLAYERS . "</td><td>" . $vp . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['password']) == '1') { echo _PASSREQY; } else { echo _PASSREQN; } echo "</td></tr>" . "<tr><td>" . _TIMELIMIT . "</td><td>"; if (GetArrVal($data[$GSgame]['timelimit']) == '0') { echo _NONE; } else { if (GetArrVal($data[$GSgame]['timelimit']) == '1') { echo GetArrVal($data[$GSgame]['timelimit']) . " " . _MINUTE; } else { echo GetArrVal($data[$GSgame]['timelimit'] . " " . _MINUTES); } } echo "</td></tr>" . "<tr><td>" . _FF . "</td><td>" . Abled($data[$GSgame]['teamdamage'] == '0') . "</td></tr>" . "<tr><td>" . _TIMELEFT . "</td><td>" . GetArrVal($data[$GSgame]['timeleft']) . "</td></tr>" . "<tr><td>" . _TIMELIMIT . "</td><td>" . YesNo($data[$GSgame]['timelimit']) . "</td></tr>"; if (isset($data[$GSgame]['winpoints'])) { echo "<tr><td>" . _POINTSWIN . "</td><td>" . GetArrVal($data[$GSgame]['winpoints']) . "</td></tr>"; } if (isset($data[$GSgame]['powerups'])) { echo "<tr><td>" . _POWERUPS . "</td><td>" . GetArrVal($data[$GSgame]['powerups']) . "</td></tr>"; } echo "<tr><td align=\"center\" colspan=\"2\"><a href=\"http://www.codemasters.com/igi2\" target=\"_blank\"><img border=\"0\" src=\"modules/" . $module_name . "/output_templates/" . $data[$GSgame]['custom']['id'] . "/logo.png\"></a></td></tr></table>";
* ->class('someclass'), * for a placeholder: ->placeholder('Some text'). If the attribute doesn't * take a value just omit it, so : ->required() * * In addition to HTML attributes, each element takes meta-data such as the * submitted value. All meta-data is set in exactly the same way but is prefixed * with a single underscore. For example, you can set the form's show_submitted * flag with ->_show_submitted(true), or force an initial check on a specific * item in a radioset using ->_value('name') -- in this case you are setting up * the element to appear as if that value was already submitted to it. * * This is done to make form specification as terse and fluent as possible * -- yet still giving control where needed. * **/ $contact_form = Form('contact', './')->setRenderer($r)->onSuccess('MySuccessHandler')->novalidate()->add(Fieldset('About you...', 'about')->class('about')->add(Checkbox('control', '>Collect Personal Details', 'ok')->_ignore_parent_fields('disabled,readonly,required'))->add(Input('salutation', 'Title', 'Your title please')->autofocus()->datalist($salutations)->required())->add(Input('name', 'Your Name', 'Your name please')->autocomplete('off')->required()->validator('myNameValidator'))->add(Email('email', 'Your Email', 'Your email address')->required()->autocomplete('off'))->add(URL('url', 'Website', 'Your URL here (optional)'))->add(Hidden('secret', '123'))->add(Password('pass', 'Your Password', 'Enter a password of 10 characters or more')->required()->minlength(10, '10+ chars. please'))->add(Password('oth', 'Repeat Password', 'Enter password again')->required()->minlength(10, '10+ chars. please')->matches('pass', 'This must match what you typed in the "Your Password" field.'))->add(Tel('tel', 'Phone', 'A contact number please')->pattern('/^[\\s]*[\\+]?[0-9][-0-9]*[\\s-0-9]*[\\s]*$/', 'Enter a valid phone number. This can start with an international code like +44 if needed.'))->add(Input('human', 'Are you human?', 'No bots please')->pattern('/^yes|yep|yeah|sure am|indeed$/i', 'Some form of affirmation is needed.')->required())->add(YesNo('alive', 'Were you alive when you celebrated your last birthday?', 'Babies excluded.', 'Just yes or no please.')->required())->add(Integer('age', 'How old are you?')->value(5)->min(2)->max(10)))->add(Fieldset('Your message...')->add(TextArea('msg', 'Message', 'Your message to us')->required()->pattern('/^[^0-9]*$/', 'No numbers please!')->whitelist('great,good,fantastic,amazing')))->add(Fieldset('Legal stuff...')->add(Radios('agreement', '>Do you agree to our terms?', $conditions)->required('* Please select one of the options')->validator('myConditionValidator'))->add(Checkboxes('options', 'Additional Options...', $checkboxes)->required()->value('spam_me'))->add(MSelect('depts', 'Forward to which departments?', $departments)->required('Please choose at least one department')->value('complaints-2 , complaints-3 , sales-0')))->add(Submit('Send'))->process(); /** ==================== Custom formatters follow ==================== * * These all override, or append to, some aspect of the renderer's output * and should allow you fine enough control over your form output not to * have to resort to hand-crafted HTML. * * They are all enabled by setting values on the renderer. * Thay are also totally option. In fact, the default output of the renderer * should be fine in most cases so you can probably delete all the code in * this part of the file. **/ /** * Controls the output that goes at the head of the form when there are any * invalid elements. Use this only if the renderer's default markup isn't * what you need.
echo "<tr><td>" . _TIMELIMIT . "</td><td>" . GetArrVal($data[$GSgame]['timelimit']) . "</td></tr>"; } if (isset($data[$GSgame]['fraglimit'])) { echo "<tr><td>" . _FRAGLIMIT . "</td><td>" . GetArrVal($data[$GSgame]['fraglimit']) . "</td></tr>"; } if (isset($data[$GSgame]['mp_pointlimit'])) { echo "<tr><td>" . _POINTLIMIT . "</td><td>" . GetArrVal($data[$GSgame]['mp_pointlimit']) . "</td></tr>"; } if (isset($data[$GSgame]['capturelimit'])) { echo "<tr><td>" . _CAPLIMIT . "</td><td>" . GetArrVal($data[$GSgame]['capturelimit']) . "</td></tr>"; } if (isset($data[$GSgame]['sv_allowdownload'])) { echo "<tr><td>" . _ALLOWDOWNLOADS . "</td><td>" . YesNo($data[$GSgame]['sv_allowdownload']) . "</td></tr>"; } if (isset($data[$GSgame]['sv_allowDownload'])) { echo "<tr><td>" . _ALLOWDOWNLOADS . "</td><td>" . YesNo($data[$GSgame]['sv_allowDownload']) . "</td></tr>"; } if (isset($data[$GSgame]['sv_punkbuster'])) { echo "<tr><td>" . _PUNKBUSTER . "</td><td>" . Abled($data[$GSgame]['sv_punkbuster']) . "</td></tr>"; } if (isset($data[$GSgame]['.location'])) { echo "<tr><td>" . _LOCATION . "</td><td>" . GetArrVal($data[$GSgame]['.location']) . "</td></tr>"; } if (isset($data[$GSgame]['Location'])) { echo "<tr><td>" . _LOCATION . "</td><td>" . GetArrVal($data[$GSgame]['Location']) . "</td></tr>"; } if (isset($data[$GSgame]['.admin'])) { if (isset($data[$GSgame]['.email'])) { echo "<tr><td valign='top'>" . _ADMININFO . "</td><td valign='top'><a href=\"mailto:" . GetArrVal($data[$GSgame]['.email']) . "\">" . Q3Colors($data[$GSgame]['.admin'], 1) . "</a>"; } else { echo "<tr><td valign='top'>" . _ADMININFO . "</td><td valign='top'>" . Q3Colors($data[$GSgame]['.admin'], 0);
<?php echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='30%'>" . _SERVERNAME . "</td><td width='40%'>" . GetArrVal($data[$GSgame]['hostname']) . "</td><td width='40%' valign='top' rowspan='15'>" . MapPic($data[$GSgame]['custom']['id'], $data[$GSgame]['mapname'], 0, "") . "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . $data[$GSgame]['hostport'] . "</td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>"; if (isset($data[$GSgame]['DED'])) { echo "<tr><td>" . _DEDICATED . "</td><td>" . YesNo($data[$GSgame]['DED']) . "</td></tr>"; } if (isset($data[$GSgame]['gamever'])) { echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>"; } echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; if (isset($data[$GSgame]['gametype'])) { echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['gametype']) . "</td></tr>"; } echo "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['numplayers']) . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>"; if (isset($data[$GSgame]['password'])) { echo "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['password'])) { echo _PASSREQY; } else { echo _PASSREQN; } } if (isset($data[$GSgame]['fraglimit'])) { echo "<tr><td>" . _FRAGLIMIT . "</td><td>" . GetArrVal($data[$GSgame]['fraglimit']) . "</td></tr>"; } echo "<tr><td align=\"center\" colspan=\"2\"><a href=\"http://www.eagames.com/official/cc/renegade/us/\" target=\"_blank\"><img border=\"0\" src=\"modules/" . $module_name . "/output_templates/" . $data[$GSgame]['custom']['id'] . "/logo.jpg\"></a></td></tr></table>";
echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . GetArrVal($data[$GSgame]['custom']['address']) . ":" . GetArrVal($data[$GSgame]['custom']['query_port']) . " " . ASElink($data[$GSgame]['custom'], "HL") . "</td></tr>" . "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>" . "<tr><td>" . _SERVERTYPE . "</td><td>"; if (GetArrVal($data[$GSgame]['dedicated']) == 'd') { echo _DEDICATED; } else { echo _NDEDICATED; } echo " "; if (GetArrVal($data[$GSgame]['server_os']) == 'w') { echo _WINDOWS; } else { echo _LINUX; } echo "</td></tr>"; echo "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['map']) . "</td></tr>" . "<tr><td>" . _MOD . "</td><td>" . YesNo($data[$GSgame]['mod']) . "</td></tr>"; if (GetArrVal($data[$GSgame]['game_dir']) and GetArrVal($data[$GSgame]['mod'])) { echo "<tr><td>" . _GAMEDIR . "</td><td>/" . GetArrVal($data[$GSgame]['game_dir']) . "</td></tr>"; } echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['game_type']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['num_players']) . "/" . GetArrVal($data[$GSgame]['max_players']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['needpass'])) { echo _PASSREQY; } else { echo _PASSREQN; } echo "</td></tr>"; if (GetArrVal($data[$GSgame]['http_info'])) { echo "<tr><td>" . _INFO . "</td><td>" . GetArrVal($data[$GSgame]['http_info']) . "</td></tr>"; } if ($data[$GSgame]['http_download']) { echo "<tr><td>" . _MODDL . "</td><td>" . GetArrVal($data[$GSgame]['http_download']) . "</td></tr>";
} $cols[$p + 1][8] = GetArrVal($data[$GSgame]['players'][$p]['ping']); } echo PlayerList($cols); } echo "</td></tr>"; echo "</table>"; echo "</td></tr>" . "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>" . "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . GetArrVal($data[$GSgame]['hostport']) . "</td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>" . "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['gametype']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['numplayers']) . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['password']) == '0') { echo _PASSREQN; } else { echo _PASSREQY; } echo "</td></tr>"; if (isset($data[$GSgame]['sv_punkbuster'])) { echo "<tr><td>" . _PUNKBUSTER . "</td><td>" . Abled($data[$GSgame]['sv_punkbuster']) . "</td></tr>"; } if (isset($data[$GSgame]['AdminEMail']) and $data[$GSgame]['AdminEMail'] != '') { echo "<tr><td valign='top'>" . _ADMININFO . "</td><td valign='top'><a href=\"mailto:" . GetArrVal($data[$GSgame]['AdminEMail']) . "\">"; if (isset($data[$GSgame]['AdminName']) and $data[$GSgame]['AdminName'] != '') { echo GetArrVal($data[$GSgame]['AdminName']); } else { echo GetArrVal($data[$GSgame]['AdminEMail']); } echo "</a></td></tr>"; } echo "<tr><td>" . _NUMTEAMS . "</td><td>" . GetArrVal($data[$GSgame]['numteams']) . "</td></tr>" . "<tr><td>" . _OFFICIAL . "</td><td>" . YesNo($data[$GSgame]['official']) . "</td></tr>" . "<tr><td>" . _MISSIONTIME . "</td><td>" . GetArrVal($data[$GSgame]['mission_time']) . "</td></tr>" . "<tr><td>" . _CURRENTROUND . "</td><td>" . GetArrVal($data[$GSgame]['current_round']) . "</td></tr>"; if (isset($data[$GSgame]['score_t0']) and isset($data[$GSgame]['score_t1'])) { echo "<tr><td>" . _SCORE . "</td><td>" . GetArrVal($data[$GSgame]['score_t0']) . "/" . GetArrVal($data[$GSgame]['score_t1']) . "</td></tr>"; } echo "<tr><td colspan=\"2\"><a href=\"http://www.americasarmy.com\"><img border=\"0\" src=\"modules/" . $module_name . "/output_templates/" . $data[$GSgame]['custom']['id'] . "/logo.png\"></a></td></tr></table>";
function DisplayCategories($parentid = 0, $sublevelmarker = '') { global $db, $config, $link, $dle_vb_conf; if ($parentid != 0) { $sublevelmarker .= '--'; } $getcategories = $db->query("SELECT * FROM " . PREFIX . "_category WHERE parentid = '{$parentid}' ORDER BY posi ASC"); while ($row = $db->get_row($getcategories)) { $link .= "<tr><td style=\"padding-right:3px;\">" . $sublevelmarker . "<a class=\"list\" href=\"{$config['http_home_url']}index.php?do=cat&category=" . $row['alt_name'] . "\" target=\"_blank\">" . stripslashes($row['name']) . "</a></td><td><input class=edit type=text style=\"text-align: center;\" name='save_con[vb_link_forumid][{$row['id']}]' value='{$dle_vb_conf['vb_link_forumid'][$row['id']]}' size=10></td></tr><tr><td background=\"engine/skins/images/mline.gif\" height=1 colspan=2></td></tr>"; DisplayCategories($row['id'], $sublevelmarker); } } $link = "<table><tr><td>{$dle_vb_lang['category']}</td><td>{$dle_vb_lang['forums']}</td></tr>"; DisplayCategories(); $link .= "</table>"; $settings_array = array('block_last' => array(array("title" => $dle_vb_lang['allow_forum_block'], "descr" => $dle_vb_lang['allow_forum_block_desc'], "setting" => YesNo('vb_lastpost_onoff'), "regexp" => false), array("title" => $dle_vb_lang['count_post'], "descr" => $dle_vb_lang['count_post_desc'], "setting" => Input('vb_block_new_count_post'), "regexp" => '#^[0-9]+$#', "name" => 'vb_block_new_count_post'), array("title" => $dle_vb_lang['leght_name'], "descr" => $dle_vb_lang['leght_name_desc'], "setting" => Input('vb_block_new_leght_name'), "regexp" => '#^[0-9]*$#', "name" => 'vb_block_new_leght_name'), array("title" => $dle_vb_lang['cache_time'], "descr" => $dle_vb_lang['cache_time_desc'], "setting" => Input('vb_block_new_cache_time'), "regexp" => '#^[0-9]*$#', "name" => 'vb_block_new_cache_time'), array("title" => $dle_vb_lang['bad_forum_for_block'], "descr" => $dle_vb_lang['bad_forum_for_block_desc'], "setting" => Input('vb_block_new_badf'), "regexp" => '#^[0-9,]*$#', "name" => 'vb_block_new_badf'), array("title" => $dle_vb_lang['good_forum_for_block'], "descr" => $dle_vb_lang['good_forum_for_block_desc'], "setting" => Input('vb_block_new_goodf'), "regexp" => '#^[0-9,]*$#', "name" => 'vb_block_new_goodf')), 'block_birthday' => array(array("title" => $dle_vb_lang['allow_birthday_block'], "descr" => $dle_vb_lang['allow_birthday_block_desc'], "setting" => YesNo('vb_birthday_onoff'), "regexp" => false), array("title" => $dle_vb_lang['cache_time'], "descr" => $dle_vb_lang['cache_time_desc'], "setting" => Input('vb_block_birthday_cache_time'), "regexp" => '#^[0-9]*$#', "name" => 'vb_block_birthday_cache_time'), array("title" => $dle_vb_lang['count_birthday'], "descr" => $dle_vb_lang['count_birthday_desc'], "setting" => Input('count_birthday'), "regexp" => '#^[0-9]+$#', "name" => 'count_birthday'), array("title" => $dle_vb_lang['no_user_birthday'], "descr" => $dle_vb_lang['no_user_birthday_desc'], "setting" => Input('no_user_birthday', 35), "regexp" => false), array("title" => $dle_vb_lang['spacer'], "descr" => $dle_vb_lang['spacer_desc'], "setting" => Input('vb_block_birthday_spacer'), "regexp" => false), array("title" => $dle_vb_lang['birthday_block'], "descr" => $dle_vb_lang['birthday_block_desc'], "setting" => TextArea('birthday_block'), "regexp" => '#^.+$#si', "name" => 'birthday_block')), 'block_online' => array(array("title" => $dle_vb_lang['allow_online_block'], "descr" => $dle_vb_lang['allow_online_block_desc'], "setting" => YesNo('vb_online_onoff'), "regexp" => false), array("title" => $dle_vb_lang['cache_time'], "descr" => $dle_vb_lang['cache_time_desc'], "setting" => Input('vb_block_online_cache_time'), "regexp" => '#^[0-9]*$#', "name" => 'vb_block_online_cache_time'), array("title" => $dle_vb_lang['separator'], "descr" => $dle_vb_lang['separator_desc'], "setting" => Input('separator'), "regexp" => false), array("title" => $dle_vb_lang['vb_block_online_user_link_forum'], "descr" => $dle_vb_lang['vb_block_online_user_link_forum_desc'], "setting" => YesNo('vb_block_online_user_link_forum'), "regexp" => false)), 'links' => array(array("title" => $dle_vb_lang['goforum'], "descr" => $dle_vb_lang['goforum_desc'], "setting" => YesNo('vb_goforum'), "regexp" => false), array("title" => $dle_vb_lang['link_title'], "descr" => $dle_vb_lang['link_title_desc'], "setting" => makeDropDown(array("old" => $dle_vb_lang['old_title'], "title" => $dle_vb_lang['title']), "save_con[link_title]", "{$dle_vb_conf['link_title']}"), "regexp" => false), array("title" => $dle_vb_lang['link_text'], "descr" => $dle_vb_lang['link_text_desc'], "setting" => makeDropDown(array("full" => $dle_vb_lang['full_text'], "short" => $dle_vb_lang['short_text'], "old" => $dle_vb_lang['old_text']), "save_con[link_text]", "{$dle_vb_conf['link_text']}"), "regexp" => false), array("title" => $dle_vb_lang['vb_link_show_no_register'], "descr" => $dle_vb_lang['vb_link_show_no_register_desc'], "setting" => YesNo('vb_link_show_no_register'), "regexp" => false), array("title" => $dle_vb_lang['link_on_news'], "descr" => $dle_vb_lang['link_on_news_desc'], "setting" => YesNo('link_on_news'), "regexp" => false), array("title" => $dle_vb_lang['show_count'], "descr" => $dle_vb_lang['show_count_desc'], "setting" => YesNo('vb_link_show_count'), "regexp" => false), array("title" => $dle_vb_lang['show_count_full'], "descr" => $dle_vb_lang['show_count_full_desc'], "setting" => YesNo('vb_link_show_count_full'), "regexp" => false), array("title" => $dle_vb_lang['link_user'], "descr" => $dle_vb_lang['link_user_desc'], "setting" => makeDropDown(array("old" => $dle_vb_lang['old_user'], "author" => $dle_vb_lang['author'], "cur_user" => $dle_vb_lang['cur_user']), "save_con[link_user]", "{$dle_vb_conf['link_user']}"), "regexp" => false), array("title" => $dle_vb_lang['name_post_on_forum'], "descr" => $dle_vb_lang['name_post_on_forum_desc'], "setting" => TextArea('vb_link_name_post_on_forum'), "regexp" => false), array("title" => $dle_vb_lang['text_post_on_forum'], "descr" => $dle_vb_lang['text_post_on_forum_desc'], "setting" => TextArea('text_post_on_forum'), "regexp" => false), array("title" => $dle_vb_lang['link_on_forum'], "descr" => $dle_vb_lang['link_on_forum_desc'], "setting" => TextArea('vb_link_link_on_forum'), "regexp" => false), array("title" => $dle_vb_lang['postusername'], "descr" => $dle_vb_lang['postusername_desc'], "setting" => Input('postusername', 35), "regexp" => '#^.+$#i', "name" => 'postusername'), array("title" => $dle_vb_lang['postuserid'], "descr" => $dle_vb_lang['postuserid_desc'], "setting" => Input('postuserid'), "regexp" => '#^[0-9]+$#', "name" => 'postuserid'), array("title" => $dle_vb_lang['forumid'], "descr" => $dle_vb_lang['forumid_desc'], "setting" => $link, "regexp" => false)), 'settings' => array(array("title" => $dle_vb_lang['vb_content_charset'], "descr" => $dle_vb_lang['vb_content_charset_desc'], "setting" => Input('vb_content_charset'), "regexp" => false), array("title" => $dle_vb_lang['allow_module'], "descr" => $dle_vb_lang['allow_module_desc'], "setting" => YesNo('vb_onoff'), "regexp" => false), array("title" => $dle_vb_lang['allow_reg'], "descr" => $dle_vb_lang['allow_reg_desc'], "setting" => YesNo('vb_reg'), "regexp" => false), array("title" => $dle_vb_lang['allow_profile'], "descr" => $dle_vb_lang['allow_profile_desc'], "setting" => YesNo('vb_profile'), "regexp" => false), array("title" => $dle_vb_lang['allow_lostpass'], "descr" => $dle_vb_lang['allow_lostpass_desc'], "setting" => YesNo('vb_lost'), "regexp" => false), array("title" => $dle_vb_lang['allow_pm'], "descr" => $dle_vb_lang['allow_pm_desc'], "setting" => YesNo('vb_pm'), "regexp" => false), array("title" => $dle_vb_lang['allow_login'], "descr" => $dle_vb_lang['allow_login_desc'], "setting" => YesNo('vb_login'), "regexp" => false), array("title" => $dle_vb_lang['allow_logout'], "descr" => $dle_vb_lang['allow_logout_desc'], "setting" => YesNo('vb_logout'), "regexp" => false), array("title" => $dle_vb_lang['allow_admin'], "descr" => $dle_vb_lang['allow_admin_desc'], "setting" => YesNo('vb_admin'), "regexp" => false), array("title" => $dle_vb_lang['vb_login_create_account'], "descr" => $dle_vb_lang['vb_login_create_account_desc'], "setting" => YesNo('vb_login_create_account'), "regexp" => false), array("title" => $dle_vb_lang['vb_login_create_dle_account'], "descr" => $dle_vb_lang['vb_login_create_dle_account_desc'], "setting" => YesNo('vb_login_create_dle_account'), "regexp" => false))); if (defined('INSTALL')) { return false; } require ENGINE_DIR . '/modules/dle_vs_vb.php'; class vBIntegration_admin extends vBIntegration { public $vBfields = array(); public $vBGroups = array(); public function __construct(db &$db) { parent::__construct($db); $this->_db_connect(); $this->_initvBField(); $this->_initvBGroups(); $this->_db_disconnect();
function Show() { $osid = $this->osid(); $os_description = $this->description(); $os_OS = $this->OS(); $os_version = $this->version(); $os_path = $this->path(); $os_magic = $this->magic(); $os_osfeatures = $this->osfeatures(); $os_op_mode = $this->op_mode(); $os_pid = $this->pid(); $os_shared = $this->shared(); $os_osname = $this->osname(); $creator = $this->creator(); $created = $this->created(); $mustclean = $this->mustclean(); $nextosid = $this->nextosid(); $def_parentosid = $this->def_parentosid(); $max_concurrent = $this->max_concurrent(); $reboot_waittime = $this->reboot_waittime(); $uuid = $this->uuid(); $ezid = $this->ezid(); $mfs = $this->mfs(); if (!($creator_user = User::Lookup($creator))) { TBERROR("Error getting object for user {$creator}", 1); } $showuser_url = CreateURL("showuser", $creator_user); if (!$os_description) { $os_description = " "; } if (!$os_version) { $os_version = " "; } if (!$os_path) { $os_path = " "; } if (!$os_magic) { $os_magic = " "; } if (!$os_osfeatures) { $os_osfeatures = " "; } if (!$os_op_mode) { $os_op_mode = " "; } if (!$created) { $created = "N/A"; } if (!$reboot_waittime) { $reboot_waittime = " "; } # # Generate the table. # echo "<table align=center border=1>\n"; echo "<tr>\n <td>Name: </td>\n <td class=\"left\">{$os_osname}</td>\n </tr>\n"; echo "<tr>\n <td>Project: </td>\n <td class=\"left\">\n <a href='showproject.php3?pid={$os_pid}'>{$os_pid}</a></td>\n </tr>\n"; echo "<tr>\n <td>Creator: </td>\n <td class=left>\n <a href='{$showuser_url}'>{$creator}</a></td>\n \t </tr>\n"; echo "<tr>\n <td>Created: </td>\n <td class=left>{$created}</td>\n \t </tr>\n"; echo "<tr>\n <td>Description: </td>\n <td class=\"left\">{$os_description}</td>\n </tr>\n"; echo "<tr>\n <td>Operating System: </td>\n <td class=\"left\">{$os_OS}</td>\n </tr>\n"; echo "<tr>\n <td>Version: </td>\n <td class=\"left\">{$os_version}</td>\n </tr>\n"; echo "<tr>\n <td>Path: </td>\n <td class=\"left\">{$os_path}</td>\n </tr>\n"; echo "<tr>\n <td>Magic (uname -r -s): </td>\n <td class=\"left\">{$os_magic}</td>\n </tr>\n"; echo "<tr>\n <td>Features: </td>\n <td class=\"left\">{$os_osfeatures}</td>\n </tr>\n"; echo "<tr>\n <td>Operational Mode: </td>\n <td class=\"left\">{$os_op_mode}</td>\n </tr>\n"; if (isset($max_concurrent) and $max_concurrent > 0) { echo "<tr>\n <td>Max Concurrent Usage: </td>\n <td class=\"left\">{$max_concurrent}</td>\n </tr>\n"; } echo "<tr>\n <td>Reboot Waittime: </td>\n <td class=\"left\">{$reboot_waittime}</td>\n </tr>\n"; echo "<tr>\n <td>Shared?: </td>\n <td class=left>" . YesNo($os_shared) . "</td>\n </tr>\n"; echo "<tr>\n <td>Must Clean?: </td>\n <td class=left>" . YesNo($mustclean) . "</td>\n </tr>\n"; if ($nextosid) { if ($nextosid == 0) { echo "<tr>\n\t\t <td>Next Osid: </td>\n\t\t <td class=left>\n\t\t\t Mapped via DB table: osid_map</td></tr>\n"; } else { $nextosinfo = OSinfo::Lookup($nextosid); $nextosname = $nextosinfo->osname(); echo "<tr>\n <td>Next Osid: </td>\n <td class=left>\n <a href='showosinfo.php3?osid={$nextosid}'>\n {$nextosname}</a></td>\n </tr>\n"; } } if ($def_parentosid) { $nextosinfo = OSinfo::Lookup($def_parentosid); $nextosname = $nextosinfo->osname(); echo "<tr>\n <td>Parent Osid: </td>\n <td class=left>\n <a href='showosinfo.php3?osid={$def_parentosid}'>\n {$nextosname}</a></td>\n </tr>\n"; } if ($ezid) { echo "<tr>\n <td>Image Link: </td>\n <td class=left>\n <a href='showimageid.php3?imageid={$osid}'>\n {$os_osname}</a></td>\n </tr>\n"; } if ($mfs) { echo "<tr>\n <td>MFS: </td>\n <td class=left>Yes</td>\n </tr>\n"; } echo "<tr>\n <td>Internal ID: </td>\n <td class=\"left\">{$osid}</td>\n </tr>\n"; echo "<tr>\n <td>UUID: </td>\n <td class=left>{$uuid}</td>\n </tr>\n"; if ($def_parentosid) { $parent_result = DBQueryFatal("select m.parent_osid,o.osname,o.pid " . " from os_submap as m " . "left join os_info as o on o.osid=m.parent_osid " . "where m.osid='{$osid}'"); if (mysql_num_rows($parent_result)) { while ($prow = mysql_fetch_array($parent_result)) { $posid = $prow["parent_osid"]; $posname = $prow["osname"]; echo "<tr>"; echo " <td>Parent {$posid}:</td>"; echo " <td class=left>"; echo " <a href='showosinfo.php3?osid={$posid}'>"; echo "{$posname}</a></td>\n"; echo "</tr>\n"; } } } echo "</table>\n"; }
echo "<tr><td>" . _CAMPAIGN . "</td><td>" . GetArrVal($data[$GSgame]['.Campaign']) . "</td></tr>"; } echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['shortversion']) . "</td></tr>"; echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['g_gametype']) . "</td></tr>" . "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['num_players']) . "/" . GetArrVal($data[$GSgame]['sv_maxclients']) . "</td></tr>" . "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['pswrd'])) { echo _PASSREQY; } else { echo _PASSREQN; } echo "</td></tr>"; if (isset($data[$GSgame]['timelimit'])) { echo "<tr><td>" . _TIMELIMIT . "</td><td>" . GetArrVal($data[$GSgame]['timelimit']) . "</td></tr>"; } if (isset($data[$GSgame]['sv_allowAnonymous'])) { echo "<tr><td>" . _ALLOWANON . "</td><td>" . YesNo($data[$GSgame]['sv_allowAnonymous']) . "</td></tr>"; } if (isset($data[$GSgame]['g_maxlives'])) { echo "<tr><td>" . _MAXLIVES . "</td><td>"; if (GetArrVal($data[$GSgame]['g_maxlives']) == '0') { echo _UNLIMITED; } else { echo $data[$GSgame]['g_maxlives']; } echo "</td></tr>"; } if (isset($data[$GSgame]['scr_friendlyfire'])) { echo "<tr><td>" . _FF . "</td><td>" . Abled($data[$GSgame]['scr_friendlyfire']) . "</td></tr>"; } if (isset($data[$GSgame]['g_friendlyFire'])) { echo "<tr><td>" . _FF . "</td><td>" . Abled($data[$GSgame]['g_friendlyFire']) . "</td></tr>";
<?php echo "<table border='0' cellpadding='0' cellspacing='10' width='100%'>" . "<tr><td width='20%'>" . _SERVERNAME . "</td><td width='40%'>" . GetArrVal($data[$GSgame]['hostname']) . "</td>" . "<td width='40%' valign='top' rowspan='12'>" . "<table><tr><td colspan=3>" . MapPic($data[$GSgame]['custom']['id'], $data[$GSgame]['mapname'], 0, "") . "</td></tr><tr><td>"; if (GetArrVal($data[$GSgame]['numplayers']) != 0) { $cols[0] = array(_PLAYERNAME, _PING, _FRAGS, _TEAM); for ($p = 0; $p <= $data[$GSgame]['numplayers']; $p++) { if (GetArrVal($data[$GSgame]['players'][$p]['player'] != '')) { $cols[$p + 1][0] = GetArrVal($data[$GSgame]['players'][$p]['player']); $cols[$p + 1][1] = GetArrVal($data[$GSgame]['players'][$p]['ping']); $cols[$p + 1][2] = GetArrVal($data[$GSgame]['players'][$p]['score']); $cols[$p + 1][3] = GetArrVal($data[$GSgame]['players'][$p]['team']); } } echo PlayerList($cols); } echo "</td></tr></table></td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td><a href=\"tribesv://" . $data[$GSgame]['custom']['address'] . ":" . GetArrVal($data[$GSgame]['hostport']) . "\">" . $data[$GSgame]['custom']['address'] . ":" . GetArrVal($data[$GSgame]['hostport']) . "</a></td></tr>" . "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>" . "<tr><td>" . _DEDICATED . "</td><td>" . YesNo($data[$GSgame]['dedicated']) . "</td></tr>" . "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>" . "<tr><td>" . _GAMEMODE . "</td><td>" . GetArrVal($data[$GSgame]['gamemode']) . "</td></tr>" . "<tr><td>" . _GAMETYPE . "</td><td>"; $gametype = substr(GetArrVal($data[$GSgame]['gametype']), 0, 3); switch ($gametype) { case "CTF": echo _CTF; break; case "Arena": echo _ARENA; break; case "Rabbit": echo _RABBIT; break; case "Ball": echo _BALL; break; case "Fuel":
<?php $group = $group_no_guest = get_usergroup(); unset($group_no_guest[5]); $show_moder = array($job->lang['general_show_moder_now_new'], $job->lang['general_show_moder_all'], $job->lang['general_show_moder_new'], $job->lang['general_show_moder_new_old'], $job->lang['general_show_moder_old']); $company_need_fields = $vacancy_need_fields = $resume_need_fields = "<div align=\"left\" style=\"margin-left:150px;\">"; $company_need_fields_array = array('contact_person', 'description', 'logo', 'phone', 'site', 'email', 'address', 'date_register'); foreach ($company_need_fields_array as $field) { $company_need_fields .= $tpl->InputCheckbox("save_con[company_need_field][]", $field, !@in_array($field, $job->config['company_need_field']) ? 0 : 1) . " " . $job->lang[$field] . "<br />"; } $company_need_fields .= "</div>"; $vacancy_need_fields_array = array('experience', 'student', 'education', 'sex', 'language', 'work_place', 'work_type', 'work_schedule', 'age_min', 'age_max', 'salary_min', 'salary_max', 'description', 'email', 'phone'); foreach ($vacancy_need_fields_array as $field) { $vacancy_need_fields .= $tpl->InputCheckbox("save_con[vacancy_need_field][{$field}]", $field, !@in_array($field, $job->config['vacancy_need_field']) ? 0 : 1) . " " . $job->lang[$field] . "<br />"; } $vacancy_need_fields .= "</div>"; $resume_need_fields_array = array('experience', 'student', 'education', 'sex', 'language', 'work_place', 'work_type', 'work_schedule', 'age', 'salary_min', 'salary_max', 'description', 'photo', 'email', 'phone'); foreach ($resume_need_fields_array as $field) { $resume_need_fields .= $tpl->InputCheckbox("save_con[resume_need_field][{$field}]", $field, !@in_array($field, $job->config['resume_need_field']) ? 0 : 1) . " " . $job->lang[$field] . "<br />"; } $resume_need_fields .= "</div>"; $general_currency = "<div align=\"left\" style=\"margin-left:150px;\"><table>"; foreach (job::$currecy_array as $currency => $currency_name) { $general_currency .= "<tr><td align='right'>" . $currency_name . "</td><td> " . $tpl->InputText("save_con[currency][{$currency}]", $job->config['currency'][$currency], 'size="8" style="margin:2px;"') . "</td></tr>"; } $general_currency .= "</table></div>"; $sub_sort = array('ASC' => $job->lang['sub_sort_ASC'], 'DESC' => $job->lang['sub_sort_DESC']); $settings_array = array("vacancy" => array(array("title" => $job->lang['vacacny_only_company'], "descr" => $job->lang['vacacny_only_company_desc'], "setting" => YesNo('vacacny_only_company'), "regexp" => false), array("title" => $job->lang['vacancy_allow_add'], "descr" => $job->lang['vacancy_allow_add_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[vacancy_allow_add][]', $job->config['vacancy_allow_add']), "regexp" => false), array("title" => $job->lang['vacancy_add_capcha'], "descr" => $job->lang['vacancy_add_capcha_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group, 'save_con[vacancy_add_capcha][]', $job->config['vacancy_add_capcha']), "regexp" => false), array("title" => $job->lang['vacancy_add_no_moder'], "descr" => $job->lang['vacancy_add_no_moder_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group, 'save_con[vacancy_add_no_moder][]', $job->config['vacancy_add_no_moder']), "regexp" => false), array("title" => $job->lang['vacancy_allow_edit'], "descr" => $job->lang['vacancy_allow_edit_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group_no_guest, 'save_con[vacancy_allow_edit][]', $job->config['vacancy_allow_edit']), "regexp" => false), array("title" => $job->lang['vacancy_allow_del'], "descr" => $job->lang['vacancy_allow_del_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group_no_guest, 'save_con[vacancy_allow_del][]', $job->config['vacancy_allow_del']), "regexp" => false), array("title" => $job->lang['vacancy_allow_change_exp'], "descr" => $job->lang['vacancy_allow_change_exp_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group_no_guest, 'save_con[vacancy_allow_change_exp][]', $job->config['vacancy_allow_change_exp']), "regexp" => false), array("title" => $job->lang['vacancy_allow_extend'], "descr" => $job->lang['vacancy_allow_extend_desc'], "setting" => $tpl->SelectionMulti(array(-1 => $job->lang['company_admins']) + $group_no_guest, 'save_con[vacancy_allow_extend][]', $job->config['vacancy_allow_extend']), "regexp" => false), array("title" => $job->lang['vacancy_need_field'], "descr" => $job->lang['vacancy_need_field_desc'], "setting" => $vacancy_need_fields, "regexp" => false), array("title" => $job->lang['vacancy_allow_reg'], "descr" => $job->lang['vacancy_allow_reg_desc'], "setting" => YesNo('vacancy_allow_reg'), "regexp" => false), array("title" => $job->lang['vacancy_allow_show_filter'], "descr" => $job->lang['vacancy_allow_show_filter_desc'], "setting" => YesNo('vacancy_allow_show_filter'), "regexp" => false), array("title" => $job->lang['vacancy_default_sort'], "descr" => $job->lang['vacancy_default_sort_desc'], "setting" => $tpl->selection(Vacancy::$sort_array, 'save_con[vacancy_default_sort]', $job->config['vacancy_default_sort']) . " " . $tpl->selection($sub_sort, 'save_con[vacancy_default_sub_sort]', $job->config['vacancy_default_sub_sort']), "regexp" => false), array("title" => $job->lang['vacancy_default_day'], "descr" => $job->lang['vacancy_default_day_desc'], "setting" => $tpl->selection(Vacancy::$count_day_array, 'save_con[vacancy_default_day]', $job->config['vacancy_default_day']), "regexp" => false), array("title" => $job->lang['vacancy_count_per_page'], "descr" => $job->lang['vacancy_count_per_page_desc'], "setting" => $tpl->InputText('save_con[vacancy_count_per_page]', $job->config['vacancy_count_per_page'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'vacancy_count_per_page'), array("title" => $job->lang['block_last_vacancies'], "descr" => $job->lang['block_last_vacancies_desc'], "setting" => YesNo('block_last_vacancies'), "regexp" => false), array("title" => $job->lang['block_last_vacancies_count'], "descr" => $job->lang['block_last_vacancies_count_desc'], "setting" => $tpl->InputText('save_con[block_last_vacancies_count]', $job->config['block_last_vacancies_count'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'block_last_vacancies_count'), array("title" => $job->lang['RSS_vacancies_count'], "descr" => $job->lang['RSS_vacancies_count_desc'], "setting" => $tpl->InputText('save_con[RSS_vacancies_count]', $job->config['RSS_vacancies_count'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'RSS_vacancies_count')), "resume" => array(array("title" => $job->lang['resume_allow_add'], "descr" => $job->lang['resume_allow_add_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[resume_allow_add][]', $job->config['resume_allow_add']), "regexp" => false), array("title" => $job->lang['resume_add_capcha'], "descr" => $job->lang['resume_add_capcha_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[resume_add_capcha][]', $job->config['resume_add_capcha']), "regexp" => false), array("title" => $job->lang['resume_add_no_moder'], "descr" => $job->lang['resume_add_no_moder_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[resume_add_no_moder][]', $job->config['resume_add_no_moder']), "regexp" => false), array("title" => $job->lang['resume_allow_edit'], "descr" => $job->lang['resume_allow_edit_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[resume_allow_edit][]', $job->config['resume_allow_edit']), "regexp" => false), array("title" => $job->lang['resume_allow_del'], "descr" => $job->lang['resume_allow_del_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[resume_allow_del][]', $job->config['resume_allow_del']), "regexp" => false), array("title" => $job->lang['resume_allow_change_exp'], "descr" => $job->lang['resume_allow_change_exp_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[resume_allow_change_exp][]', $job->config['resume_allow_change_exp']), "regexp" => false), array("title" => $job->lang['resume_allow_extend'], "descr" => $job->lang['resume_allow_extend_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[resume_allow_extend][]', $job->config['resume_allow_extend']), "regexp" => false), array("title" => $job->lang['resume_need_field'], "descr" => $job->lang['resume_need_field_desc'], "setting" => $resume_need_fields, "regexp" => false), array("title" => $job->lang['resume_allow_one_resume'], "descr" => $job->lang['resume_allow_one_resume_desc'], "setting" => YesNo('resume_allow_one_resume'), "regexp" => false), array("title" => $job->lang['resume_allow_reg'], "descr" => $job->lang['resume_allow_reg_desc'], "setting" => YesNo('resume_allow_reg'), "regexp" => false), array("title" => $job->lang['resume_allow_show_filter'], "descr" => $job->lang['resume_allow_show_filter_desc'], "setting" => YesNo('resume_allow_show_filter'), "regexp" => false), array("title" => $job->lang['resume_default_sort'], "descr" => $job->lang['resume_default_sort_desc'], "setting" => $tpl->selection(Resume::$sort_array, 'save_con[resume_default_sort]', $job->config['resume_default_sort']) . " " . $tpl->selection($sub_sort, 'save_con[resume_default_sub_sort]', $job->config['resume_default_sub_sort']), "regexp" => false), array("title" => $job->lang['resume_default_day'], "descr" => $job->lang['resume_default_day_desc'], "setting" => $tpl->selection(Vacancy::$count_day_array, 'save_con[resume_default_day]', $job->config['resume_default_day']), "regexp" => false), array("title" => $job->lang['resume_count_per_page'], "descr" => $job->lang['resume_count_per_page_desc'], "setting" => $tpl->InputText('save_con[resume_count_per_page]', $job->config['resume_count_per_page'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'resume_count_per_page'), array("title" => $job->lang['resume_watermark'], "descr" => $job->lang['resume_watermark_desc'], "setting" => YesNo('resume_watermark'), "regexp" => false), array("title" => $job->lang['resume_photo_size_byte'], "descr" => $job->lang['resume_photo_size_byte_desc'], "setting" => $tpl->InputText('save_con[resume_photo_size_byte]', $job->config['resume_photo_size_byte'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'resume_photo_size_byte'), array("title" => $job->lang['resume_photo_size'], "descr" => $job->lang['resume_photo_size_desc'], "setting" => $tpl->InputText('save_con[resume_photo_size]', $job->config['resume_photo_size'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'resume_photo_size'), array("title" => $job->lang['resume_size_for_watermark'], "descr" => $job->lang['resume_size_for_watermark_desc'], "setting" => $tpl->InputText('save_con[resume_size_for_watermark]', $job->config['resume_size_for_watermark'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'resume_size_for_watermark'), array("title" => $job->lang['block_last_resumes'], "descr" => $job->lang['block_last_resumes_desc'], "setting" => YesNo('block_last_resumes'), "regexp" => false), array("title" => $job->lang['block_last_resumes_count'], "descr" => $job->lang['block_last_resumes_count_desc'], "setting" => $tpl->InputText('save_con[block_last_resumes_count]', $job->config['block_last_resumes_count'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'block_last_resumes_count'), array("title" => $job->lang['RSS_resumes_count'], "descr" => $job->lang['RSS_resumes_count_desc'], "setting" => $tpl->InputText('save_con[RSS_resumes_count]', $job->config['RSS_resumes_count'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'RSS_resumes_count')), "company" => array(array("title" => $job->lang['company_allow_manage'], "descr" => $job->lang['company_allow_manage_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[company_allow_manage][]', $job->config['company_allow_manage']), "regexp" => false), array("title" => $job->lang['company_add_capcha'], "descr" => $job->lang['company_add_capcha_desc'], "setting" => $tpl->SelectionMulti($group, 'save_con[company_add_capcha][]', $job->config['company_add_capcha']), "regexp" => false), array("title" => $job->lang['company_allow_reg'], "descr" => $job->lang['company_allow_reg_desc'], "setting" => YesNo('company_allow_reg'), "regexp" => false), array("title" => $job->lang['company_allow_del'], "descr" => $job->lang['company_allow_del_desc'], "setting" => YesNo('company_allow_del'), "regexp" => false), array("title" => $job->lang['company_show_vacancies'], "descr" => $job->lang['company_show_vacancies_desc'], "setting" => YesNo('company_show_vacancies'), "regexp" => false), array("title" => $job->lang['company_need_field'], "descr" => $job->lang['company_need_field_desc'], "setting" => $company_need_fields, "regexp" => false), array("title" => $job->lang['company_per_page'], "descr" => $job->lang['company_per_page_desc'], "setting" => $tpl->InputText('save_con[company_per_page]', $job->config['company_per_page'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'company_per_page'), array("title" => $job->lang['company_watermark'], "descr" => $job->lang['company_watermark_desc'], "setting" => YesNo('company_watermark'), "regexp" => false), array("title" => $job->lang['company_logo_size_byte'], "descr" => $job->lang['company_logo_size_byte_desc'], "setting" => $tpl->InputText('save_con[company_logo_size_byte]', $job->config['company_logo_size_byte'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'company_logo_size_byte'), array("title" => $job->lang['company_logo_size'], "descr" => $job->lang['company_logo_size_desc'], "setting" => $tpl->InputText('save_con[company_logo_size]', $job->config['company_logo_size'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'company_logo_size'), array("title" => $job->lang['company_size_for_watermark'], "descr" => $job->lang['company_size_for_watermark_desc'], "setting" => $tpl->InputText('save_con[company_size_for_watermark]', $job->config['company_size_for_watermark'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'company_size_for_watermark')), "general" => array(array("title" => $job->lang['general_allow_module'], "descr" => $job->lang['general_allow_module_desc'], "setting" => YesNo('general_allow_module'), "regexp" => false), array("title" => $job->lang['general_name_module'], "descr" => $job->lang['general_name_module_desc'], "setting" => $tpl->InputText("save_con[general_name_module]", $job->config['general_name_module']), "regexp" => '#[a-z_\\-]+#', "name" => 'general_name_module'), array("title" => $job->lang['general_mod_rewrite'], "descr" => $job->lang['general_mod_rewrite_desc'], "setting" => YesNo('general_mod_rewrite'), "regexp" => false), array("title" => $job->lang['general_AJAX'], "descr" => $job->lang['general_AJAX_desc'], "setting" => YesNo('general_AJAX'), "regexp" => false), array("title" => $job->lang['general_cache'], "descr" => $job->lang['general_cache_desc'], "setting" => YesNo('general_cache'), "regexp" => false), array("title" => $job->lang['general_main_page'], "descr" => $job->lang['general_main_page_desc'], "setting" => YesNo('general_main_page'), "regexp" => false), array("title" => $job->lang['general_RSS'], "descr" => $job->lang['general_RSS_desc'], "setting" => YesNo('general_RSS'), "regexp" => false), array("title" => $job->lang['general_inform'], "descr" => $job->lang['general_inform_desc'], "setting" => YesNo('general_inform'), "regexp" => false), array("title" => $job->lang['general_email'], "descr" => $job->lang['general_email_desc'], "setting" => $tpl->InputText('save_con[general_email]', $job->config['general_email']), "regexp" => '#(^[\\w-]+(\\.[\\w-]+)*@([\\w-]+)\\.+[a-zA-Z]{2,3}$|^$)#', "name" => 'general_email'), array("title" => $job->lang['general_currency'], "descr" => $job->lang['general_currency_desc'], "setting" => $general_currency, "regexp" => '#^[0-9\\.]+$#', "name" => 'currency'), array("title" => $job->lang['general_moderator_edit'], "descr" => $job->lang['general_moderator_edit_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[general_moderator_edit][]', $job->config['general_moderator_edit']), "regexp" => false), array("title" => $job->lang['general_moderator_del'], "descr" => $job->lang['general_moderator_del_desc'], "setting" => $tpl->SelectionMulti($group_no_guest, 'save_con[general_moderator_del][]', $job->config['general_moderator_del']), "regexp" => false), array("title" => $job->lang['general_show_moder'], "descr" => $job->lang['general_show_moder_desc'], "setting" => $tpl->selection($show_moder, 'save_con[general_show_moder]', $job->config['general_show_moder']), "regexp" => false), array("title" => $job->lang['general_image_quality'], "descr" => $job->lang['general_image_quality_desc'], "setting" => $tpl->InputText('save_con[general_image_quality]', $job->config['general_image_quality'], 'size="8"'), "regexp" => '#^[0-9]+$#', "name" => 'general_image_quality'), array("title" => $job->lang['general_count_last_vacancy'], "descr" => $job->lang['general_count_last_vacancy_desc'], "setting" => $tpl->InputText('save_con[general_count_last_vacancy]', $job->config['general_count_last_vacancy'], 'size="8"'), "regexp" => '#[0-9]+#', "name" => 'general_count_last_vacancy'), array("title" => $job->lang['general_count_last_resume'], "descr" => $job->lang['general_count_last_resume_desc'], "setting" => $tpl->InputText('save_con[general_count_last_resume]', $job->config['general_count_last_resume'], 'size="8"'), "regexp" => '#[0-9]+#', "name" => 'general_count_last_resume'), array("title" => $job->lang['general_allow_statistic'], "descr" => $job->lang['general_allow_statistic_desc'], "setting" => YesNo('general_allow_statistic'), "regexp" => false), array("title" => $job->lang['general_debug'], "descr" => $job->lang['general_debug_desc'], "setting" => YesNo('general_debug'), "regexp" => false)));
echo PlayerList($cols); } echo "</td></tr></table>"; echo "</td></tr>" . "<tr><td>" . _HOSTADDRESS . "</td><td>" . $data[$GSgame]['custom']['address'] . ":" . $data[$GSgame]['custom']['query_port'] . "</td></tr>" . "<tr><td>" . _MAPNAME . "</td><td>" . GetArrVal($data[$GSgame]['mapname']) . "</td></tr>"; if (isset($data[$GSgame]['gameversion'])) { echo "<tr><td>" . _SVERSION . "</td><td>" . GetArrVal($data[$GSgame]['gamever']) . "</td></tr>"; } echo "<tr><td>" . _PING . "</td><td>" . $ping . "</td></tr>"; if (isset($data[$GSgame]['game'])) { echo "<tr><td>" . _GAMETYPE . "</td><td>" . GetArrVal($data[$GSgame]['game']) . "</td></tr>"; } if (isset($data[$GSgame]['Num Teams'])) { echo "<tr><td>" . _NUMTEAMS . "</td><td>" . GetArrVal($data[$GSgame]['Num Teams']) . "</td></tr>"; } if (isset($data[$GSgame]['Dedicated Server?'])) { echo "<tr><td>" . _DEDICATED . "</td><td>" . YesNo($data[$GSgame]['Dedicated Server?']) . "</td></tr>"; } echo "<tr><td>" . _PLAYERS . "</td><td>" . GetArrVal($data[$GSgame]['numplayers']) . "/" . GetArrVal($data[$GSgame]['maxplayers']) . "</td></tr>"; if (isset($data[$GSgame]['password'])) { echo "<tr><td>" . _PASSWORD . "</td><td>"; if (GetArrVal($data[$GSgame]['password'])) { echo _PASSREQY; } else { echo _PASSREQN; } } if (isset($data[$GSgame]['Time Limit'])) { echo "<tr><td>" . _TIMELIMIT . "</td><td>" . GetArrVal($data[$GSgame]['Time Limit']) . "</td></tr>"; } if (isset($data[$GSgame]['Kills Limit'])) { echo "<tr><td>" . _FRAGLIMIT . "</td><td>" . GetArrVal($data[$GSgame]['Kills Limit']) . "</td></tr>";
function Show() { global $WIKISUPPORT, $CVSSUPPORT, $TBPROJ_DIR, $TBCVSREPO_DIR; global $MAILMANSUPPORT, $OPSCVSURL, $USERNODE; $group = $this->DefaultGroup(); $pid = $this->pid(); $proj_idx = $this->pid_idx(); $proj_created = $this->created(); $proj_name = $this->name(); $proj_URL = $this->URL(); $proj_public = YesNo($this->ispublic()); $proj_funders = $this->funders(); $proj_head_idx = $this->head_idx(); $proj_members = $this->num_members(); $proj_pcs = $this->num_pcs(); # These are now booleans, not actual counts. $proj_linked = YesNo($this->linked_to_us()); $proj_why = nl2br($this->why()); $approved = YesNo($this->approved()); $expt_count = $this->expt_count(); $expt_last = $this->expt_last(); $wikiname = $group->wikiname(); $cvsrepo_public = $this->cvsrepo_public(); $allow_workbench = $this->allow_workbench(); # Before project approval, display ron/plab request status. if ($this->approved()) { $proj_ronpcs = YesNo(strpos($this->pcremote_ok(), "pcron") !== false); $proj_plabpcs = YesNo(strpos($this->pcremote_ok(), "pcplabphys") !== false); } else { $proj_ronpcs = YesNo($this->num_ron()); $proj_plabpcs = YesNo($this->num_pcplab()); } if (!($head_user = User::Lookup($proj_head_idx))) { TBERROR("Could not lookup object for user {$proj_head_idx}", 1); } $showuser_url = CreateURL("showuser", $head_user); $showproj_url = CreateURL("showproject", $this); $proj_head_uid = $head_user->uid(); if (!$expt_last) { $expt_last = " "; } echo "<center>\n <h3>Project Profile</h3>\n </center>\n <table align=center cellpadding=2 border=1>\n"; # # Generate the table. # echo "<tr>\n <td>Name: </td>\n <td class=\"left\">\n <a href='{$showproj_url}'>{$pid} ({$proj_idx})</a></td>\n </tr>\n"; echo "<tr>\n <td>Description: </td>\n <td class=\"left\">{$proj_name}</td>\n </tr>\n"; echo "<tr>\n <td>Project Head: </td>\n <td class=\"left\">\n <a href='{$showuser_url}'>{$proj_head_uid}</a></td>\n </tr>\n"; echo "<tr>\n <td>URL: </td>\n <td class=\"left\">\n <a href='{$proj_URL}'>{$proj_URL}</a></td>\n </tr>\n"; if ($WIKISUPPORT && isset($wikiname)) { $wikiurl = "gotowiki.php3?redurl={$wikiname}/WebHome"; echo "<tr>\n <td>Project Wiki:</td>\n <td class=\"left\">\n <a href='{$wikiurl}'>{$wikiname}</a></td>\n </tr>\n"; } if ($CVSSUPPORT) { $cvsdir = "{$TBCVSREPO_DIR}/{$pid}"; $cvsurl = "cvsweb/cvswebwrap.php3?pid={$pid}"; echo "<tr>\n <td>Project CVS Repository:</td>\n <td class=\"left\">\n {$cvsdir} <a href='{$cvsurl}'>(CVSweb)</a></td>\n </tr>\n"; $YesNo = YesNo($cvsrepo_public); $flip = $cvsrepo_public ? 0 : 1; echo "<tr>\n <td>CVS Repository Publically Readable?:</td>\n <td><a href=toggle.php?pid={$pid}&type=cvsrepo_public" . "&value={$flip}>{$YesNo}</a> (Click to toggle)</td>\n </tr>\n"; if ($cvsrepo_public) { $puburl = "{$OPSCVSURL}/?cvsroot={$pid}"; $pserver = ":pserver:anoncvs@{$USERNODE}:/cvsrepos/{$pid}"; echo "<tr>\n <td>Public CVSWeb Address:</td>\n <td><a href={$puburl}>" . htmlspecialchars($puburl) . "</a></td>\n </tr>\n"; echo "<tr>\n <td>CVS pserver Address:</td>\n <td>" . htmlspecialchars($pserver) . "</td>\n </tr>\n"; } } if ($MAILMANSUPPORT) { $mmurl = "gotommlist.php3?pid={$pid}"; echo "<tr>\n <td>Project Mailing List:</td>\n <td class=\"left\">\n <a href='{$mmurl}'>{$pid}-users</a> "; if (ISADMIN()) { $mmurl .= "&wantadmin=1"; echo "<a href='{$mmurl}'>(admin access)</a>"; } echo " </td>\n </tr>\n"; if (ISADMIN()) { $mmurl = "gotommlist.php3?listname={$pid}-admin&asadmin=1"; echo "<tr>\n <td>Project Admin Mailing List:</td>\n <td class=\"left\">\n <a href='{$mmurl}'>{$pid}-admin</a> "; $mmurl = "gotommlist.php3?listname={$pid}-admin&wantadmin=1"; echo "<a href='{$mmurl}'>(admin access)</a>"; echo " </td>\n </tr>\n"; } } echo "<tr>\n <td>Publicly Visible: </td>\n <td class=\"left\">{$proj_public}</td>\n </tr>\n"; echo "<tr>\n <td>Link to Us?: </td>\n <td class=\"left\">{$proj_linked}</td>\n </tr>\n"; echo "<tr>\n <td>Funders: </td>\n <td class=\"left\">{$proj_funders}</td>\n </tr>\n"; echo "<tr>\n <td>#Project Members: </td>\n <td class=\"left\">{$proj_members}</td>\n </tr>\n"; echo "<tr>\n <td>#PCs: </td>\n <td class=\"left\">{$proj_pcs}</td>\n </tr>\n"; echo "<tr>\n <td>Planetlab Access: </td>\n <td class=\"left\">{$proj_plabpcs}</td>\n </tr>\n"; echo "<tr>\n <td>RON Access: </td>\n <td class=\"left\">{$proj_ronpcs}</td>\n </tr>\n"; # Fine-grained Datapository access: show node_ids over all sub-groups. # Should probably do likewise in individual sub-group pages. # "dp_projects" node_attributes are lists of group gid_idxs. $query_result = DBQueryFatal("select distinct g.gid_idx, a.node_id " . " from groups as g, node_attributes as a " . "where g.pid_idx='{$proj_idx}' " . " and a.attrkey='dp_projects' " . " and FIND_IN_SET(g.gid_idx, a.attrvalue) " . "order by g.gid_idx, a.node_id"); $proj_dp_nodes = ""; while ($row = mysql_fetch_array($query_result)) { $node_id = $row["node_id"]; if ($proj_dp_nodes) { $proj_dp_nodes .= ", "; } $proj_dp_nodes .= $node_id; } if ($proj_dp_nodes) { echo "<tr>\n\t\t <td>Datapository Access: </td>\n\t\t <td class=\"left\">{$proj_dp_nodes}</td>\n\t\t </tr>\n"; } echo "<tr>\n <td>Created: </td>\n <td class=\"left\">{$proj_created}</td>\n </tr>\n"; echo "<tr>\n <td>Experiments Created:</td>\n <td class=\"left\">{$expt_count}</td>\n </tr>\n"; echo "<tr>\n <td>Date of last experiment:</td>\n <td class=\"left\">{$expt_last}</td>\n </tr>\n"; echo "<tr>\n <td>Approved?: </td>\n <td class=\"left\">{$approved}</td>\n\t </tr>\n"; if (ISADMIN()) { $YesNo = YesNo($allow_workbench); $flip = $allow_workbench ? 0 : 1; echo "<tr>\n <td>Allow Workbench:</td>\n <td><a href=toggle.php?pid={$pid}&type=workbench" . "&value={$flip}>{$YesNo}</a> (Click to toggle)</td>\n </tr>\n"; } echo "<tr>\n <td colspan='2'>Why?:</td>\n </tr>\n"; echo "<tr>\n <td colspan='2' width=600>{$proj_why}</td>\n </tr>\n"; echo "</table>\n"; }
<?php $settings_array = array(array("title" => 'Включить кэширование статистики и блоков?', "descr" => 'Основная страница пока не кэшируется', "setting" => YesNo("allow_cache")), array("title" => 'Включить ЧПУ', "descr" => 'ЧПУ - человеко-понятные урл', "setting" => YesNo("alt_url")), array("title" => 'Кол. на страницу', "descr" => 'Количество матчей/пользователей/ставок на строницу', "setting" => $tpl->input("save_con[per_page]", $total_conf['per_page'], "text", "style=\"width:30px\"")), array("title" => 'Минуты до начало', "descr" => 'Количество минут до матча, когда прекращаются ставки', "setting" => $tpl->input("save_con[time]", $total_conf['time'], "text", "style=\"width:30px\"")), array("title" => 'Просмотр ставок пользователей', "descr" => 'Разрешить просматривать ставки других пользователей', "setting" => YesNo("allow_view_points")), array("title" => 'Показывать количество ставок для матча', "descr" => 'Выводит количество ставок для матча', "setting" => YesNo("allow_rates")), array("title" => 'Показывать процент угадываний для матча', "descr" => 'Выводит процент для матча который вычесляется так: (угадали матч/всего ставок)*100', "setting" => YesNo("allow_procent")), array("title" => 'Очки за угаданный счёт матча', "descr" => 'Полномтью угадал счёт', "setting" => $tpl->input("save_con[point_3]", $total_conf['point_3'], "text", "style=\"width:30px\"")), array("title" => 'Очки за угаданную разницу мячей', "descr" => 'Это значит что если команды сыграли 2-1 на самом деле, а юзер ставил на 3-2, то юзер получает это кол. очков', "setting" => $tpl->input("save_con[point_2]", $total_conf['point_2'], "text", "style=\"width:30px\"")), array("title" => 'Очки за угаданный исход матча', "descr" => 'Угаданный исход матча, это значит, что если команды сыграли 2-0 в пользу скажем Челси, а юзер ставил 4-0, но на Челси, то он получает это кол. очков, за то что предсказал победителя матча', "setting" => $tpl->input("save_con[point_1]", $total_conf['point_1'], "text", "style=\"width:30px\"")), array("title" => 'Очки за не угаданный исход матча', "descr" => 'Не угаданный исход матча, это значит, что если команды сыграли 2-0 в пользу скажем Челси, а юзер ставил 0-3, но на Челси, то он получает это кол. очков, за то что не правильно предсказал победителя матча', "setting" => $tpl->input("save_con[point_0]", $total_conf['point_0'], "text", "style=\"width:30px\"")), array("title" => 'Максимальное количество очков при выборе счета', "descr" => 'Устанавливает максимальное количество очков', "setting" => $tpl->input("save_con[game_points]", $total_conf['game_points'], "text", "style=\"width:30px\"")), array("title" => 'Разрешить пользователям редактировать свои ставки', "descr" => 'Даёт возможность пользователям изменить счет до того как начнется матч', "setting" => YesNo("allow_edit")), array("title" => 'Включить архив на сайте', "descr" => 'Даёт возможность пользователям просматривать матчи прошлых сезонов', "setting" => YesNo("show_archive")), array("title" => 'Включить блок "Самый предсказуемый матч"', "descr" => 'это матчи, которые угадало больше всего человек за всю историю', "setting" => YesNo("allow_PredictedMatche")), array("title" => 'Включить блок "Самый непредсказуемы матч"', "descr" => 'это матчи, которые угадали меньше всего человек за всю историю', "setting" => YesNo("allow_NotPredictedMatche")), array("title" => 'Максимальная длина имени в блоках "Самый предсказуемый матч" и "Самый непредсказуемы матч"', "descr" => 'Длина текста который вставляется в тег {short_name}, 0 => идёт полное название', "setting" => $tpl->input("save_con[short_name]", $total_conf['short_name'], "text", "style=\"width:30px\"")), array("title" => 'Количество матчей в блоках "Самый предсказуемый матч" и "Самый непредсказуемы матч"', "descr" => ' 0 => 10 матчей', "setting" => $tpl->input("save_con[predicted_limit]", $total_conf['predicted_limit'], "text", "style=\"width:30px\"")), array("title" => 'Включить блок "Реконсмены"', "descr" => 'Выводит пользователей у которых само больше отчков', "setting" => YesNo("allow_RatesUsers")), array("title" => 'Количество пользователей в блоке "Реконсмены"', "descr" => ' 0 => 10 пользователей', "setting" => $tpl->input("save_con[user_limit]", $total_conf['user_limit'], "text", "style=\"width:30px\"")));