function sc_postbox() { global $post; $rows = e_WYSIWYG ? 15 : 10; $ret = "<textarea class='e-wysiwyg tbox' id='post' name='post' cols='70' rows='{$rows}' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>{$post}</textarea>\n<br />\n"; if (!e_WYSIWYG) { $ret .= display_help('helpb', 'forum'); } return $ret; }
function product_table($category_id, $item_id, $item_name, $item_description, $item_price, $sku_number, $shipping_first_item, $shipping_additional_item, $handling_override, $item_image, $item_active_status, $item_order, $prod_prop_1_id, $prod_prop_2_id, $prod_prop_3_id, $prod_prop_4_id, $prod_prop_5_id, $prod_discount_id, $image_array, $icon_width, $item_instock, $item_track_stock, $enable_ipn, $download_product, $download_filename, $store_image_path, $prod_promo_class, $item_minimum, $download_datasheet, $download_datasheet_filename, $item_quotation) { $text .= "\n\t<table border='0' cellspacing='15' width='100%'>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_05 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<select class='tbox' name='category_id'>"; $sql2 = new db(); $sql2->db_Select(DB_TABLE_SHOP_ITEM_CATEGORIES, "*", "WHERE category_active_status = '2' ORDER BY category_order", false); // Select only active categories while ($row2 = $sql2->db_Fetch()) { if ($row2['category_id'] == $category_id) { $text .= "\n <option value='" . $row2['category_id'] . "' selected='selected'>" . $row2['category_name'] . "</option>"; } else { $text .= "\n <option value='" . $row2['category_id'] . "'>" . $row2['category_name'] . "</option>"; } } $text .= "\n </select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_06 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='25' type='text' name='item_name' value='" . $item_name . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_07 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='item_description' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>" . $item_description . "</textarea><br />" . display_help('helpa') . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_08 . ": <img src='" . e_IMAGE . "admin_images/docs_16.png' title='" . EASYSHOP_CONF_ITM_09 . "' alt='" . EASYSHOP_CONF_ITM_09 . "' /></b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='25' type='text' name='sku_number' value='" . $sku_number . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_10 . ":</b>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input class='tbox' size='7' type='text' name='item_price' value='" . $item_price . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_11 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='shipping_first_item' value='" . $shipping_first_item . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_12 . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_13 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='shipping_additional_item' value='" . $shipping_additional_item . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_12 . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<b>" . EASYSHOP_CONF_ITM_14 . ":</b>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<input class='tbox' size='7' type='text' name='handling_override' value='" . $handling_override . "' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>"; // Show all available images $item_image = explode(",", $item_image); $arrayLength = count($item_image); $j = 1; for ($i = 0; $i < $arrayLength; $i++) { $text .= "\n \t\t\t<td valign='top'>\n \t\t\t\t<b>" . EASYSHOP_CONF_ITM_15 . " " . $j . ":</b>\n \t\t\t</td>\n \t\t\t<td valign='top'>\n\t\t\t\t<input type='text' size='25' class='tbox' id='item_image" . $i . "' name='item_image[]' value='" . $item_image[$i] . "' /> " . EASYSHOP_CONF_ITM_16 . "<br />"; // Show icons with width 16 of the array of images and put name in variable $category_image foreach ($image_array as $icon) { $text .= "<a href=\"javascript:insertext('" . $icon['fname'] . "','item_image" . $i . "','itmimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> "; } $text .= "</td></tr>"; $j++; } // Add a blank input image field on top of the current list $j = $arrayLength + 1; $text .= "\n \t\t<td valign='top'>\n \t\t\t\t<b>" . EASYSHOP_CONF_ITM_15 . " " . $j . ":</b>\n \t\t\t</td>\n \t\t\t<td valign='top'>\n\t\t\t\t<input type='text' size='25' class='tbox' id='item_image" . $j . "' name='item_image[]' value='" . $item_image[$j] . "' /> " . EASYSHOP_CONF_ITM_16 . "<br />"; // Show icons with width 16 of the array of images and put name in variable $category_image foreach ($image_array as $icon) { $text .= "<a href=\"javascript:insertext('" . $icon['fname'] . "','item_image" . $j . "','itmimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> "; } $text .= "</td></tr>"; // Show upload button $imgdirname = e_PLUGIN . "easyshop/" . $store_image_path; $text .= "<tr><td></td><td><br /><input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_43 . "\" onclick=\"expandit(this)\" />\n \t\t\t<div style=\"display:none;\">\n \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_38 . "\" />\n \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $imgdirname . "\" />\n \t\t\t</div></td></tr>"; $text .= "\n\t\t\t<tr>\n\t\t\t\t<td colspan=2>\n\t\t\t\t\t<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_CONF_ITM_17 . "\n\t\t\t\t</td>\n\t\t\t</tr>\n <tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_18 . "</b>\n </td>\n <td>"; // Display the check box for active status (active = 2) if ($item_active_status == 2) { $text .= "<input type='checkbox' name='item_active_status' value='2' checked='checked' />"; } else { $text .= "<input type='checkbox' name='item_active_status' value='1' />"; } $text .= "\n </td>\n </tr>"; for ($n = 1; $n < 6; $n++) { $fpropname = "prod_prop_" . $n . "_id"; $text .= "\n <tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_28 . " " . $n . "</b>\n </td>\n <td>\n\t\t<select class='tbox' name='{$fpropname}'>\n <option value='' selected='selected'></option>"; $sql3 = new db(); $sql3->db_Select(DB_TABLE_SHOP_PROPERTIES, "*", " ORDER BY prop_display_name", false); // Select all properties while ($row3 = $sql3->db_Fetch()) { //$positioner = ${"prod_prop_".$n."_id"}; // Show display_name and first 10 characters of the string; so it is no problem to select from same name e.g. 'Color' with different property list if ($row3['property_id'] == ${"prod_prop_" . $n . "_id"}) { $text .= "<option value='" . $row3['property_id'] . "' selected='selected'>" . $row3['prop_display_name'] . ": " . substr($row3['prop_list'], 0, 10) . (strlen($row3['prop_list']) ? "..." : "") . "</option>"; } else { $text .= "<option value='" . $row3['property_id'] . "'>" . $row3['prop_display_name'] . ": " . substr($row3['prop_list'], 0, 10) . (strlen($row3['prop_list']) ? "..." : "") . "</option>"; } } $text .= "\n\t\t</select>\n\t </td>\n </tr>"; } // End of For loop for properties // Display discount $text .= "\n <tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_29 . "</b>\n </td>\n <td>\n\t\t<select class='tbox' name='prod_discount_id'>\n <option value='' selected='selected'></option>"; $sql4 = new db(); $sql4->db_Select(DB_TABLE_SHOP_DISCOUNT, "*", " ORDER BY discount_name", false); // Select all discounts while ($row4 = $sql4->db_Fetch()) { if ($row4['discount_id'] == $prod_discount_id) { $text .= "<option value='" . $row4['discount_id'] . "' selected='selected'>" . $row4['discount_name'] . "</option>"; } else { $text .= "<option value='" . $row4['discount_id'] . "'>" . $row4['discount_name'] . "</option>"; } } $text .= "\n </select>"; if (trim($prod_discount_id) > "") { $sql5 = new db(); $sql5->db_Select(DB_TABLE_SHOP_DISCOUNT, "*", "discount_id = " . $prod_discount_id); // Select the selected discount if ($row5 = $sql5->db_Fetch()) { if ($row5['discount_valid_till'] == 0) { // Set the end date to maximum if not filled in $row5['discount_valid_till'] = 9999999999.0; } $today = time(); // $text .= "-- Today = $today Discount_valid_till = ".$row5['discount_valid_till']." Discount_valid_from = ".$row5['discount_valid_from']."--"; // Some debug info if ($today > $row5['discount_valid_till']) { $text .= " " . EASYSHOP_CONF_ITM_30 . " (" . date("Y/m/d", $row5['discount_valid_till']) . ")"; } if ($today < $row5['discount_valid_from']) { $text .= " " . EASYSHOP_CONF_ITM_31 . " (" . date("Y/m/d", $row5['discount_valid_from']) . ")"; } } } $text .= "\n </td></tr>"; // IPN addition - include track stock option in form $item_track_stock != '2' ? $trackstock_text = " value = '1' " : ($trackstock_text = " value = '2' checked='checked' "); $enable_ipn != '2' ? $enabled_text = " disabled = 'true' " : ($enabled_text = ""); $text .= "\n <tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_33 . "</b><br />"; if ($enable_ipn != '2') { $text .= EASYSHOP_CONF_ITM_34; } $text .= "\n </td>\n\n <td valign='top'>\n <input type='checkbox' name='item_track_stock' {$trackstock_text} {$enabled_text} />\n </td>\n </tr>\n <tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_35 . "</b><br />"; if ($enable_ipn != '2') { $text .= EASYSHOP_CONF_ITM_34; } $text .= "\n </td>\n <td valign='top'>\n <input class='tbox' size='7' type='text' name='item_instock' value='" . $item_instock . "' {$enabled_text} />\n </td>\n </tr>\n\t<tr>\n <td>\n <b>" . EASYSHOP_CONF_ITM_47 . "</b><br />"; if ($enable_ipn != '2') { $text .= EASYSHOP_CONF_ITM_34; } $text .= "\n </td>\n <td valign='top'>\n <input class='tbox' size='7' type='text' name='item_minimum' value='" . $item_minimum . "' {$enabled_text} />\n </td>\n </tr>"; // Download product: only if IPN is activated $text .= "\n <tr><td>\n <b>" . EASYSHOP_CONF_ITM_36 . "</b><br />\n "; if ($enable_ipn != '2') { $text .= EASYSHOP_CONF_ITM_34; } $download_product != '2' ? $download_product_text = " value = '1' " : ($download_product_text = " value = '2' checked='checked' "); $text .= "\n </td><td>\n <input type='checkbox' name='download_product' {$download_product_text} {$enabled_text} />\n </td></tr>"; if (strlen(trim($download_filename)) == 0) { // Show upload button and select box when no download file is stored yet $text .= "\n <tr><td>\n </td><td>"; $dirname = e_PLUGIN . "easyshop/downloads"; $text .= "<input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_37 . "\" onclick=\"expandit(this)\" />\n \t\t\t<div style=\"display:none;\">\n \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_38 . "\" />\n \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $dirname . "\" />\n \t\t\t</div>"; $text .= "\n </td></tr>"; // Show select box when no download file is stored yet require_once e_HANDLER . 'file_class.php'; $dl = new e_file(); $rejecfiles = array('$.', '$..', '/', 'CVS', 'thumbs.db', '*._$', "thumb_", 'index', 'null*'); $downloadlist = $dl->get_files(e_PLUGIN . "easyshop/downloads", $rejecthumb); $text .= "\n <tr><td>\n <b>" . EASYSHOP_CONF_ITM_39 . "</b>\n </td><td>\n \t\t <select name='download_filename' class='tbox'>\n \t\t\t<option value=''> </option>\n \t\t\t"; foreach ($downloadlist as $file) { $extension = strrpos($file['fname'], ".") ? substr($file['fname'], strrpos($file['fname'], ".")) : ""; if (strlen($extension) > 0) { // Suppress files without extension if ($file['fname'] == $download_filename) { $selected_text = "selected='selected'"; } else { $selected_text = ""; } $text .= "<option value='" . $file['fname'] . "' {$selected_text}>" . $file['fname'] . "</option>"; } } $text .= "</select>"; } else { // Show stored download file $text .= "\n <tr><td>\n <b>" . EASYSHOP_CONF_ITM_40 . "</b><br />\n " . EASYSHOP_CONF_ITM_41 . "\n </td><td>\n <input name='download_filename' value='" . $download_filename . "' disabled = 'true' />\n "; } // Show scramled file info if (strlen($download_filename) > 0) { $scramled_name = $item_id . $download_filename; $text .= "<br />\n \t\t" . EASYSHOP_CONF_ITM_42 . ": " . md5($scramled_name) . "<br />"; } $text .= "<input type='hidden' name='stored_download_filename' value='" . $download_filename . "' />\n </td></tr>\n "; // Promotion class: only if IPN is activated $text .= "\n <tr><td>\n <b>" . EASYSHOP_CONF_ITM_45 . "</b><br />\n "; if ($enable_ipn != '2') { $text .= EASYSHOP_CONF_ITM_34; } $download_product != '2' ? $download_product_text = " value = '1' " : ($download_product_text = " value = '2' checked='checked' "); require_once e_HANDLER . 'userclass_class.php'; $text .= "\n </td><td>\n\t\t\t" . r_userclass("prod_promo_class", $prod_promo_class, "off", "nobody,classes") . "\t\t \n </td></tr>"; // NEW: START v1.6m // Datasheet functionality $text .= "\n <tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_56 . "</b><br /> "; $download_datasheet != '2' ? $download_datasheet_text = " value = '1' " : ($download_datasheet_text = " value = '2' checked='checked' "); $text .= "\n </td><td>\n\t\t<input type='checkbox' name='download_datasheet' {$download_datasheet_text} />\n </td></tr>"; if (strlen(trim($download_datasheet_filename)) == 0) { // Show upload button and select box when no datasheet file is stored yet $text .= "\n\t<tr><td>\n\t</td><td>"; $dirname = e_PLUGIN . "easyshop/datasheets"; $text .= "<input class=\"button\" type=\"button\" name=\"request\" value=\"" . EASYSHOP_CONF_ITM_57 . "\" onclick=\"expandit(this)\" />\n \t\t\t<div style=\"display:none;\">\n \t\t\t<input class=\"tbox\" type=\"file\" name=\"file_userfile[]\" size=\"50\" />\n \t\t\t<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . EASYSHOP_CONF_ITM_58 . "\" />\n \t\t\t<input type=\"hidden\" name=\"upload_dir[]\" value=\"" . $dirname . "\" />\n \t\t\t</div>"; $text .= "\n\t</td></tr>"; // Show select box when no datasheet file is stored yet require_once e_HANDLER . 'file_class.php'; $dl = new e_file(); $rejecfiles = array('$.', '$..', '/', 'CVS', 'thumbs.db', '*._$', "thumb_", 'index', 'null*'); $datasheetlist = $dl->get_files(e_PLUGIN . "easyshop/datasheets", $rejecthumb); $text .= "\n\t<tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_59 . "</b>\n\t</td><td>\n\t\t<select name='download_datasheet_filename' class='tbox'>\n\t\t\t<option value=''> </option>"; foreach ($datasheetlist as $file) { $extension = strrpos($file['fname'], ".") ? substr($file['fname'], strrpos($file['fname'], ".")) : ""; if (strlen($extension) > 0) { // Suppress files without extension if ($file['fname'] == $download_datasheet_filename) { $download_datasheet_selected_text = "selected='selected'"; } else { $download_datasheet_selected_text = ""; } $text .= "<option value='" . $file['fname'] . "' {$download_datasheet_selected_text}>" . $file['fname'] . "</option>"; } } $text .= "\n\t\t</select>\n\t</td></tr>"; } else { // Show stored datasheet file $text .= "\n\t<tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_60 . "</b><br />\n\t\t" . EASYSHOP_CONF_ITM_61 . "\n\t</td><td>\n\t\t<input name='download_datasheet_filename' value='" . $download_datasheet_filename . "' disabled = 'true' />\n\t</td></tr>"; } // Display item_quotation checkbox $text .= "\n <tr><td>\n\t\t<b>" . EASYSHOP_CONF_ITM_62 . "</b><br /> "; $item_quotation != '2' ? $item_quotation_text = " value = '1' " : ($item_quotation_text = " value = '2' checked='checked' "); $text .= "\n </td><td>\n\t\t<input type='checkbox' name='item_quotation' {$item_quotation_text} />\n </td></tr>"; // NEW: END v1.6m $text .= "\n\t</table>"; return $text; }
function user_form($action, $players_id, $players_name, $event_id, $match_id, $allowDraw, $allowForfeit, $allowScore, $userclass, $date_scheduled, $user_player) { global $sql; global $text; global $tp; global $time; /* Event Info */ $event = new Event($event_id); if (e_WYSIWYG) { $insertjs = "rows='5'"; } else { require_once e_HANDLER . "ren_help.php"; $insertjs = "rows='5' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; } /* //dbg form echo "<br>_POST: "; var_dump($_POST); echo "<br>_GET: "; var_dump($_GET); */ $match_str = ''; $matchreport_str = EB_MATCHR_L31; if ($action == 'matchedit') { $matchreport_str = EB_MATCHR_L46; $text .= '<div>'; $text .= EB_MATCHR_L45 . " {$match_id}<br />"; $text .= '<img src="' . e_PLUGIN . 'ebattles/images/exclamation.png"/>'; $text .= EB_MATCHR_L47; $text .= '</div><br />'; } if ($action == 'matchschedulededit') { $matchreport_str = EB_MATCHR_L46; $text .= '<div>'; $text .= EB_MATCHR_L45 . " {$match_id}<br />"; $text .= '</div><br />'; } if ($action == 'matchschedule') { $matchreport_str = EB_MATCHR_L48; } if ($match_id) { $match_str = '&matchid=' . $match_id; } if ($action) { $action_str = '&actionid=' . $action; } // Assign values to POST if not set // fm: check might not be correct here // should check if $action=='matchedit') only? if (!isset($_POST['time_reported']) || $action == 'matchscheduledreport') { $_POST['time_reported'] = $time; } $time_reported = $_POST['time_reported']; if (!isset($_POST['reported_by'])) { $_POST['reported_by'] = USERID; } $reported_by = $_POST['reported_by']; if (isset($_POST['match_comment'])) { $comment = $tp->toDB($_POST['match_comment']); } else { $comment = ''; } for ($matchMap = 0; $matchMap < min($numMaps, $event->getField('MaxMapsPerMatch')); $matchMap++) { if (!isset($_POST['map' . $matchMap])) { $_POST['map' . $matchMap] = 0; } } // if vars are not set, set them as empty. if (!isset($_POST['nbr_players'])) { $_POST['nbr_players'] = 2; } if (!isset($_POST['nbr_teams'])) { $_POST['nbr_teams'] = 2; } // This form should only be used for 2 teams matches (1v1, 2v2, ...) // now to output the form HTML. $max_nbr_players = count($players_id) - 1; $nbr_players = $_POST['nbr_players']; $nbr_teams = $_POST['nbr_teams']; $nbr_players_per_team = $_POST['nbr_players'] / $_POST['nbr_teams']; $i = 1; // player index for ($t = 1; $t <= $nbr_teams; $t++) { if (!isset($_POST['rank' . $t])) { $_POST['rank' . $t] = 'Team #' . $t; } for ($p = 1; $p <= $nbr_players_per_team; $p++) { if (!isset($_POST['team' . $i])) { $_POST['team' . $i] = 'Team #' . $t; } if (!isset($_POST['score' . $i])) { $_POST['score' . $i] = 0; } if (!isset($_POST['faction' . $i])) { $_POST['faction' . $i] = 0; } $i++; } } $result = 1; if ($_POST['rank1'] == 'Team #2' && $_POST['rank2'] == 'Team #1') { $result = 2; } if ($_POST['draw2'] == 1) { $result = 3; } if ($_POST['rank1'] == 'Team #2' && $_POST['rank2'] == 'Team #1' && $_POST['forfeit2'] == 1) { $result = 4; } if ($_POST['rank1'] == 'Team #1' && $_POST['rank2'] == 'Team #2' && $_POST['forfeit2'] == 1) { $result = 5; } if (!isset($_POST['result'])) { $_POST['result'] = $result; } //var_dump($result); ///////////////// /// MAIN FORM /// ///////////////// $text .= '<form id="matchreportform" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?eventid=' . $event_id . $match_str . $action_str . '" method="post">'; $text .= '<div>'; // TABLE - Match result if ($nbr_players > 2) { $array_result = array(1 => array(EB_MATCHR_L60, true), 2 => array(EB_MATCHR_L61, true), 3 => array(EB_MATCHR_L62, $allowDraw == TRUE ? true : false), 4 => array(EB_MATCHR_L63, $allowForfeit == TRUE ? true : false), 5 => array(EB_MATCHR_L64, $allowForfeit == TRUE ? true : false)); } else { $array_result = array(1 => array(EB_MATCHR_L65, true), 2 => array(EB_MATCHR_L66, true), 3 => array(EB_MATCHR_L67, $allowDraw == TRUE ? true : false), 4 => array(EB_MATCHR_L68, $allowForfeit == TRUE ? true : false), 5 => array(EB_MATCHR_L69, $allowForfeit == TRUE ? true : false)); } if ($action != 'matchschedule' && $action != 'matchschedulededit') { $text .= '<table id="matchresult_selectresult" class="table_left"><tbody>'; $text .= '<tr>'; $text .= '<td>' . EB_MATCHR_L59 . '</td>'; $text .= '<td>'; $text .= '<select class="tbox" name="result">'; foreach ($array_result as $opt => $opt_array) { if ($opt_array[1] == true) { $selected_str = $_POST['result'] == $opt ? 'selected="selected"' : ''; $text .= '<option value="' . $opt . '" ' . $selected_str . '>' . $opt_array[0] . '</option>'; } } $text .= '</select>'; $text .= '</td>'; $text .= '</tr>'; $text .= '</tbody></table>'; } // TABLE - Players/Teams Selection //---------------------------------- // List of all Factions $q_Factions = "SELECT " . TBL_FACTIONS . ".*" . " FROM " . TBL_FACTIONS . " WHERE (" . TBL_FACTIONS . ".Game = '" . $event->getField('Game') . "')"; $result_Factions = $sql->db_Query($q_Factions); $numFactions = mysql_numrows($result_Factions); $disable_input = $action == 'matchscheduledreport' ? 1 : 0; if ($action != 'matchschedulededit') { // TABLE - Teams //$text .= EB_MATCHR_L20; $text .= '<table id="matchresult_teams" style="text-align:center" class="table_left">'; $text .= '<thead>'; $text .= '<tr>'; $text .= '<th class="eb_th1"></th>'; // Team # $text .= '<th class="eb_th1"></th>'; // Player # $text .= '<th class="eb_th1"></th>'; // Name if ($action != 'matchschedule' && $action != 'matchschedulededit' && $allowScore == TRUE) { $text .= '<th class="eb_th1">' . EB_MATCHR_L26 . '</th>'; } // Score if ($action != 'matchschedule' && $action != 'matchschedulededit' && $numFactions > 0) { $text .= '<th class="eb_th1">' . EB_MATCHR_L41 . '</th>'; } // Faction $text .= '</tr>'; $text .= '</thead>'; $text .= '<tbody>'; $p = 1; // player index for ($t = 1; $t <= $nbr_teams; $t++) { if ($nbr_players > 2) { $p = 1; } // reset player number $text .= '<tr>'; $text .= '<td>'; $text .= $nbr_players > 2 ? EB_MATCHR_L10 . $t : ''; $text .= '</td>'; $text .= '</tr>'; for ($i = 1; $i <= $nbr_players; $i++) { if ($_POST['team' . $i] == 'Team #' . $t) { $text .= '<tr>'; $text .= '<td>'; $text .= '<input type="hidden" name="team' . $i . '" value="Team #' . $t . '"/>'; $text .= '</td>'; $text .= '<td>' . EB_MATCHR_L23 . $p . ': </td>'; $match_winner = 0; if ($event->getField('match_report_userclass') == eb_UC_MATCH_WINNER && $userclass == eb_UC_EVENT_PLAYER && $i == 1 && $user_player != 0) { $match_winner = 1; $_POST['player' . $i] = $user_player; } if ($disable_input == 1 || $match_winner == 1) { for ($j = 1; $j <= $max_nbr_players + 1; $j++) { if (strtolower($_POST['player' . $i]) == strtolower($players_id[$j - 1])) { $text .= '<td><input type="hidden" name="player' . $i . '" value="' . $players_id[$j - 1] . '"/>'; $text .= $players_name[$j - 1] . '</td>'; } } } else { $text .= '<td><select class="tbox" name="player' . $i . '">'; for ($j = 1; $j <= $max_nbr_players + 1; $j++) { $text .= '<option value="' . $players_id[$j - 1] . '"'; if (strtolower($_POST['player' . $i]) == strtolower($players_id[$j - 1])) { $text .= ' selected="selected"'; } $text .= '>' . $players_name[$j - 1] . '</option>'; } $text .= '</select></td>'; } if ($action != 'matchschedule' && $action != 'matchschedulededit') { if ($allowScore == TRUE) { $text .= '<td>'; $text .= '<input class="tbox" type="text" size="3" name="score' . $i . '" value="' . $_POST['score' . $i] . '"/>'; $text .= '</td>'; } if ($numFactions > 0) { $text .= '<td><select class="tbox" name="faction' . $i . '">'; $text .= '<option value="0"'; $text .= '>' . EB_MATCHR_L43 . '</option>'; for ($faction = 1; $faction <= $numFactions; $faction++) { $fID = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".FactionID"); $fIcon = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".Icon"); $fName = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".Name"); $text .= '<option value="' . $fID . '"'; if (strtolower($_POST['faction' . $i]) == $fID) { $text .= ' selected="selected"'; } $text .= '>' . $fName . '</option>'; } $text .= '</select></td>'; } } $p++; $text .= '</tr>'; } } } $text .= '</tbody>'; $text .= '</table>'; $text .= '<br />'; // Map Selection //---------------------------------- // List of all Maps $q_Maps = "SELECT " . TBL_MAPS . ".*" . " FROM " . TBL_MAPS . " WHERE (" . TBL_MAPS . ".Game = '" . $event->getField('Game') . "')"; $result_Maps = $sql->db_Query($q_Maps); $numMaps = mysql_numrows($result_Maps); if ($numMaps > 0) { $text .= EB_MATCHR_L42; $text .= '<table id="matchresult_selectMap" class="table_left"><tbody>'; for ($matchMap = 0; $matchMap < min($numMaps, $event->getField('MaxMapsPerMatch')); $matchMap++) { $text .= '<tr>'; $text .= '<td><select class="tbox" name="map' . $matchMap . '">'; $text .= '<option value="0"'; $text .= '>' . EB_MATCHR_L43 . '</option>'; for ($map = 0; $map < $numMaps; $map++) { $mID = mysql_result($result_Maps, $map, TBL_MAPS . ".MapID"); $mImage = mysql_result($result_Maps, $map, TBL_MAPS . ".Image"); $mName = mysql_result($result_Maps, $map, TBL_MAPS . ".Name"); $mDescrition = mysql_result($result_Maps, $map, TBL_MAPS . ".Description"); $text .= '<option value="' . $mID . '"'; if (strtolower($_POST['map' . $matchMap]) == $mID) { $text .= ' selected="selected"'; } $text .= '>' . $mName . '</option>'; } $text .= '</select></td>'; $text .= '</tr>'; } $text .= '</tbody></table>'; $text .= '<br />'; } } if ($action != 'matchschedule' && $action != 'matchschedulededit') { // Comments //---------------------------------- $text .= '<br />'; $text .= '<div style="display:table; margin-left:auto; margin-right:auto;">'; $text .= EB_MATCHR_L30 . '<br />'; $text .= '<textarea class="tbox" id="match_comment" name="match_comment" style="width:400px" cols="70" ' . $insertjs . '>' . $comment . '</textarea>'; if (!e_WYSIWYG) { $text .= '<br />' . display_help("helpb", "comment"); } $text .= '</div>'; $text .= '<br />'; } if ($action == 'matchschedule' || $action == 'matchschedulededit') { //<!-- Date Selection --> $text .= EB_MATCHR_L49; $text .= ' <table> <tr> <td> <table> <tr> <td> <div><input class="tbox timepicker" type="text" name="date_scheduled" id="f_date" value="' . $date_scheduled . '" readonly="readonly" /></div> </td> <td> <div><input class="eb_button" type="button" value="' . EB_MATCHR_L51 . '" onclick="clearDate(this.form);"/></div> </td> </tr> </table> </td> </tr> </table> '; } $text .= '<div style="display:table; margin-left:auto; margin-right:auto;">'; $text .= '<input type="hidden" name="nbr_players" value="' . $nbr_players . '"/>'; $text .= '<input type="hidden" name="nbr_teams" value="' . $nbr_teams . '"/>'; $text .= '<input type="hidden" name="userclass" value="' . $userclass . '"/>'; $text .= '<input type="hidden" name="reported_by" value="' . $reported_by . '"/>'; $text .= '<input type="hidden" name="time_reported" value="' . $time_reported . '"/>'; $text .= '<input class="eb_button" type="submit" value="' . $matchreport_str . '" name="submit_match"/>'; $text .= '<span id="ajaxSpinnerContainer"> <img src="' . e_PLUGIN . 'ebattles/images/ajax-loader.gif" title="working..." alt="working..."/> ' . EB_EVENTM_L157 . ' </span>'; $text .= '</div>'; $text .= '</div>'; $text .= '</form>'; }
$text .= "</select>\n\t\t</td></tr>"; switch ($pref['eventpost_editmode']) { case 1: $insertjs = "rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; break; case 2: $insertjs = "rows='25' "; break; default: $insertjs = "rows='15' "; } $text .= "\n\t\t<tr><td class='forumheader3'>" . EC_LAN_32 . " </td><td class='forumheader3'>\n\t\t<input class='tbox' type='text' name='ne_location' size='60' value='" . (isset($ne_location) ? $ne_location : "") . "' maxlength='200' style='width:95%' />\n\t\t</td></tr>\n\n\t\t<tr><td class='forumheader3'>" . EC_LAN_57 . " *</td><td class='forumheader3'>\n\t\t<textarea class='tbox' id='ne_event' name='ne_event' cols='59' style='width:95%' {$insertjs}>" . (isset($ne_event) ? $ne_event : "") . "</textarea>"; if ($pref['eventpost_editmode'] == 1) { // Show help require_once e_HANDLER . "ren_help.php"; $text .= "<br />" . display_help("helpb", 'event'); } $text .= "</td></tr>"; // Only display for forum thread/link if required. No point if not wanted if (isset($pref['eventpost_forum']) && $pref['eventpost_forum'] == 1) { $text .= "\n\t\t\t<tr><td class='forumheader3'>" . EC_LAN_58 . " </td><td class='forumheader3'>\n\t\t\t<input class='tbox' type='text' name='ne_thread' size='60' value='" . (isset($ne_thread) ? $ne_thread : "") . "' maxlength='100' style='width:95%' />\n\t\t\t</td></tr>"; } // If the user is logged in and has their email set plus the field is empty then put in // their email address. They can always take it out if they want, its not a required field if (empty($ne_email) && $action == "ne" && defined('USEREMAIL')) { $ne_email = USEREMAIL; } $text .= "\n\t\t<tr><td class='forumheader3'>" . EC_LAN_59 . " </td><td class='forumheader3'>\n\t\t<input class='tbox' type='text' name='ne_email' size='60' value='{$ne_email}' maxlength='150' style='width:95%' />\n\t\t</td></tr>"; //triggerHook $hid = $action == 'ed' ? intval($qs[1]) : ''; $data = array('method' => 'form', 'table' => 'event', 'id' => $hid, 'plugin' => 'calendar_menu', 'function' => 'CalendarCreate');
if (!$debug) { api_data_source_disable_multi($data_sources_to_act_on); } echo __("Removing device but keeping resources for device id ") . $item["id"]; } api_device_remove($item["id"]); if (is_error_message()) { echo __(". ERROR: Failed to remove this device") . "\n"; } else { echo __(". Success - removed device id: ") . ($item["id"]) . "\n"; } } }else{ display_help($me); exit(0); } function display_help($me) { echo "Remove Device Script 1.0" . ", " . __("Copyright 2004-2010 - The Cacti Group") . "\n"; echo __("A simple command line utility to remove a device from Cacti") . "\n\n"; echo __("usage: ") . $me . " [--device-id=] [--site-id=] [--poller-id=]\n"; echo " [--description=] [--ip=] [--template=] [--notes=\"[]\"] [--disabled]\n"; echo " [--avail=[pingsnmp]] [--ping-method=[tcp] --ping-port=[N/A, 1-65534]] --ping-retries=[2] --ping-timeout=[500]\n"; echo " [--version=1] [--community=] [--port=161] [--timeout=500]\n"; echo " [--username= --password=] [--authproto=] [--privpass= --privproto=] [--context=]\n"; echo " [-d]\n\n"; echo __("At least one device related parameter is required. All matching devices will be deleted") . "\n"; echo " --device-id " . __("the numerical ID of the device") . "\n"; echo " --site-id " . __("the numerical ID of the site") . "\n";
$sel = varset($_POST['cat_id'], '') == $cat_id ? "selected='selected'" : ""; $text .= "<option value='{$cat_id}' {$sel}>" . $tp->toHTML($cat_name, FALSE, "defs") . "</option>"; } $text .= "</select>"; } $text .= "\n </td>\n</tr>\n<tr>\n <td style='width:20%' class='forumheader3'>" . LAN_62 . "</td>\n\t<td style='width:80%' class='forumheader3'>\n <input class='tbox' type='text' id='submitnews_title' name='submitnews_title' size='60' value='" . $tp->toHTML($_POST['submitnews_title'], TRUE, 'USER_TITLE') . "' maxlength='200' style='width:90%' />\n\t</td>\n</tr>"; if (e_WYSIWYG) { $insertjs = "rows='25'"; } else { require_once e_HANDLER . "ren_help.php"; $insertjs = "rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; } $text .= "\n<tr>\n <td style='width:20%' class='forumheader3'>" . LAN_135 . "</td>\n\t<td style='width:80%' class='forumheader3'>\n <textarea class='e-wysiwyg tbox' id='submitnews_item' name='submitnews_item' cols='80' style='max-width:95%' {$insertjs}>" . $tp->toForm($_POST['submitnews_item'], TRUE, 'USER_BODY') . "</textarea><br />"; // toHTML is dangerous. if (!e_WYSIWYG) { $text .= display_help("helpb", "submitnews"); } $text .= "\n </td>\n</tr>"; if ($pref['subnews_attach'] && $pref['upload_enabled'] && check_class($pref['upload_class']) && FILE_UPLOADS) { $text .= "\n <tr>\n <td style='width:20%' class='forumheader3'>" . SUBNEWSLAN_5 . "<br /><span class='smalltext'>" . SUBNEWSLAN_6 . "</span></td>\n <td style='width:80%' class='forumheader3'>\n <input class='tbox' type='file' name='file_userfile[]' style='width:90%' multiple='multiple' />\n </td>\n </tr>"; } $text .= "\n <tr>\n <td colspan='2' style='text-align:center' class='forumheader'>\n <input class='button' type='submit' name='submitnews_submit' value='" . LAN_136 . "' />\n </td>\n </tr>\n </table>\n </form>\n</div>"; $ns->tablerender(LAN_136, $text); require_once FOOTERF; function headerjs() { $adder = ""; if (e_WYSIWYG) { $adder = 'tinyMCE.triggerSave();'; } $script = "\n <script type=\"text/javascript\">\n function frmVerify()\n {\n {$adder}\n if(document.getElementById('submitnews_title').value == \"\")\n {\n alert('" . SUBNEWSLAN_1 . "');\n return false;\n }\n\n if(document.getElementById('submitnews_item').value == \"\")\n {\n alert('" . SUBNEWSLAN_2 . "');\n return false;\n }\n }\n </script>";
} /* Build a config file if requested */ if ($cmd_build) { build_config($cmd_build_file, $cmd_filter, $cmd_email, $cmd_email_html, $cmd_email_csv); exit; } /* Check command line options */ if (empty($cmd_config)) { print "ERROR: Required command line option, -config not specified.\n"; display_help($version); exit; } /* Check for track file */ if (empty($cmd_track)) { print "ERROR: Required command line option -track not specified.\n"; display_help($version); exit; } /* Parse the configuration */ debug("Checking configuration file"); if (!read_config($cmd_config)) { print "ERROR: Configuration issue.\n"; exit; } if ($cmd_check) { print "Configurations file checked successfully.\n"; exit; } /* Get current time, so that all customers are processed against the same time */ if (empty($cmd_current_time)) { $current_time = time();
use ORC\Application; if ($argc == 0) { return display_help(); } $ignore_exists = false; $yes_to_all = false; foreach ($argv as $arg) { if (false !== strpos($arg, '=')) { list($cmd, $value) = explode('=', $arg, 2); } else { $cmd = $arg; } switch ($cmd) { case '-h': case '--help': return display_help(); break; case '-b': case '--app-dir': $dir_app_root = realpath($value); break; case '-i': case '--ignore-exists': $ignore_exists = true; break; case '-y': $yes_to_all = true; break; } } if (empty($dir_app_root)) {
function TeamChallengeForm($event_id, $challengerpuid, $challengedtid) { global $sql; global $tp; global $time; $event = new Event($event_id); $output .= '<form action="' . e_PLUGIN . 'ebattles/challengerequest.php?eventid=' . $event_id . '" method="post">'; $output .= '<b>' . EB_CHALLENGE_L3 . '</b><br />'; $output .= '<br />'; // Challenger Info // Attention here, we use user_id, so there has to be 1 user for 1 player $output .= '<b>' . EB_CHALLENGE_L5 . '</b>'; // Challenger $q = "SELECT " . TBL_PLAYERS . ".*, " . TBL_USERS . ".*, " . TBL_TEAMS . ".*" . " FROM " . TBL_PLAYERS . ", " . TBL_GAMERS . ", " . TBL_USERS . ", " . TBL_TEAMS . " WHERE (" . TBL_PLAYERS . ".Event = '{$event_id}')" . " AND (" . TBL_TEAMS . ".TeamID = " . TBL_PLAYERS . ".Team)" . " AND (" . TBL_PLAYERS . ".Gamer = " . TBL_GAMERS . ".GamerID)" . " AND (" . TBL_USERS . ".user_id = " . TBL_GAMERS . ".User)" . " AND (" . TBL_USERS . ".user_id = '{$challengerpuid}')"; $result = $sql->db_Query($q); $uteam = mysql_result($result, 0, TBL_PLAYERS . ".Team"); $trank = mysql_result($result, 0, TBL_TEAMS . ".Rank"); list($tclan, $tclantag, $tclanid) = getClanInfo($uteam); if ($trank == 0) { $trank_txt = EB_EVENT_L54; } else { $trank_txt = "#{$trank}"; } $str = $tclan . ' (' . $trank_txt . ')'; $output .= ' ' . $str . '<br />'; // Challenged Info $output .= '<b>' . EB_CHALLENGE_L6 . '</b>'; // Challenged $q = "SELECT " . TBL_TEAMS . ".*" . " FROM " . TBL_TEAMS . " WHERE (" . TBL_TEAMS . ".TeamID = '{$challengedtid}')"; $result = $sql->db_Query($q); $uteam = mysql_result($result, 0, TBL_TEAMS . ".TeamID"); $trank = mysql_result($result, 0, TBL_TEAMS . ".Rank"); list($tclan, $tclantag, $tclanid) = getClanInfo($uteam); if ($trank == 0) { $trank_txt = EB_EVENT_L54; } else { $trank_txt = "#{$trank}"; } $str = $tclan . ' (' . $trank_txt . ')'; $output .= ' ' . $str . '<br />'; $output .= '<br />'; // Select Dates $output .= '<b>' . EB_CHALLENGE_L7 . '</b><br />'; // Select Dates $output .= '<table class="table_left">'; for ($date = 1; $date <= $event->getField('MaxDatesPerChallenge'); $date++) { //<!-- Select date Date --> $output .= ' <tr> <td><b>' . EB_CHALLENGE_L10 . ' #' . $date . '</b></td> <td> <table> <tr> <td> <div><input class="tbox timepicker" type="text" name="date' . $date . '" id="f_date' . $date . '" value="' . $_POST['date' . $date] . '" readonly="readonly" /></div> </td> <td> <div><input class="eb_button" type="button" value="' . EB_EVENTM_L34 . '" onclick="clearDate(this.form, ' . $date . ');"/></div> </td> </tr> </table> </td> </tr> '; } $output .= '</table>'; // comments //---------------------------------- if (isset($_POST['challenge_comments'])) { $comments = $tp->toDB($_POST['challenge_comments']); } else { $comments = ''; } $output .= '<br />'; $output .= '<div>'; $output .= EB_CHALLENGE_L8 . '<br />'; $output .= '<textarea class="tbox" id="challenge_comments" name="challenge_comments" style="width:500px" cols="70" ' . $insertjs . '>' . $comments . '</textarea>'; if (!e_WYSIWYG) { $output .= '<br />' . display_help("helpb", "comments"); } $output .= '</div>'; $output .= '<br />'; $output .= '<div>'; $output .= '<input type="hidden" name="submitted_by" value="' . $challengerpuid . '"/>'; $output .= '<input type="hidden" name="Challenged" value="' . $challengedtid . '"/>'; $output .= ' </div> <div> ' . ebImageTextButton('challenge_team_submit', 'challenge.png', EB_CHALLENGE_L9) . ' </div> </form> '; return $output; }
// Create a new category $text .= "\n\t<form id='cat_new' method='post' action='" . e_SELF . "'>\n\t\t<div style='text-align:center;'>\n\t\t\t<div style='width:80%'>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>\n\t\t\t\t\t\t" . EASYSHOP_CAT_03 . "\n\t\t\t\t\t</legend>\n\t\t\t\t\t<table border='0' cellspacing='15' width='100%'>"; // Only display Main Category selection if there are active Main Categories if ($sql->db_Count(DB_TABLE_SHOP_MAIN_CATEGORIES, "(*)", "WHERE main_category_active_status = '2'") > 0) { $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_22 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<select class='tbox' name='category_main_id'>"; $sql2 = new db(); $sql2->db_Select(DB_TABLE_SHOP_MAIN_CATEGORIES, "*", "WHERE main_category_active_status = '2' ORDER BY main_category_order", false); // Select only active main categories $text .= "<option value='' selected='selected'></option>"; // Add a blank option too while ($row2 = $sql2->db_Fetch()) { if ($row2['main_category_id'] == $category_main_id) { $text .= "\n\t\t <option value='" . $row2['main_category_id'] . "' selected='selected'>" . $row2['main_category_name'] . "</option>"; } else { $text .= "\n\t\t <option value='" . $row2['main_category_id'] . "'>" . $row2['main_category_name'] . "</option>"; } } $text .= "\n\t\t </select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>"; } $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_04 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class='tbox' size='25' type='text' name='category_name' />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_05 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='category_description' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea><br />" . display_help('helpb') . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_06 . "</b>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_07 . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n <input type='text' class='tbox' id='category_image' name='category_image' value='" . $category_image . "' /> " . EASYSHOP_CAT_08 . "<br />"; // Show icons with width 16 of the array of images and put name in variable $category_image foreach ($image_array as $icon) { $text .= "<a href=\"javascript:insertext('" . $icon['fname'] . "','category_image','catimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> "; } $text .= "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_15 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type='checkbox' name='category_active_status' value='1' />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_23 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t" . r_userclass("category_class", $category_class, "off", "public,guest,member,nobody,main,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t<b>" . EASYSHOP_CAT_25 . "</b>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\t\t" . r_userclass("category_order_class", $category_order_class, "off", "public,guest,member,nobody,main,admin,classes") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t<br />\n\t\t\t\t\t<div style='text-align:center;'>\n\t\t\t\t\t\t<input type='hidden' name='create_category' value='1' />\n\t\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_CAT_09 . "' />\n\t\t\t\t\t</div>\n\t\t\t\t\t<br />\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\t\t</div>\n\t</form>"; // Render the value of $text in a table. $title = EASYSHOP_CAT_00; $ns->tablerender($title, $text); } // END MAIN ADMIN CATEGORIES require_once e_ADMIN . 'footer.php';
function makeNewsletter($edit = FALSE) { // Passed data is from DB if ($edit) { $newsletter_title = $this->e107->tp->toFORM($edit['newsletter_title']); $newsletter_text = $this->e107->tp->toFORM($edit['newsletter_text']); $newsletter_issue = $this->e107->tp->toFORM($edit['newsletter_issue']); } if (!$this->e107->sql->db_Select('newsletter', '*', "newsletter_parent='0' ")) { $this->message = NLLAN_05; return; } $nlArray = $this->e107->sql->db_getList(); $text .= "<div style='text-align:center; margin-left:auto; margin-right: auto;'>\n\t\t<form action='" . e_SELF . "' id='newsletterform' method='post'>\n\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\n\t\t<tr>\n\t\t<td style='width:30%;' class='forumheader3'>" . NLLAN_30 . "</td>\n\t\t<td style='width:70%' class='forumheader3'>\n\n\t\t<select name='newsletter_parent' class='tbox'>\n\t\t"; foreach ($nlArray as $nl) { $text .= "<option value='" . $nl['newsletter_id'] . "'>" . $nl['newsletter_title'] . "</option>\n"; } $text .= "</select>\n\n\t\t<tr>\n\t\t<td style='width:30%;' class='forumheader3'>" . NLLAN_31 . "</td>\n\t\t<td style='width:70%' class='forumheader3'><input class='tbox' type='text' name='newsletter_title' size='60' value='{$newsletter_title}' maxlength='200' /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td style='width:30%;' class='forumheader3'>" . NLLAN_32 . "</td>\n\t\t<td style='width:70%' class='forumheader3'><input class='tbox' type='text' name='newsletter_issue' size='10' value='{$newsletter_issue}' maxlength='200' /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td style='width:30%;' class='forumheader3'>" . NLLAN_33 . "</td>\n\t\t<td style='width:70%' class='forumheader3'>\n\t\t\t<textarea class='tbox' id='data' name='newsletter_text' cols='80' rows='10' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>{$edit['newsletter_text']}</textarea><br/>" . display_help('helpa') . "\n\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan='2' style='text-align:center' class='forumheader'>\n\t\t" . ($edit ? "<input class='button' type='submit' name='createIssue' value='" . NLLAN_34 . "' />\n<input type='hidden' name='editid' value='{$edit['newsletter_id']}' />" : "<input class='button' type='submit' name='createIssue' value='" . NLLAN_35 . "' />") . "\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t</form>\n\t\t</div>\n\t\t"; $caption = $edit ? NLLAN_36 : NLLAN_37; $this->e107->ns->tablerender($caption, $text); }
EOF; exit(0); } $options = array('server-useHTTPS' => false, 'server-host' => 'localhost', 'usvn-url-path' => '/usvn', 'htaccess-file' => USVN_PUB_DIR, 'database-path' => USVN_APP_DIR . '/install/sql/', 'admin-firstname' => 'System', 'admin-lastname' => 'Administrator', 'admin-email' => '', 'output-apache-config' => false); $mandatory_options = array('config-file', 'admin-login', 'admin-password'); /* * Using for+switch because getopt() might not work properly with PHP < 5.3: * - Longopts might not work on some systems * - No support for optional arguments (...) */ for ($i = 0; $i < $argc; $i++) { switch (strtolower($argv[$i])) { case '-h': case '--help': display_help($options); break; case '-o': case '--output-apache-config': $options['output-apache-config'] = true; break; case '-c': case '--config-file': $options['config-file'] = $argv[++$i]; break; case '-a': case '--htaccess': $options['htaccess-file'] = $argv[++$i]; break; case '-l': case '--admin-login':
function parse_arg($argv) { global $debug; // We skip the program name [0] next($argv); while (list ($nb, $val) = each ($argv)) { switch($val) { case '-h': case '--help': $params['action'] = 'help'; break; case '-a': case '--action': list($nb2, $val2) = each ($argv); $params['action'] = $val2; if ($debug > 0) { echo "-f -> \$action=$val2\n"; } break; case '-d': case '--domain_id': list($nb3, $val3) = each ($argv); $params['domain_id'] = $val3; if ($debug > 0) { echo "-f -> \$domain_id=$val3\n"; } break; case '-l': case '--list_id': list($nb3, $val3) = each ($argv); $params['list_id'] = $val3; if ($debug > 0) { echo "-f -> \$list_id=$val3\n"; } break; case '-f': case '--from-file': list($nb3, $val3) = each ($argv); $params['from_file'] = $val3; if ($debug > 0) { echo "-f -> \$from_file=$val3\n"; } break; case '-t': case '--to-file': list($nb4, $val4) = each ($argv); $params['to_file'] = $val4; if ($debug > 0) { echo "-t -> \$to_file=$val4\n"; } break; case '-v': case '--verbose': list($nb5, $val5) = each ($argv); $params['verbose'] = $val5; if ($debug > 0) { echo "-v -> \$verbose=$val5\n"; } break; } } // Default values if ($params['action'] == '') { $params['action'] = 'help'; } if ($params['domain_id'] == '') { $params['domain_id'] = 1; } // Check list id values if ($params['list_id'] != '') { $lists = explode(',', $params['list_id']); foreach ($lists as $id) { if ($id > 0) { $new_list[] = $id; } } $params['list_id'] = implode(',', $new_list); } if ($params['action'] == 'help') { display_help(); exit; } return $params; }
$text .= $rs->form_close(); } else { $text .= "<div style='text-align:center'>" . WMLAN_09 . "</div>"; } $ns->tablerender(WMLAN_00, $text); } // Create and Edit if ($action == "create" || $action == "edit") { if ($sub_action == "edit") { $sql->db_Select("generic", "gen_intdata, gen_ip, gen_chardata", "gen_id = {$id}"); $row = $sql->db_Fetch(); } $text = "\n\t\t<div style='text-align:center'>\n\t\t<form method='post' action='" . e_SELF . "' id='wmform'>\n\t\t<fieldset id='code-wmessage-create'>\n <table class='table adminform'>\n\t\t<colgroup>\n\t\t\t<col class='col-label' />\n\t\t\t<col class='col-control' />\n\t\t</colgroup>\n\t\t"; $text .= "\n\t\t<tr>\n\t\t<td>" . WMLAN_10 . "</td>\n\t\t<td>\n\t\t<input type='text' class='tbox' id='wm_caption' name='wm_caption' maxlength='80' style='width:95%' value=\"" . $tp->toForm($row['gen_ip']) . "\" />\n\t\t</td>\n\t\t</tr>"; $text .= "<tr>\n\t\t<td>" . WMLAN_04 . "</td>\n\t\t<td>\n\t\t<textarea class='e-wysiwyg tbox' id='data' name='data' cols='70' rows='15' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this)'>" . $tp->toForm($row['gen_chardata']) . "</textarea>\n\t\t<br />"; $text .= display_help("helpb", "admin"); $text .= "\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td>" . WMLAN_03 . "</td>\n\t\t<td>" . r_userclass("wm_active", $row['gen_intdata'], "off", "public,guest,nobody,member,admin,classes") . "</td></tr>\n\t\t</table>"; $text .= "\n\t\t<div class='buttons-bar center'>"; if ($sub_action == "edit") { $text .= $frm->admin_button('wm_update', LAN_UPDATE, 'update'); } else { $text .= $frm->admin_button('wm_insert', LAN_CREATE); } $text .= "<input type='hidden' name='wm_id' value='" . $id . "' />"; $text .= "</div>\n\t\t</fieldset>\n\t\t</form>\n\t\t</div>"; $ns->tablerender(WMLAN_01, $text); } if ($action == "opt") { global $pref, $ns; $text = "<div style='text-align:center'>\n\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\n\t\t<fieldset id='code-wmessage-options'>\n <table class='table adminform'>\n\t\t<colgroup>\n\t\t\t<col class='col-label' />\n\t\t\t<col class='col-control' />\n\t\t</colgroup>\n\t\t<tr>\n\n\t\t<td>\n\t\t" . WMLAN_05 . "<br />\n\t\t<span class='smalltext'>" . WMLAN_06 . "</span>\n\t\t</td>\n\t\t<td>" . (varset($pref['wm_enclose'], 0) ? "<input type='checkbox' name='wm_enclose' value='1' checked='checked' />" : "<input type='checkbox' name='wm_enclose' value='1' />") . "\n\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\n\t\t<td>\n\t\t" . WMLAN_07 . "\n\t\t</td>\n\t\t<td>" . (varset($pref['wmessage_sc'], 0) ? "<input type='checkbox' name='wmessage_sc' value='1' checked='checked' />" : "<input type='checkbox' name='wmessage_sc' value='1' />") . "\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\n\t\t<div class='buttons-bar center'>"; $text .= $frm->admin_button('updateoptions', LAN_SAVE);
$i = 0; $sql->db_Select("e107slider", "*", "ORDER BY id DESC", false); while ($row = $sql->db_Fetch()) { $id[$i] = $row['id']; $caption[$i] = $row['caption']; $image[$i] = $row['image']; $link[$i] = $row['link']; $i++; } if ($es_head != '') { $es_head = ES_PLUGIN_SL_1; } else { $es_head = ES_PLUGIN_SL_2; } //-----------------------------------------------------------------------------------------------------------+ $file_handle = opendir(e_PLUGIN . "e107slider/slides"); while ($file_name = readdir($file_handle)) { if ($file_name == "." || $file_name == "..") { continue; } $iconlist[] = $file_name; } closedir($file_handle); while (list($key, $icon) = each($iconlist)) { $icontext .= " <a href='javascript:addtext(\"{$icon}\")'><img src='" . e_PLUGIN . "e107slider/slides/{$icon}' style='border:0px;max-width:200px;max-height:80px;' alt='' /></a>"; } //-----------------------------------------------------------------------------------------------------------+ $es_text = "\n<form id='dataform' method='post' action='" . e_SELF . "'>\n\t<div class='vs-info'>\n\t\t" . $es_message . "\n\t</div>\n\t<table class='vs-table' style='" . ADMIN_WIDTH . "'>\n \t\t<thead>\n \t\t\t<tr>\n\t\t\t\t<th colspan='2'><h3>" . $es_head . "</h3></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td style='width:30%'>" . ES_PLUGIN_SL_5 . "</td>\n\t\t\t\t<td style='width:70%;'>\n\t\t\t\t\t<input class='tbox' type='text' name='es_image' style='width: 40%' value='" . $es_image . "' maxlength='200' />\n\t\t\t\t\t<br /><br />\n\t\t\t\t\t<div>" . $icontext . "\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width:30%'>" . ES_PLUGIN_SL_4 . "</td>\n\t\t\t\t<td style='width:70%;'>\n\t\t\t\t\t<textarea class='tbox' name='es_caption' style='width: 100%' rows='4' onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\">" . $es_caption . "</textarea><br />\n"; $es_text .= display_help('helpb') . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width:30%'>" . ES_PLUGIN_SL_6 . "</td>\n\t\t\t\t<td style='width:70%;'>\n\t\t\t\t\t<input class='tbox' type='text' name='es_link' style='width: 70%' value='" . $es_link . "' maxlength='200' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='table-end'>\n\t\t\t\t\t\t" . ($action == "edit" ? "<input type='hidden' name='es_id' value='" . $es_id . "' />" : "") . "\n\t\t\t\t\t\t<input class='button' type='submit' name='" . ($action == "edit" ? "update_ES" : "create_ES") . "' value='" . ($action == "edit" ? ES_PLUGIN_SL_7 : ES_PLUGIN_SL_8) . "' />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</form>\n<p><center>e107Slider v" . $pref['plug_installed']['e107slider'] . " by <a href='http://www.xenthemes.com' target='_blank'>Xen Themes</a></center></p>\n"; $ns->tablerender(es_PLUGIN_1, $es_text); require_once e_ADMIN . "footer.php";
function ren_help($mode = 1, $addtextfunc = "addtext", $helpfunc = "help") { // ren_help() is deprecated - use display_help(). return display_help("helpb", $mode, $addtextfunc, $helpfunc = "help"); }
function user_form($action, $players_id, $players_name, $event_id, $match_id, $allowDraw, $allowForfeit, $allowScore, $userclass, $date_scheduled, $user_player) { global $sql; global $text; global $tp; global $time; /* Event Info */ $event = new Event($event_id); if (e_WYSIWYG) { $insertjs = "rows='5'"; } else { require_once e_HANDLER . "ren_help.php"; $insertjs = "rows='5' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; } /* //dbg form echo "<br>_POST: "; var_dump($_POST); echo "<br>_GET: "; var_dump($_GET); */ $match_str = ''; $matchreport_str = EB_MATCHR_L31; if ($action == 'matchedit') { $matchreport_str = EB_MATCHR_L46; $text .= '<div>'; $text .= EB_MATCHR_L45 . " {$match_id}<br />"; $text .= '<img src="' . e_PLUGIN . 'ebattles/images/exclamation.png"/>'; $text .= EB_MATCHR_L47; $text .= '</div><br />'; } if ($action == 'matchschedulededit') { $matchreport_str = EB_MATCHR_L46; $text .= '<div>'; $text .= EB_MATCHR_L45 . " {$match_id}<br />"; $text .= '</div><br />'; } if ($action == 'matchschedule') { $matchreport_str = EB_MATCHR_L48; } if ($match_id) { $match_str = '&matchid=' . $match_id; } if ($action) { $action_str = '&actionid=' . $action; } // Assign values to POST if not set // fm: check might not be correct here // should check if $action=='matchedit') only? if (!isset($_POST['time_reported']) || $action == 'matchscheduledreport') { $_POST['time_reported'] = $time; } $time_reported = $_POST['time_reported']; if (!isset($_POST['reported_by'])) { $_POST['reported_by'] = USERID; } $reported_by = $_POST['reported_by']; if (isset($_POST['match_comment'])) { $comment = $tp->toDB($_POST['match_comment']); } else { $comment = ''; } for ($matchMap = 0; $matchMap < min($numMaps, $event->getField('MaxMapsPerMatch')); $matchMap++) { if (!isset($_POST['map' . $matchMap])) { $_POST['map' . $matchMap] = 0; } } // if vars are not set, set them as empty. if (!isset($_POST['nbr_players'])) { $_POST['nbr_players'] = 2; } if (!isset($_POST['nbr_teams'])) { $_POST['nbr_teams'] = 2; } // now to output the form HTML. $max_nbr_players = count($players_id) - 1; $nbr_players = $_POST['nbr_players']; $nbr_teams = $_POST['nbr_teams']; if (isset($_POST['addPlayer'])) { $nbr_players++; } if (isset($_POST['removePlayer'])) { $nbr_players--; } if ($nbr_players > $max_nbr_players) { $nbr_players = $max_nbr_players; } if ($nbr_players < 2) { $nbr_players = 2; } $_POST['nbr_players'] = $nbr_players; for ($i = 1; $i <= $nbr_players; $i++) { if (!isset($_POST['player' . $i])) { $_POST['player' . $i] = $players_id[0]; } //debug - echo "Player #".$i.": ".$_POST['player'.$i]."<br />"; } if (isset($_POST['addTeam'])) { $nbr_teams++; } if (isset($_POST['removeTeam'])) { $nbr_teams--; } if ($nbr_teams > $max_nbr_players) { $nbr_teams = $max_nbr_players; } if ($nbr_teams < 2) { $nbr_teams = 2; } $_POST['nbr_teams'] = $nbr_teams; for ($i = 1; $i <= $nbr_players; $i++) { if (!isset($_POST['team' . $i])) { $_POST['team' . $i] = 'Team #' . $i; } if (!isset($_POST['score' . $i])) { $_POST['score' . $i] = 0; } if (!isset($_POST['faction' . $i])) { $_POST['faction' . $i] = 0; } } for ($i = 1; $i <= $nbr_teams; $i++) { if (!isset($_POST['rank' . $i])) { $_POST['rank' . $i] = 'Team #' . $i; } } //[dbg]$text .= "nbr_players = $nbr_players, nbr_teams = $nbr_teams<br>"; ///////////////// /// MAIN FORM /// ///////////////// $text .= '<form id="matchreportform" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?eventid=' . $event_id . $match_str . $action_str . '" method="post">'; $text .= '<div>'; // TABLE - Player/Teams Add/Remove //---------------------------------- if ($action != 'matchscheduledreport' && $action != 'matchschedulededit') { $text .= EB_MATCHR_L15; $text .= '<table id="matchresult_nbrPlayersTeams"><tbody>'; // Nbr of Players $text .= '<tr><td>' . $nbr_players . ' ' . EB_MATCHR_L21 . '</td>'; $text .= '<td><input type="hidden" name="nbr_players" value="' . $_POST['nbr_players'] . '"/>'; // Add Player if ($nbr_players < $max_nbr_players) { $text .= '<input class="eb_button" type="submit" value="' . EB_MATCHR_L16 . '" name="addPlayer"/></td>'; } else { $text .= '<input class="button_disabled" type="submit" value="' . EB_MATCHR_L16 . '" name="addPlayer" disabled="disabled"/></td>'; } // Remove Player if ($nbr_players > 2) { $text .= '<td><input class="eb_button" type="submit" value="' . EB_MATCHR_L17 . '" name="removePlayer"/></td>'; } else { $text .= '<td><input class="button_disabled" type="submit" value="' . EB_MATCHR_L17 . '" name="removePlayer" disabled="disabled"/></td>'; } $text .= '</tr>'; // Nbr of Teams $text .= '<tr><td>' . $nbr_teams . ' ' . EB_MATCHR_L22 . '</td>'; $text .= '<td><input type="hidden" name="nbr_teams" value="' . $_POST['nbr_teams'] . '"/>'; // Add Team if ($nbr_teams < $nbr_players) { $text .= '<input class="eb_button" type="submit" value="' . EB_MATCHR_L18 . '" name="addTeam"/></td>'; } else { $text .= '<input class="button_disabled" type="submit" value="' . EB_MATCHR_L18 . '" name="addTeam" disabled="disabled"/></td>'; } // Remove Team if ($nbr_teams > 2) { $text .= '<td><input class="eb_button" type="submit" value="' . EB_MATCHR_L19 . '" name="removeTeam"/></td>'; } else { $text .= '<td><input class="button_disabled" type="submit" value="' . EB_MATCHR_L19 . '" name="removeTeam" disabled="disabled"/></td>'; } $text .= '</tr>'; $text .= '</tbody></table>'; //$text .= '<p><input class="inspector" type="button" value="Inspect" onclick="junkdrawer.inspectListOrder(\'matchresultlist\')"/></p>'; $text .= '<br />'; } // TABLE - Players/Teams Selection //---------------------------------- // List of all Factions $q_Factions = "SELECT " . TBL_FACTIONS . ".*" . " FROM " . TBL_FACTIONS . " WHERE (" . TBL_FACTIONS . ".Game = '" . $event->getField('Game') . "')"; $result_Factions = $sql->db_Query($q_Factions); $numFactions = mysql_numrows($result_Factions); $disable_input = $action == 'matchscheduledreport' ? 1 : 0; if ($action != 'matchscheduledreport') { $text .= EB_MATCHR_L20; } $text .= '<table id="matchresult_selectPlayersTeams"><tbody>'; $text .= '<tr><td></td><td>' . EB_MATCHR_L38 . '</td>'; $text .= '<td>' . EB_MATCHR_L25 . '</td>'; if ($action != 'matchschedule' && $action != 'matchschedulededit' && $allowScore == TRUE) { $text .= '<td>' . EB_MATCHR_L26 . '</td>'; } if ($action != 'matchschedule' && $action != 'matchschedulededit' && $numFactions > 0) { $text .= '<td>' . EB_MATCHR_L41 . '</td>'; } $text .= '</tr>'; for ($i = 1; $i <= $nbr_players; $i++) { $text .= '<tr><td>' . EB_MATCHR_L23 . $i . ': </td>'; $match_winner = 0; if ($event->getField('match_report_userclass') == eb_UC_MATCH_WINNER && $i == 1 && $user_player != 0) { $match_winner = 1; $_POST['player' . $i] = $user_player; } if ($disable_input == 1 || $match_winner == 1) { for ($j = 1; $j <= $max_nbr_players + 1; $j++) { if (strtolower($_POST['player' . $i]) == strtolower($players_id[$j - 1])) { $text .= '<td><input type="hidden" name="player' . $i . '" value="' . $players_id[$j - 1] . '"/>'; $text .= $players_name[$j - 1] . '</td>'; } } } else { $text .= '<td><select class="tbox" name="player' . $i . '">'; for ($j = 1; $j <= $max_nbr_players + 1; $j++) { $text .= '<option value="' . $players_id[$j - 1] . '"'; if (strtolower($_POST['player' . $i]) == strtolower($players_id[$j - 1])) { $text .= ' selected="selected"'; } $text .= '>' . $players_name[$j - 1] . '</option>'; } $text .= '</select></td>'; } if ($disable_input == 1) { for ($j = 1; $j <= $nbr_teams; $j++) { if (strtolower($_POST['team' . $i]) == 'team #' . $j) { $text .= '<td><input type="hidden" name="team' . $j . '" value="Team #' . $j . '"/>'; $text .= EB_MATCHR_L29 . $j . '</td>'; } } } else { $text .= '<td><select class="tbox" name="team' . $i . '">'; for ($j = 1; $j <= $nbr_teams; $j++) { $text .= '<option value="Team #' . $j . '"'; if (strtolower($_POST['team' . $i]) == 'team #' . $j) { $text .= ' selected="selected"'; } $text .= '>' . EB_MATCHR_L29 . $j . '</option>'; } $text .= '</select></td>'; } if ($action != 'matchschedule' && $action != 'matchschedulededit') { if ($allowScore == TRUE) { $text .= '<td>'; $text .= '<input class="tbox" type="text" size="3" name="score' . $i . '" value="' . $_POST['score' . $i] . '"/>'; $text .= '</td>'; } if ($numFactions > 0) { $text .= '<td><select class="tbox" name="faction' . $i . '">'; $text .= '<option value="0"'; $text .= '>' . EB_MATCHR_L43 . '</option>'; for ($faction = 1; $faction <= $numFactions; $faction++) { $fID = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".FactionID"); $fIcon = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".Icon"); $fName = mysql_result($result_Factions, $faction - 1, TBL_FACTIONS . ".Name"); $text .= '<option value="' . $fID . '"'; if (strtolower($_POST['faction' . $i]) == $fID) { $text .= ' selected="selected"'; } $text .= '>' . $fName . '</option>'; } $text .= '</select></td>'; } } $text .= '</tr>'; } $text .= '</tbody></table>'; $text .= '<br />'; if ($action != 'matchschedule' && $action != 'matchschedulededit') { // TABLE - Teams Rank Selection //---------------------------------- $text .= EB_MATCHR_L24; $text .= '<table id="matchresult_rankTeams"><tbody>'; $text .= '<tr><td></td><td>' . EB_MATCHR_L25 . '</td>'; if ($allowDraw == TRUE) { $text .= '<td>' . EB_MATCHR_L27 . '</td>'; } if ($allowForfeit == TRUE) { $text .= '<td>' . EB_MATCHR_L57 . '</td>'; } $text .= '</tr>'; for ($i = 1; $i <= $nbr_teams; $i++) { $text .= '<tr>'; $text .= '<td>'; $text .= EB_MATCHR_L28 . $i . ':'; $text .= '</td>'; $text .= '<td><select class="tbox" name="rank' . $i . '" id="rank' . $i . '" onchange = "SwitchSelected(' . $i . ')">'; for ($j = 1; $j <= $nbr_teams; $j++) { $text .= '<option value="Team #' . $j . '"'; if (strtolower($_POST['rank' . $i]) == 'team #' . $j) { $text .= ' selected="selected"'; } $text .= '>' . EB_MATCHR_L29 . $j . '</option>'; } $text .= '</select></td>'; if ($allowDraw == TRUE) { $text .= '<td>'; if ($i > 1) { $text .= '<input class="tbox" type="checkbox" name="draw' . $i . '" value="1"'; if (strtolower($_POST['draw' . $i]) != "") { $text .= ' checked="checked"'; } $text .= '/>'; } $text .= '</td>'; } if ($allowForfeit == TRUE) { $text .= '<td>'; if ($i > 1) { $text .= '<input class="tbox" type="checkbox" name="forfeit' . $i . '" value="1"'; if (strtolower($_POST['forfeit' . $i]) != "") { $text .= ' checked="checked"'; } $text .= '/>'; } $text .= '</td>'; } $text .= '</tr>'; } $text .= '</tbody></table>'; } // Map Selection //---------------------------------- // List of all Maps $q_Maps = "SELECT " . TBL_MAPS . ".*" . " FROM " . TBL_MAPS . " WHERE (" . TBL_MAPS . ".Game = '" . $event->getField('Game') . "')"; $result_Maps = $sql->db_Query($q_Maps); $numMaps = mysql_numrows($result_Maps); if ($numMaps > 0) { $text .= EB_MATCHR_L42; $text .= '<table id="matchresult_selectMap" class="table_left"><tbody>'; for ($matchMap = 0; $matchMap < min($numMaps, $event->getField('MaxMapsPerMatch')); $matchMap++) { $text .= '<tr>'; $text .= '<td><select class="tbox" name="map' . $matchMap . '">'; $text .= '<option value="0"'; $text .= '>' . EB_MATCHR_L43 . '</option>'; for ($map = 0; $map < $numMaps; $map++) { $mID = mysql_result($result_Maps, $map, TBL_MAPS . ".MapID"); $mImage = mysql_result($result_Maps, $map, TBL_MAPS . ".Image"); $mName = mysql_result($result_Maps, $map, TBL_MAPS . ".Name"); $mDescrition = mysql_result($result_Maps, $map, TBL_MAPS . ".Description"); $text .= '<option value="' . $mID . '"'; if (strtolower($_POST['map' . $matchMap]) == $mID) { $text .= ' selected="selected"'; } $text .= '>' . $mName . '</option>'; } $text .= '</select></td>'; $text .= '</tr>'; } $text .= '</tbody></table>'; $text .= '<br />'; } if ($action != 'matchschedule' && $action != 'matchschedulededit') { // Comments //---------------------------------- $text .= '<br />'; $text .= '<div style="display:table; margin-left:auto; margin-right:auto;">'; $text .= EB_MATCHR_L30 . '<br />'; $text .= '<textarea class="tbox" id="match_comment" name="match_comment" style="width:400px" cols="70" ' . $insertjs . '>' . $comment . '</textarea>'; if (!e_WYSIWYG) { $text .= '<br />' . display_help("helpb", "comment"); } $text .= '</div>'; $text .= '<br />'; } if ($action == 'matchschedule' || $action == 'matchschedulededit') { //<!-- Date Selection --> $text .= EB_MATCHR_L49; $text .= ' <table> <tr> <td> <table> <tr> <td> <div><input class="tbox timepicker" type="text" name="date_scheduled" id="f_date" value="' . $date_scheduled . '" readonly="readonly" /></div> </td> <td> <div><input class="eb_button" type="button" value="' . EB_MATCHR_L51 . '" onclick="clearDate(this.form);"/></div> </td> </tr> </table> </td> </tr> </table> '; } $text .= '<div style="display:table; margin-left:auto; margin-right:auto;">'; $text .= '<input type="hidden" name="nbr_players" value="' . $nbr_players . '"/>'; $text .= '<input type="hidden" name="nbr_teams" value="' . $nbr_teams . '"/>'; $text .= '<input type="hidden" name="userclass" value="' . $userclass . '"/>'; $text .= '<input type="hidden" name="reported_by" value="' . $reported_by . '"/>'; $text .= '<input type="hidden" name="time_reported" value="' . $time_reported . '"/>'; $text .= '<input class="eb_button" type="submit" value="' . $matchreport_str . '" name="submit_match"/>'; $text .= '<span id="ajaxSpinnerContainer"> <img src="' . e_PLUGIN . 'ebattles/images/ajax-loader.gif" title="working..." alt="working..."/> ' . EB_EVENTM_L157 . ' </span>'; $text .= '</div>'; $text .= '</div>'; $text .= '</form>'; }
function displayClanSettingsForm($create = false) { global $sql; if (e_WYSIWYG) { $insertjs = "rows='15'"; } else { require_once e_HANDLER . "ren_help.php"; $insertjs = "rows='5' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; } if ($create == true) { $clan_str = ''; $action_str = 'actionid=create'; } else { $clan_str = 'clanid=' . $this->getField('ClanID'); $action_str = '&actionid=edit'; } $text .= "\r\n\t\t<script type='text/javascript'>\r\n\t\t<!--//\r\n\t\tfunction changeteamtext(v)\r\n\t\t{\r\n\t\tdocument.getElementById('clanavatar').value=v;\r\n\t\t} //-->\r\n\t\t</script>\r\n\t\t"; if ($this->getField('Image') == '' && $pref['eb_avatar_default_team_image'] != '') { $this->setFieldDB('Image', $pref['eb_avatar_default_team_image']); } $text .= '<form id="form-clan-settings" action="' . e_PLUGIN . 'ebattles/clanprocess.php?' . $clan_str . $action_str . '" method="post">'; $text .= ' <table class="eb_table" style="width:95%"> <tbody> '; //<!-- Clan Name -->' $text .= '<tr>'; $text .= ' <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L9 . '<span class="required">*</span></td> <td class="eb_td"> <input class="tbox required" type="text" size="40" name="clanname" value="' . $this->getField('Name') . '"/> </td> </tr>'; //<!-- Clan Avatar --> $text .= '<tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L29 . '<div class="smalltext">' . EB_CLANM_L30 . '</div></td> <td class="eb_td">'; if ($this->getField('Image') != '') { $text .= '<img ' . getAvatarResize(getImagePath($this->getField('Image'), 'team_avatars')) . '/> '; } $text .= '<input class="tbox" type="text" id="clanavatar" name="clanavatar" size="20" value="' . $this->getField('Image') . '"/>'; $text .= '<div><br />'; $avatarlist = array(); $avatarlist[0] = ""; $handle = opendir(e_PLUGIN . "ebattles/images/team_avatars/"); while ($file = readdir($handle)) { if ($file != "." && $file != ".." && $file != "index.html" && $file != ".svn" && $file != "Thumbs.db") { $avatarlist[] = $file; } } closedir($handle); for ($c = 1; $c <= count($avatarlist) - 1; $c++) { $text .= '<a href="javascript:changeteamtext(\'' . $avatarlist[$c] . '\')"><img src="' . e_PLUGIN . 'ebattles/images/team_avatars/' . $avatarlist[$c] . '" alt="' . $avatarlist[$c] . '" style="border:0"/></a> '; } $text .= ' </div> </td> </tr>'; //<!-- Clan Tag --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L10 . '</td> <td class="eb_td"> <input class="tbox" type="text" size="40" name="clantag" value="' . $this->getField('Tag') . '"/> </td> </tr> '; //<!-- Clan Password --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L11 . '</td> <td class="eb_td"> <input class="tbox" type="text" size="40" name="clanpassword" value="' . $this->getField('password') . '"/> </td> </tr> '; //<!-- Clan Website --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L31 . '</td> <td class="eb_td"> <input class="tbox" type="text" size="40" name="clanwebsite" value="' . $this->getField('websiteURL') . '"/> </td> </tr> '; //<!-- Clan Email --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L32 . '</td> <td class="eb_td"> <input class="tbox" type="text" size="40" name="clanemail" value="' . $this->getField('email') . '"/> </td> </tr> '; //<!-- Clan IM --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L33 . '</td> <td class="eb_td"> <input class="tbox" type="text" size="40" name="clanIM" value="' . $this->getField('IM') . '"/> </td> </tr> '; //<!-- Clan Description --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_CLANM_L34 . '</td> <td class="eb_td"> '; $text .= '<textarea class="tbox" id="clandescription" name="clandescription" cols="70" ' . $insertjs . '>' . $this->getField('Description') . '</textarea>'; if (!e_WYSIWYG) { $text .= '<br />' . display_help("helpb", 1); } $text .= ' </td> </tr> </tbody> </table> '; //<!-- Save Button --> $text .= ' <table><tbody><tr><td> <div> ' . ebImageTextButton('clansettingssave', 'disk.png', EB_CLANM_L12) . ' </div> </td></tr></tbody></table> </form>'; return $text; }
function displayEventSettingsForm($create = false) { global $sql; global $pref; if (e_WYSIWYG) { $insertjs = "rows='15'"; } else { require_once e_HANDLER . "ren_help.php"; $insertjs = "rows='5' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'"; } if ($create == true) { $event_str = ''; $action_str = 'actionid=create'; } else { $event_str = 'eventid=' . $this->getField('EventID'); $action_str = '&actionid=edit'; } /* Nbr players */ $q = "SELECT COUNT(*) as NbrPlayers" . " FROM " . TBL_PLAYERS . " WHERE (" . TBL_PLAYERS . ".Event = '" . $this->fields['EventID'] . "')"; $result = $sql->db_Query($q); $row = mysql_fetch_array($result); $nbrplayers = $row['NbrPlayers']; /* Nbr Teams */ $q = "SELECT COUNT(*) as NbrTeams" . " FROM " . TBL_TEAMS . " WHERE (Event = '" . $this->fields['EventID'] . "')"; $result = $sql->db_Query($q); $row = mysql_fetch_array($result); $nbrteams = $row['NbrTeams']; $competition_type = $this->getCompetitionType(); $text .= "\r\n\t\t<script type='text/javascript'>\r\n\t\t<!--//\r\n\t\t// Forms\r\n\t\t\$(function() {\r\n\t\t\$( '#radio2' ).buttonset();\r\n\t\t\$('.timepicker').datetimepicker({\r\n\t\tampm: true,\r\n\t\ttimeFormat: 'hh:mm TT',\r\n\t\tstepHour: 1,\r\n\t\tstepMinute: 10,\r\n\t\tminDate: 0\r\n\t\t});\r\n\t\t});\r\n\t\t//-->\r\n\t\t</script>\r\n\t\t"; $text .= ' <script type="text/javascript"> <!--// function clearStartDate(frm) { frm.startdate.value = "" } function clearEndDate(frm) { frm.enddate.value = "" } //--> </script> '; $text .= "\r\n\t\t<script type='text/javascript'>\r\n\t\t<!--//\r\n\t\tfunction kick_player(v)\r\n\t\t{\r\n\t\tdocument.getElementById('kick_player').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction ban_player(v)\r\n\t\t{\r\n\t\tdocument.getElementById('ban_player').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction unban_player(v)\r\n\t\t{\r\n\t\tdocument.getElementById('unban_player').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction del_player_games(v)\r\n\t\t{\r\n\t\tdocument.getElementById('del_player_games').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction del_player_awards(v)\r\n\t\t{\r\n\t\tdocument.getElementById('del_player_awards').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction checkin_player(v)\r\n\t\t{\r\n\t\tdocument.getElementById('checkin_player').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\r\n\t\tfunction replace_player(v)\r\n\t\t{\r\n\t\tdocument.getElementById('replace_player').value=v;\r\n\t\tdocument.getElementById('playersform').submit();\r\n\t\t}\t\t\r\n\t\tfunction kick_team(v)\r\n\t\t{\r\n\t\tdocument.getElementById('kick_team').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction ban_team(v)\r\n\t\t{\r\n\t\tdocument.getElementById('ban_team').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction unban_team(v)\r\n\t\t{\r\n\t\tdocument.getElementById('unban_team').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction del_team_games(v)\r\n\t\t{\r\n\t\tdocument.getElementById('del_team_games').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction del_team_awards(v)\r\n\t\t{\r\n\t\tdocument.getElementById('del_team_awards').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction checkin_team(v)\r\n\t\t{\r\n\t\tdocument.getElementById('checkin_team').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\r\n\t\tfunction replace_team(v)\r\n\t\t{\r\n\t\tdocument.getElementById('replace_team').value=v;\r\n\t\tdocument.getElementById('teamsform').submit();\r\n\t\t}\t\t\r\n\t\t//-->\r\n\t\t</script>\r\n\t\t"; $text .= '<form id="form-event-settings" action="' . e_PLUGIN . 'ebattles/eventprocess.php?' . $event_str . $action_str . '" method="post">'; $text .= ' <table class="eb_table" style="width:95%"> <tbody> '; //<!-- Event Name --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L15 . '<span class="required">*</span></td> <td class="eb_td"> <div><input class="tbox required" type="text" size="40" name="eventname" value="' . $this->getField('Name') . '"/></div> </td> </tr> '; //<!-- Event Password --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L16 . '</td> <td class="eb_td"> <div><input class="tbox" type="text" size="40" name="eventpassword" value="' . $this->getField('password') . '"/></div> </td> </tr> '; //<!-- Event Game --> // Can change only if no players are signed up $disabled_str = $nbrplayers + $nbrteams == 0 ? '' : 'disabled="disabled"'; $q = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . " WHERE (GameID = '" . $this->getField('Game') . "')"; $result = $sql->db_Query($q); $gIcon = mysql_result($result, $i, TBL_GAMES . ".Icon"); $q = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . " ORDER BY Name"; $result = $sql->db_Query($q); /* Error occurred, return given name by default */ $numGames = mysql_numrows($result); $text .= '<tr>'; $text .= '<td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L17 . '</td>'; $text .= '<td class="eb_td">'; $text .= '<img ' . getGameIconResize($gIcon) . '/> '; $text .= '<select class="tbox" name="eventgame" ' . $disabled_str . '>'; for ($i = 0; $i < $numGames; $i++) { $gname = mysql_result($result, $i, TBL_GAMES . ".Name"); $gid = mysql_result($result, $i, TBL_GAMES . ".GameID"); if ($this->getField('Game') == $gid) { $text .= '<option value="' . $gid . '" selected="selected">' . htmlspecialchars($gname) . '</option>'; $ematchtypes = explode(",", preg_replace('/\\s+/', '', mysql_result($result, $i, TBL_GAMES . ".MatchTypes"))); } else { $text .= '<option value="' . $gid . '">' . htmlspecialchars($gname) . '</option>'; } } $text .= '</select>'; $text .= '</td></tr>'; //<!-- Type --> $disabled_str = $create == true ? '' : 'disabled="disabled"'; $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L18 . '</td> <td class="eb_td"><select class="tbox" name="eventtype" ' . $disabled_str . '>'; $text .= '<option value="One Player Ladder" ' . ($this->getField('Type') == "One Player Ladder" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L22 . '</option>'; $text .= '<option value="Team Ladder" ' . ($this->getField('Type') == "Team Ladder" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L23 . '</option>'; $text .= '<option value="Clan Ladder" ' . ($this->getField('Type') == "Clan Ladder" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L25 . '</option>'; $text .= '<option value="One Player Tournament" ' . ($this->getField('Type') == "One Player Tournament" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L33 . '</option>'; $text .= '<option value="Clan Tournament" ' . ($this->getField('Type') == "Clan Tournament" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L35 . '</option>'; $text .= '</select> </td> </tr> '; if ($create == false) { //<!-- Match Type --> // Can change only if no players are signed up $disabled_str = $nbrplayers + $nbrteams == 0 ? '' : 'disabled="disabled"'; $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L132 . '</td> <td class="eb_td"> <div> '; $text .= '<select class="tbox" name="eventmatchtype" ' . $disabled_str . '>'; $text .= '<option value="" ' . ($this->getField('MatchType') == "" ? 'selected="selected"' : '') . '>-</option>'; foreach ($ematchtypes as $matchtype) { if ($matchtype != '') { $text .= '<option value="' . $matchtype . '" ' . ($this->getField('MatchType') == $matchtype ? 'selected="selected"' : '') . '>' . $matchtype . '</option>'; } } $text .= '</select> </div> </td> </tr>'; } if ($create == false) { //<!-- Rating Type --> switch ($competition_type) { case "Ladder": $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40" title="' . EB_EVENTM_L118 . '">' . EB_EVENTM_L117 . '</td> <td class="eb_td"> <div id="radio2"> '; $text .= '<input class="tbox" type="radio" id="radio21" size="40" name="eventrankingtype" ' . ($this->getField('RankingType') == "Classic" ? 'checked="checked"' : '') . ' value="Classic" /><label for="radio21">' . EB_EVENTM_L119 . '</label>'; $text .= '<input class="tbox" type="radio" id="radio22" size="40" name="eventrankingtype" ' . ($this->getField('RankingType') == "CombinedStats" ? 'checked="checked"' : '') . ' value="CombinedStats" /><label for="radio22">' . EB_EVENTM_L120 . '</label>'; $text .= ' </div> </td> </tr> '; break; } } //<!-- Match report userclass --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L21 . '</td> <td class="eb_td"><select class="tbox" name="eventmatchreportuserclass">'; $text .= '<option value="' . eb_UC_MATCH_WINNER . '" ' . ($this->getField('match_report_userclass') == eb_UC_MATCH_WINNER ? 'selected="selected"' : '') . '>' . EB_EVENTM_L211 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_PLAYER . '" ' . ($this->getField('match_report_userclass') == eb_UC_EVENT_PLAYER ? 'selected="selected"' : '') . '>' . EB_EVENTM_L22 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_MODERATOR . '" ' . ($this->getField('match_report_userclass') == eb_UC_EVENT_MODERATOR ? 'selected="selected"' : '') . '>' . EB_EVENTM_L23 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_OWNER . '" ' . ($this->getField('match_report_userclass') == eb_UC_EVENT_OWNER ? 'selected="selected"' : '') . '>' . EB_EVENTM_L24 . '</option>'; $text .= '</select> </td> </tr> '; //<!-- Match replay report userclass --> /* $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">'.EB_EVENTM_L134.'</td> <td class="eb_td"><select class="tbox" name="eventmatchreplayreportuserclass">'; $text .= '<option value="'.eb_UC_EVENT_PLAYER.'" '.($this->getField('match_replay_report_userclass') == eb_UC_EVENT_PLAYER ? 'selected="selected"' : '') .'>'.EB_EVENTM_L22.'</option>'; $text .= '<option value="'.eb_UC_EVENT_MODERATOR.'" '.($this->getField('match_replay_report_userclass') == eb_UC_EVENT_MODERATOR ? 'selected="selected"' : '') .'>'.EB_EVENTM_L23.'</option>'; $text .= '<option value="'.eb_UC_EVENT_OWNER.'" '.($this->getField('match_replay_report_userclass') == eb_UC_EVENT_OWNER ? 'selected="selected"' : '') .'>'.EB_EVENTM_L24.'</option>'; $text .= '</select> </td> </tr> '; */ if ($create == false) { //<!-- Allow Quick Loss Report --> switch ($competition_type) { case "Ladder": $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L25 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="checkbox" name="eventallowquickloss"'; if ($this->getField('quick_loss_report') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' </div> </td> </tr> '; break; } } //<!-- Allow Score --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L26 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="checkbox" name="eventallowscore"'; if ($this->getField('AllowScore') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' </div> </td> </tr>'; //<!-- Match Approval --> $q = "SELECT COUNT(DISTINCT " . TBL_MATCHS . ".MatchID) as NbrMatches" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (" . TBL_MATCHS . ".Event = '" . $this->getField('EventID') . "')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)" . " AND (" . TBL_MATCHS . ".Status = 'pending')"; $result = $sql->db_Query($q); $row = mysql_fetch_array($result); $nbrMatchesPending = $row['NbrMatches']; $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40" title="' . EB_EVENTM_L109 . '">' . EB_EVENTM_L108 . '</td> <td class="eb_td"> <div>'; $text .= '<select class="tbox" name="eventmatchapprovaluserclass">'; $text .= '<option value="' . eb_UC_NONE . '" ' . ($this->getField('MatchesApproval') == eb_UC_NONE ? 'selected="selected"' : '') . '>' . EB_EVENTM_L113 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_PLAYER . '" ' . (($this->getField('MatchesApproval') & eb_UC_EVENT_PLAYER) != 0 ? 'selected="selected"' : '') . '>' . EB_EVENTM_L112 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_MODERATOR . '" ' . (($this->getField('MatchesApproval') & eb_UC_EVENT_MODERATOR) != 0 ? 'selected="selected"' : '') . '>' . EB_EVENTM_L111 . '</option>'; $text .= '<option value="' . eb_UC_EVENT_OWNER . '" ' . (($this->getField('MatchesApproval') & eb_UC_EVENT_OWNER) != 0 ? 'selected="selected"' : '') . '>' . EB_EVENTM_L110 . '</option>'; $text .= '</select>'; $text .= $nbrMatchesPending > 0 ? '<div><img class="eb_image" src="' . e_PLUGIN . 'ebattles/images/exclamation.png" alt="' . EB_MATCH_L13 . '" title="' . EB_MATCH_L13 . '"/> ' . $nbrMatchesPending . ' ' . EB_EVENT_L64 . '</div>' : ''; $text .= ' </div> </td> </tr> '; if ($create == false) { //<!-- Allow Draws --> switch ($competition_type) { case "Ladder": $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L27 . '</td> <td class="eb_td"> <div>'; $text .= '<input class="tbox" type="checkbox" name="eventallowdraw"'; if ($this->getField('AllowDraw') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' </div> </td> </tr> '; //<!-- Points --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L28 . '</td> <td class="eb_td"> <table class="table_left"> <tr> <td>' . EB_EVENTM_L29 . '</td> <td>' . EB_EVENTM_L30 . '</td> <td>' . EB_EVENTM_L31 . '</td> </tr> <tr> <td> <div><input class="tbox" type="text" name="eventpointsperwin" value="' . $this->getField('PointsPerWin') . '"/></div> </td> <td> <div><input class="tbox" type="text" name="eventpointsperdraw" value="' . $this->getField('PointsPerDraw') . '"/></div> </td> <td> <div><input class="tbox" type="text" name="eventpointsperloss" value="' . $this->getField('PointsPerLoss') . '"/></div> </td> </tr> </table> </td> </tr> '; break; } } if ($create == false) { //<!-- Allow Forfeits --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L127 . '</td> <td class="eb_td"> <div>'; $text .= '<input class="tbox" type="checkbox" name="eventallowforfeit"'; if ($this->getField('AllowForfeit') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' ' . EB_EVENTM_L128; $text .= '</div>'; switch ($competition_type) { case "Ladder": $text .= '<div>'; $text .= '<input class="tbox" type="checkbox" name="eventForfeitWinLossUpdate"'; if ($this->getField('ForfeitWinLossUpdate') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= EB_EVENTM_L129; $text .= '</div>'; $text .= ' <div> <table class="table_left"> <tr> <td>' . EB_EVENTM_L130 . '</td> <td>' . EB_EVENTM_L131 . '</td> </tr> <tr> <td> <div><input class="tbox" type="text" name="eventforfeitwinpoints" value="' . $this->getField('ForfeitWinPoints') . '"/></div> </td> <td> <div><input class="tbox" type="text" name="eventforfeitlosspoints" value="' . $this->getField('ForfeitLossPoints') . '"/></div> </td> </tr> </table> </div> '; break; } $text .= ' </td> </tr> '; //<!-- Maps --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L125 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="text" name="eventmaxmapspermatch" size="2" value="' . $this->getField('MaxMapsPerMatch') . '"/>'; $text .= ' </div> </td> </tr> '; //<!-- Gold --> if (is_gold_system_active() && check_class($pref['eb_gold_userclass'])) { $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L175 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="text" name="event_gold_entry_fee" size="4" value="' . $this->getField('GoldEntryFee') . '"/>'; $text .= ' </div> </td> </tr> '; $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L176 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="text" name="event_gold_winning_event" size="4" value="' . $this->getField('GoldWinningEvent') . '"/>'; $text .= ' </div> </td> </tr> '; } } //<!-- Start Date --> if ($this->getField('StartDateTime') != 0) { $startdatetime_local = $this->getField('StartDateTime') + TIMEOFFSET; $date_start = date("m/d/Y h:i A", $startdatetime_local); } else { $date_start = ""; } $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L32 . '<span class="required">*</span></td> <td class="eb_td"> <table class="table_left"> <tr> <td> <div><input class="eb_button" type="button" value="' . EB_EVENTM_L34 . '" onclick="clearStartDate(this.form);"/></div> </td> <td> <div><input class="tbox timepicker required" type="text" name="startdate" id="f_date_start" value="' . $date_start . '" readonly="readonly" /></div> </td> </tr> </table> </td> </tr> '; //<!-- End Date --> if ($this->getField('EndDateTime') != 0) { $enddatetime_local = $this->getField('EndDateTime') + TIMEOFFSET; $date_end = date("m/d/Y h:i A", $enddatetime_local); } else { $date_end = ""; } $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L35 . '</td> <td class="eb_td"> <table class="table_left"> <tr> <td> <div><input class="eb_button" type="button" value="' . EB_EVENTM_L34 . '" onclick="clearEndDate(this.form);"/></div> </td> <td> <div><input class="tbox timepicker" type="text" name="enddate" id="f_date_end" value="' . $date_end . '" readonly="readonly" /></div> </td> </tr> </table> </td> </tr> '; //<!-- Checkin Duration --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L169 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="text" name="checkin_duration" size="5" value="' . $this->getField('CheckinDuration') . '"/>'; $text .= ' </div> </td> </tr> '; //<!-- Signups Enable --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L177 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="checkbox" name="eventsignupsenable"'; if ($this->getField('SignupsEnable') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' </div> </td> </tr>'; //<!-- Allow Late Signups --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L178 . '</td> <td class="eb_td"> <div> '; $text .= '<input class="tbox" type="checkbox" name="eventallowlatesignups"'; if ($this->getField('AllowLateSignups') == true) { $text .= ' checked="checked"/>'; } else { $text .= '/>'; } $text .= ' </div> </td> </tr>'; if ($create == false) { switch ($competition_type) { case "Tournament": //<!-- Map Pool --> if ($this->getID() != 0) { $mapPool = explode(",", $this->getField('MapPool')); $nbrMapsInPool = count($mapPool); $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L147 . '</td> <td class="eb_td">'; $text .= '<table class="table_left">'; foreach ($mapPool as $key => $map) { if ($map != '') { $mapID = $map; $q_Maps = "SELECT " . TBL_MAPS . ".*" . " FROM " . TBL_MAPS . " WHERE (" . TBL_MAPS . ".MapID = '{$mapID}')"; $result_Maps = $sql->db_Query($q_Maps); $mapName = mysql_result($result_Maps, 0, TBL_MAPS . ".Name"); $text .= '<tr>'; $text .= '<td>' . $mapName . '</td>'; $text .= '<td>'; $text .= '<div>'; $text .= ebImageTextButton('eventdeletemap', 'delete.png', EB_EVENTM_L150, 'negative jq-button', '', '', 'value="' . $key . '"'); $text .= '</div>'; $text .= '</td>'; $text .= '</tr>'; } else { $text .= '<tr>'; $text .= '<td><div>'; $text .= EB_EVENTM_L148; $text .= '</div></td>'; $text .= '</tr>'; } } $text .= '</table>'; // List of all Maps $q_Maps = "SELECT " . TBL_MAPS . ".*" . " FROM " . TBL_MAPS . " WHERE (" . TBL_MAPS . ".Game = '" . $this->getField('Game') . "')"; $result_Maps = $sql->db_Query($q_Maps); $numMaps = mysql_numrows($result_Maps); if ($numMaps > $nbrMapsInPool) { $text .= ' <table class="table_left"> <tr>'; $text .= '<td><select class="tbox" name="map">'; for ($map = 0; $map < $numMaps; $map++) { $mID = mysql_result($result_Maps, $map, TBL_MAPS . ".MapID"); $mImage = mysql_result($result_Maps, $map, TBL_MAPS . ".Image"); $mName = mysql_result($result_Maps, $map, TBL_MAPS . ".Name"); $mDescrition = mysql_result($result_Maps, $map, TBL_MAPS . ".Description"); $isMapInMapPool = false; foreach ($mapPool as $poolmap) { if ($mID == $poolmap) { $isMapInMapPool = true; } } if ($isMapInMapPool == false) { $text .= '<option value="' . $mID . '"'; $text .= '>' . $mName . '</option>'; } } $text .= '</select></td>'; $text .= ' <td> <div> ' . ebImageTextButton('eventaddmap', 'add.png', EB_EVENTM_L149) . ' </div> </td> </tr> </table> '; } $text .= '</td></tr>'; } break; } } //<!-- Description --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L36 . '</td> <td class="eb_td"> '; $text .= '<textarea class="tbox" id="eventdescription" name="eventdescription" cols="70" ' . $insertjs . '>' . $this->getField('Description') . '</textarea>'; if (!e_WYSIWYG) { $text .= '<br />' . display_help("helpb", 1); } $text .= ' </td> </tr>'; //<!-- Rules --> $text .= ' <tr> <td class="eb_td eb_tdc1 eb_w40">' . EB_EVENTM_L38 . '</td> <td class="eb_td"> '; $text .= '<textarea class="tbox" id="eventrules" name="eventrules" cols="70" ' . $insertjs . '>' . $this->getField('Rules') . '</textarea>'; if (!e_WYSIWYG) { $text .= '<br />' . display_help("helpb", 1); } $text .= ' </td> </tr> </tbody> </table> '; //<!-- Save Button --> $text .= ' <table><tbody><tr><td> <div> ' . ebImageTextButton('eventsettingssave', 'disk.png', EB_EVENTM_L37) . ' </div> </td></tr></tbody></table> </form>'; return $text; }
$enable_number_input = $row['enable_number_input']; $print_special_instr = $row['print_special_instr']; $email_info_level = $row['email_info_level']; $email_additional_text = $row['email_additional_text']; $monitor_clean_shop_days = $row['monitor_clean_shop_days']; $monitor_clean_check_days = $row['monitor_clean_check_days']; $num_main_category_columns = $row['num_main_category_columns']; $main_categories_per_page = $row['main_categories_per_page']; $paypal_primary_email = $row['paypal_primary_email']; // PayPal Primary e-mail address } // Start form frame $text .= "\n<form name='general_preferences' method='POST' action='" . e_SELF . "'>\n<!-- <fieldset>\n\t<legend>\n\t\t" . EASYSHOP_GENPREF_01 . "\n\t</legend>-->"; // Preferences consists of five parts: Shop info, Settings, PayPal info, IPN Monitor settings, Presentation Settings // 1. Shop Contact Info $text1 .= "\n\t<table border='0' class='tborder' cellspacing='15'>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_02 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='25' type='text' name='store_name' value='{$store_name}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_03 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='35' type='text' name='store_address_1' value='{$store_address_1}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_04 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='35' type='text' name='store_address_2' value='{$store_address_2}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_05 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='25' type='text' name='store_city' value='{$store_city}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_06 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='2' maxlength='2' type='text' name='store_state' value='{$store_state}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_07 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='12' maxlength='10' type='text' name='store_zip' value='{$store_zip}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_08 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='3' maxlength='3' type='text' name='store_country' value='{$store_country}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_09 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='25' type='text' name='support_email' value='{$support_email}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px' valign='top'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_10 . "\n\t\t\t\t</span>\n\t\t\t\t<br />\n\t\t\t\t" . EASYSHOP_GENPREF_11 . "\n\t\t\t\t\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='store_welcome_message' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>{$store_welcome_message}</textarea><br />" . display_help('helpa') . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_12 . "\n\t\t\t\t</span>\n\t\t\t\t<br />\n\t\t\t\t" . EASYSHOP_GENPREF_13 . "\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px' valign='top'>\n\t\t\t\t<input class='tbox' size='35' type='text' name='store_image_path' value='{$store_image_path}' />\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n<!-- </fieldset> -->\n<br />"; // 2. Settings $text2 .= "\n<!-- <fieldset>\n <legend>\n " . EASYSHOP_GENPREF_44 . "\n </legend> -->\n\t<table border='0' class='tborder' cellspacing='15'>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_45 . "\n\t\t\t\t</span>\n\t\t\t\t<br />\n\t\t\t\t" . EASYSHOP_GENPREF_46 . "<br />\n\t\t\t\t" . EASYSHOP_GENPREF_47 . "\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<select class='tbox' name='set_currency_behind'>\n\t\t\t\t<option value='0' "; if ($set_currency_behind == '0' or $set_currency_behind == '') { $text2 .= "selected='selected'"; } $text2 .= ">" . EASYSHOP_GENPREF_48 . "</option>\n\t\t\t\t<option value='1' "; if ($set_currency_behind == '1') { $text2 .= "selected='selected'"; } $text2 .= ">" . EASYSHOP_GENPREF_49 . "</option>\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_50 . "\n\t\t\t\t</span>\n\t\t\t\t<br />\n\t\t\t\t" . EASYSHOP_GENPREF_51 . "<br />\n\t\t\t\t" . EASYSHOP_GENPREF_52 . "\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='25' type='text' name='minimum_amount' value='{$minimum_amount}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_53 . "\n\t\t\t\t</span>\n\t\t\t\t<br />\n\t\t\t\t" . EASYSHOP_GENPREF_54 . "\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<select class='tbox' name='always_show_checkout'>\n\t\t\t\t<option value='0' "; if ($always_show_checkout == '0' or $always_show_checkout == '') { $text2 .= "selected='selected'"; } $text2 .= ">" . EASYSHOP_GENPREF_48 . "</option>\n\t\t\t\t\t<option value='1' "; if ($always_show_checkout == '1') {
} else { $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='checkbox' name='main_category_active_status[]' value='" . $row['main_category_id'] . "' />"; } // Show the number of products in the category $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</td>"; // Show the edit and delete icons $text .= "\r\n\t\t\t\t\t\t\t\t\t\t<td class='forumheader3'>\r\n\t\t\t\t\t\t\t\t\t\t\t<div style='text-align:center;'>\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . e_SELF . "?edit_main_category=1&main_category_id=" . intval($row['main_category_id']) . "' alt='" . EASYSHOP_MCAT_16 . "'>" . ADMIN_EDIT_ICON . "</a>\r\n "; // Show delete icon conditionally (only when there are no products in the category) if ($prod_cat_count == 0) { $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t<a href='" . e_SELF . "?delete_main_category=1&main_category_id=" . intval($row['main_category_id']) . "' alt='" . EASYSHOP_MCAT_17 . "'>" . ADMIN_DELETE_ICON . "</a>"; } $text .= "\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t</tr>"; } $text .= "\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<div style='text-align:center;'>\r\n\t\t\t\t\t\t\t<input type='hidden' name='change_main_order' value='1'>\r\n\t\t\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_MCAT_13 . "'>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<br />"; if ($no_active_categories == 1) { $text .= "<img src='" . e_IMAGE . "admin_images/docs_16.png' title='' alt='' /> " . EASYSHOP_MCAT_20; } } $text .= "\r\n\t\t\t\t</fieldset>\r\n\t\t</div>\r\n\t</form>\r\n\t<br />"; // Create a new category $text .= "\r\n\t<form name='good' method='POST' action='" . e_SELF . "'>\r\n\t\t<div style='text-align:center; width:80%'>\r\n\t\t\t<fieldset>\r\n\t\t\t\t<legend>\r\n\t\t\t\t\t" . EASYSHOP_MCAT_03 . "\r\n\t\t\t\t</legend>\r\n\t\t\t\t<table border='0' cellspacing='15' width='100%'>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<b>" . EASYSHOP_MCAT_04 . "</b>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input class='tbox' size='25' type='text' name='main_category_name'>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td valign='top'>\r\n\t\t\t\t\t\t\t<b>" . EASYSHOP_MCAT_05 . "</b>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<textarea class='tbox' cols='50' rows='7' name='main_category_description' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea><br />" . display_help('helpb') . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td valign='top'>\r\n\t\t\t\t\t\t\t<b>" . EASYSHOP_MCAT_06 . "</b>\r\n\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t" . EASYSHOP_MCAT_07 . "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td valign='top'>\r\n\t\t\t\t\t\t\t<input type='text' class='tbox' id='main_category_image' name='main_category_image' value='" . $main_category_image . "' /> " . EASYSHOP_MCAT_08 . "<br />"; // Show icons with width 16 of the array of images and put name in variable $main_category_image foreach ($image_array as $icon) { $text .= "<a href=\"javascript:insertext('" . $icon['fname'] . "','main_category_image','catimg')\"><img src='" . $icon['path'] . $icon['fname'] . "' style='border:0' alt='' width='" . $icon_width . "' /></a> "; } $text .= "\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t <td>\r\n\t\t\t\t\t\t<b>" . EASYSHOP_MCAT_15 . "</b>\r\n\t\t\t\t\t </td>\r\n\t\t\t\t\t <td>\r\n\t\t\t\t\t\t<input type='checkbox' name='main_category_active_status' value='1' />\r\n\t\t\t\t\t </td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t\t<div style='text-align:center;'>\r\n\t\t\t\t\t<input type='hidden' name='create_main_category' value='1' />\r\n\t\t\t\t\t<input class='button' type='submit' value='" . EASYSHOP_MCAT_09 . "' />\r\n\t\t\t\t</div>\r\n\t\t\t\t<br />\r\n\t\t\t</fieldset>\r\n\t\t</div>\r\n\t</form>"; // Render the value of $text in a table. $title = EASYSHOP_MCAT_00; $ns->tablerender($title, $text); } require_once e_ADMIN . 'footer.php';
function sc_signature_help($parm) { $pref = e107::getPref(); if (!check_class(varset($pref['signature_access'], 0))) { return; } return display_help("", 2); }
} } } } // If no host define on command line, try to get it from environment if (!$host && isset($_ENV['CODENDI_WSDL'])) { $host = $_ENV['CODENDI_WSDL']; } if ($host) { $soap->setWSDLString($host); } $LOG = new Log(); $modules =& new CLI_ModuleFactory(CODENDI_CLI_DIR . "modules/"); if ($display_help || !$function_index) { // No function was specified. Show the help. display_help($modules, $soap); exit(0); } $LOG->setLevel($log_level); // Get the name of the module or the function to execute $name = trim($argv[$function_index]); $params = array_slice($argv, $function_index); // Now, check if the name corresponds to a module. if (!$modules->exist($name)) { $name = 'default'; } else { array_shift($params); //consume the module name } $module =& $modules->getModule($name); if (!$module) {
function show_rules() { global $sql, $pref, $ns, $tp; $sql->db_Select("wmessage"); list($null) = $sql->db_Fetch(); list($null) = $sql->db_Fetch(); list($null) = $sql->db_Fetch(); list($id, $guestrules, $wm_active4) = $sql->db_Fetch(); list($id, $memberrules, $wm_active5) = $sql->db_Fetch(); list($id, $adminrules, $wm_active6) = $sql->db_Fetch(); if ($sql->db_Select('generic', '*', "gen_type='forum_rules_guest'")) { $guest_rules = $sql->db_Fetch(); } if ($sql->db_Select('generic', '*', "gen_type='forum_rules_member'")) { $member_rules = $sql->db_Fetch(); } if ($sql->db_Select('generic', '*', "gen_type='forum_rules_admin'")) { $admin_rules = $sql->db_Fetch(); } $guesttext = $tp->toFORM($guest_rules['gen_chardata']); $membertext = $tp->toFORM($member_rules['gen_chardata']); $admintext = $tp->toFORM($admin_rules['gen_chardata']); $text = "\n\t\t\t<div style='text-align:center'>\n\t\t\t<form method='post' action='" . e_SELF . "?rules' id='wmform'>\n\t\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t\t<tr>"; $text .= "\n\n\t\t\t<td style='width:20%' class='forumheader3'>" . WMGLAN_1 . ": <br />\n\t\t\t" . WMGLAN_6 . ":"; if ($guest_rules['gen_intdata']) { $text .= "<input type='checkbox' name='guest_active' value='1' checked='checked' />"; } else { $text .= "<input type='checkbox' name='guest_active' value='1' />"; } $text .= "</td>\n\t\t\t<td style='width:60%' class='forumheader3'>\n\t\t\t<textarea class='tbox' name='guestrules' cols='70' rows='10'>{$guesttext}</textarea>\n\t\t\t<br />\n\t\t\t<input class='helpbox' type='text' name='helpguest' size='100' />\n\t\t\t<br />\n\t\t\t" . display_help('helpb', 1, 'addtext1', 'help1') . "\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t<td style='width:20%' class='forumheader3'>" . WMGLAN_2 . ": <br />\n\t\t\t" . WMGLAN_6 . ":"; if ($member_rules['gen_intdata']) { $text .= "<input type='checkbox' name='member_active' value='1' checked='checked' />"; } else { $text .= "<input type='checkbox' name='member_active' value='1' />"; } $text .= "</td>\n\t\t\t<td style='width:60%' class='forumheader3'>\n\t\t\t<textarea class='tbox' name='memberrules' cols='70' rows='10'>{$membertext}</textarea>\n\t\t\t<br />\n\t\t\t<input class='helpbox' type='text' name='helpmember' size='100' />\n\t\t\t<br />\n\t\t\t" . display_help('helpb', 1, 'addtext2', 'help2') . "\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t<td style='width:20%' class='forumheader3'>" . WMGLAN_3 . ": <br />\n\t\t\t" . WMGLAN_6 . ": "; if ($admin_rules['gen_intdata']) { $text .= "<input type='checkbox' name='admin_active' value='1' checked='checked' />"; } else { $text .= "<input type='checkbox' name='admin_active' value='1' />"; } $text .= "</td>\n\t\t\t<td style='width:60%' class='forumheader3'>\n\t\t\t<textarea class='tbox' name='adminrules' cols='70' rows='10'>{$admintext}</textarea>\n\t\t\t<br />\n\t\t\t<input class='helpbox' type='text' name='helpadmin' size='100' />\n\t\t\t<br />\n\t\t\t" . display_help('helpb', 1, 'addtext3', 'help3') . "\n\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr style='vertical-align:top'>\n\t\t\t<td class='forumheader'> </td>\n\t\t\t<td style='width:60%' class='forumheader'>\n\t\t\t<input class='button' type='submit' name='frsubmit' value='" . WMGLAN_4 . "' />\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t</div>"; $ns->tablerender(WMGLAN_5, $text); echo "\n\t\t\t<script type=\"text/javascript\">\n\t\t\tfunction addtext1(sc){\n\t\t\t\tdocument.getElementById('wmform').guestrules.value += sc;\n\t\t\t}\n\t\t\tfunction addtext2(sc){\n\t\t\t\tdocument.getElementById('wmform').memberrules.value += sc;\n\t\t\t}\n\t\t\tfunction addtext3(sc){\n\t\t\t\tdocument.getElementById('wmform').adminrules.value += sc;\n\t\t\t}\n\t\t\tfunction help1(help){\n\t\t\t\tdocument.getElementById('wmform').helpguest.value = help;\n\t\t\t}\n\t\t\tfunction help2(help){\n\t\t\t\tdocument.getElementById('wmform').helpmember.value = help;\n\t\t\t}\n\t\t\tfunction help3(help){\n\t\t\t\tdocument.getElementById('wmform').helpadmin.value = help;\n\t\t\t}\n\t\t\t</script>\n\t\t\t"; }
foreach ($parms as $parameter) { @(list($arg, $value) = @explode("=", $parameter)); switch ($arg) { case "--execute": $execute = TRUE; break; case "-h": case "-v": case "-V": case "--version": case "--help": display_help(); exit; default: print "ERROR: Invalid Parameter " . $parameter . "\n\n"; display_help(); exit; } } if ($execute) { echo "NOTE: Repairing All Duplicated Templates\n"; } else { echo "NOTE: Performing Check of Templates\n"; } /* repair data templates first */ if ($execute) { echo "NOTE: Repairing Data Templates\n"; } else { echo "NOTE: Performing Check of Data Templates\n"; } $damaged_template_ids = db_fetch_assoc("SELECT DISTINCT data_template_id FROM data_template_rrd WHERE hash='' AND local_data_id=0");
while ($skill_list_info = $skill_list->FetchRow()) { $rc = $i % 2; $i++; echo "" . "<FORM METHOD=POST ACTION=helper.php>" . "<TR CLASS=\"row_color{$rc}\">" . "<TD WIDTH=50></TD>" . "<TD VALIGN=TOP WIDTH=80>"; display_button("Edit", "", "skill", $skill_list_info['abbr'], $skill_list_info['long_name']); echo "</TD>" . "<TD VALIGN=TOP>" . $skill_list_info['long_name'] . " </TD>" . "</TR>" . "</FORM>"; } $skill_list->MoveFirst(); if (!$skill_list->EOF) { echo "</TABLE></TD></TR></TABLE><BR>"; } } } if ($resources != "" || $type == "resource") { if ($resources != "") { display_help($resources, "Resources", $r_exclusions); } elseif (isset($query) && $type == "resource") { echo "<FORM METHOD=POST ACTION=helper.php>"; echo "<TABLE BORDER=1 WIDTH=\"100%\" BGCOLOR=\"{$color_line2}\">" . "<TR>" . "<TD>"; display_button("Edit", $id, $type, $value, $htitle); echo " <B>{$htitle}</b> ({$type})" . "<TR>" . "<TD>" . "<BR>There is no help available on this subject<P>" . "</TD>" . "</TR>" . "</TABLE>" . "</FORM>"; } } /* if ($resources <> "" || $type=="resource") { if ($resources<>"") { display_help($resources, "Resources", $r_exclusions); }