public static function getHtmlSelect($selected = 0, $name = 'car_gearbox') { $arValues = CarGearboxTable::getList(array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC'))); if ($selected > 0) { return SelectBox($name, $arValues, '-- Выбрать --', $selected); } else { return SelectBox($name, $arValues, '-- Выбрать --'); } }
public static function showSelectRepairList($carID, $strBoxName, $strDetText = 'Не выбрано', $strSelectedVal = "null", $field1 = "class=\"repairlistselect\"") { $arRes = self::getRepairList($carID); if ($arRes) { $arValue = array(); foreach ($arRes as $ar_res) { $arValue[] = array('NAME' => $ar_res['DATE'] . ' ' . $ar_res['NAME'], 'VALUE' => $ar_res['ID']); } return SelectBox($strBoxName, $arValue, $strDetText, $strSelectedVal, $field1); } }
public static function showSelectPoints($strBoxName = 'point', $strSelectedVal = 'null', $field1 = 'class="typeselect"', $pointType = null) { if ($arPoints = static::getPointsList($pointType)) { $arValues = array(); foreach ($arPoints as $arPoint) { $arValues[] = array('NAME' => '[' . mb_substr(static::getPointTypeCodeByID($arPoint['POINT_TYPES_ID']), 0, 4, 'utf-8') . '] (' . $arPoint['ID'] . ') ' . $arPoint['NAME'], 'VALUE' => $arPoint['ID']); } return SelectBox($strBoxName, $arValues, '--- Выбрать ---', $strSelectedVal, $field1); } else { return '[Нет путевых точек]'; } }
public static function getHtmlSelect($brand = null, $selected = 0, $name = 'car_model') { $arGetList = array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC')); if (!is_null($brand)) { $arGetList['filter']['BRANDS_ID'] = intval($brand); } $arValues = CarModelTable::getList($arGetList); if ($selected > 0) { return SelectBox($name, $arValues, '-- Выбрать --', $selected); } else { return SelectBox($name, $arValues, '-- Выбрать --'); } }
?> </textarea><?php } ?> </td> </tr> <?php } ?> <tr> <td valign="top"><?php echo GetMessage("EXTRANET_USER_GROUP"); ?> </td> <td valign="middle"><?php echo SelectBox("EXTRANET_USER_GROUP_ID", CGroup::GetDropDownList("and ACTIVE='Y' and ID <> 2"), GetMessage("MAIN_NO"), htmlspecialcharsbx($EXTRANET_USER_GROUP_ID)); ?> </td> </tr> <?php $tabControl->Buttons(); ?> <input type="submit" name="Update" value="<?php echo GetMessage("EXTRANET_SAVE"); ?> "> <input type="hidden" name="Update" value="Y"> <input type="reset" name="reset" value="<?php echo GetMessage("EXTRANET_RESET"); ?> ">
function SelectBoxBool($strBoxName, $strSelectedVal = "", $strYes = '', $strNo = '', $field1 = "class=\"typeselect\"") { if ($strYes == '') { $strYes = 'Да'; } if ($strNo == '') { $strNo = 'Нет'; } if ($strSelectedVal == "") { $strSelectedVal = 0; } $arValues = array(array('VALUE' => 0, 'NAME' => $strNo), array('VALUE' => 1, 'NAME' => $strYes)); return SelectBox($strBoxName, $arValues, '', $strSelectedVal, $field1); }
public static function showSelectReasonReplacementList($strBoxName, $strDetText = '--- Выбрать ---', $strSelectedVal = "null", $field1 = "class=\"reasonreplacementselect\"") { $arRes = ReasonReplacementTable::getList(array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC'))); return SelectBox($strBoxName, $arRes, $strDetText, $strSelectedVal, $field1); }
?> ][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]" style="padding-left:16px;display:<?php if ($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"] === "Y") { echo 'block'; } else { echo 'none'; } ?> " > <?php echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_POSITION"); ?> : <?php echo SelectBox("FIELDS[" . $FIELD_ID . "][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]", IBlockGetWatermarkPositions(), "", $arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_POSITION"]); ?> </div> </div> <?php break; case "SECTION_CODE": ?> <div class="adm-list"> <div class="adm-list-item"> <div class="adm-list-control"> <input type="checkbox" value="Y" id="FIELDS[<?php echo $FIELD_ID;
$sections .= '</select></div>'; $arActions["section"] = GetMessage("IBLIST_A_MOVE_TO_SECTION"); $arActions["add_section"] = GetMessage("IBLIST_A_ADD_TO_SECTION"); $arActions["section_chooser"] = array("type" => "html", "value" => $sections); $arParams["select_onchange"] = "BX('section_to_move').style.display = (this.value == 'section' || this.value == 'add_section'? 'block':'none');"; } if($bWorkFlow) { $arActions["unlock"] = GetMessage("IBLIST_A_UNLOCK_ACTION"); $arActions["lock"] = GetMessage("IBLIST_A_LOCK_ACTION"); $statuses = '<div id="wf_status_id" style="display:none">'.SelectBox("wf_status_id", CWorkflowStatus::GetDropDownList("N", "desc")).'</div>'; $arActions["wf_status"] = GetMessage("IBLIST_A_WF_STATUS_CHANGE"); $arActions["wf_status_chooser"] = array("type" => "html", "value" => $statuses); $arParams["select_onchange"] .= "BX('wf_status_id').style.display = (this.value == 'wf_status'? 'block':'none');"; } elseif($bBizproc) { $arActions["unlock"] = GetMessage("IBLIST_A_UNLOCK_ACTION"); } $lAdmin->AddGroupActionTable($arActions, $arParams); } $sLastFolder = '';
<? endif; ?></td> </tr> <?endif; $tabControl->EndCustomField("WORKFLOW_PARAMS", ""); if ($WF=="Y" || $view=="Y"): $tabControl->BeginCustomField("WF_STATUS_ID", GetMessage("IBLOCK_FIELD_STATUS").":"); ?> <tr id="tr_WF_STATUS_ID"> <td><?echo $tabControl->GetCustomLabelHTML()?></td> <td> <?if($ID > 0 && !$bCopy):?> <?echo SelectBox("WF_STATUS_ID", CWorkflowStatus::GetDropDownList("N", "desc"), "", $str_WF_STATUS_ID);?> <?else:?> <?echo SelectBox("WF_STATUS_ID", CWorkflowStatus::GetDropDownList("N", "desc"), "", "");?> <?endif?> </td> </tr> <? if($ID > 0 && !$bCopy) $hidden = '<input type="hidden" name="WF_STATUS_ID" value="'.$str_WF_STATUS_ID.'">'; else { $rsStatus = CWorkflowStatus::GetDropDownList("N", "desc"); $arDefaultStatus = $rsStatus->Fetch(); if($arDefaultStatus) $def_WF_STATUS_ID = intval($arDefaultStatus["REFERENCE_ID"]); else $def_WF_STATUS_ID = ""; $hidden = '<input type="hidden" name="WF_STATUS_ID" value="'.$def_WF_STATUS_ID.'">';
<?php } ?> <tr> <td width="40%"><?php echo GetMessage("FLOW_STATUS"); ?> </td> <td width="60%"><?php if ($str_STATUS_ID != 1 || $message) { if ($ID <= 0) { $z = CWorkflowStatus::GetDropDownList("N", "desc", array("!ID" => 1)); $zr = $z->Fetch(); $str_STATUS_ID = $zr["REFERENCE_ID"]; } echo SelectBox("STATUS_ID", CWorkflowStatus::GetDropDownList(), "", $str_STATUS_ID); } else { ?> [<a href="workflow_status_edit.php?lang=<?php echo LANG; ?> &ID=<?php echo $str_STATUS_ID; ?> "><?php echo $str_STATUS_ID; ?> </a>] <?php echo $str_STATUS_TITLE; } ?>
echo GetMessage("IBLOCK_VALUE_ANY"); ?> </option><?php while ($arr = $res->Fetch()) { echo "<option value='" . $arr["ID"] . "'" . ($find_modified_by == $arr["ID"] ? " selected" : "") . ">(" . htmlspecialcharsbx($arr["LOGIN"] . ") " . $arr["NAME"] . " " . $arr["LAST_NAME"]) . "</option>"; } ?> </select> </td> </tr> <tr> <td><?php echo GetMessage("IBLOCK_FIELD_STATUS"); ?> :</td> <td><input type="text" name="find_status_id" value="<?php echo htmlspecialcharsbx($find_status_id); ?> " size="3"> <?php echo SelectBox("find_status", CWorkflowStatus::GetDropDownList("Y"), GetMessage("IBLOCK_ALL"), htmlspecialcharsbx($find_status)); ?> </td> </tr> <?php $oFilter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage() . "?type=" . htmlspecialcharsbx($type) . "&IBLOCK_ID=" . intval($IBLOCK_ID) . "&ELEMENT_ID=" . $ELEMENT_ID, "form" => "find_form")); $oFilter->End(); ?> </form> <?php $lAdmin->DisplayList(); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
function dmsguestbook_meta_description_option_page() { $dmsguestbook_options = isset($dmsguestbook_options) ? $dmsguestbook_options : ''; $num_rows_option = isset($num_rows_option) ? $num_rows_option : ''; $_SESSION['missing_options'] = isset($_SESSION['missing_options']) ? $_SESSION['missing_options'] : ''; $_SESSION['fixed_update'] = isset($_SESSION['fixed_update']) ? $_SESSION['fixed_update'] : ''; $_REQUEST['dbs'] = isset($_REQUEST['dbs']) ? $_REQUEST['dbs'] : ''; $_REQUEST['basic'] = isset($_REQUEST['basic']) ? $_REQUEST['basic'] : ''; $_REQUEST['advanced'] = isset($_REQUEST['advanced']) ? $_REQUEST['advanced'] : ''; $_REQUEST['action'] = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; $location = isset($location) ? $location : ''; $fixed_update = isset($fixed_update) ? $fixed_update : ''; $url = get_bloginfo('wpurl'); /* initialize */ $options = create_options(); $options_name = default_options_array(); /* global var for DMSGuestbook and option database */ global $wpdb; $table_name = $wpdb->prefix . "dmsguestbook"; $table_option = $wpdb->prefix . "options"; $table_posts = $wpdb->prefix . "posts"; update_db_fields(); ?> <!-- header --> <div class="wrap"> <h2>DMSGuestbook Option</h2> <ul> <li>1.) <?php echo __("Create a page where you want to display the DMSGuestbook.", "dmsguestbook"); ?> </li> <li>2.) <?php echo __("Save the page and assign it under \"Guestbook settings\" -> \"Basic\".", "dmsguestbook"); ?> </li> <li>3.) <?php echo __("Customize the guestbook to your desire!", "dmsguestbook"); ?> </li> </ul> <br /> <?php /* if option(s) are missing */ if (strlen($_SESSION['missing_options']) > 0) { $_SESSION['fixed_update'] = get_option("DMSGuestbook_options") . $_SESSION["missing_options_fixed_update"]; echo "<b style='width:100%;color:#cc0000;'>" . __("One or more options are missing.", "dmsguestbook") . "</b><br />"; echo "<form name='form0' method='post' action='{$location}'>\n \t\t\t<input name='action' value='fix_update' type='hidden' />\n \t\t\t<input name='fixed' value='{$fixed_update}' type='hidden' />\n \t\t\t<input class='button-secondary action' style='font-weight:bold; margin:10px 0px; width:250px;' type='submit' value='" . __("Update options database", "dmsguestbook") . "' />\n\t\t\t</form>"; missing_options(); unset($_SESSION["missing_options"]); } /* save the fixed options */ if ($_REQUEST['action'] == "fix_update") { $restore = str_replace("\r\n", "[br]", $_SESSION['fixed_update']); update_option("DMSGuestbook_options", $restore); message("<b>" . __("Update database", "dmsguestbook") . "...</b>", 300, 800); echo "<meta http-equiv='refresh' content='0; URL={$location}'>"; } /* user can create new DMSGuestbook database if these failed during the installation. */ if ($_REQUEST['action'] == "createnew") { $sql = $wpdb->query("CREATE TABLE " . $table_name . " (\n\t \tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t \tname varchar(50) DEFAULT '' NOT NULL,\n\t \temail varchar(50) DEFAULT '' NOT NULL,\n\t \tgravatar varchar(32) DEFAULT '' NOT NULL,\n\t \turl varchar(50) DEFAULT '' NOT NULL,\n\t \tdate int(10) NOT NULL,\n\t \tip varchar(15) DEFAULT '' NOT NULL,\n\t \tmessage longtext NOT NULL,\n\t \tguestbook int(2) DEFAULT '0' NOT NULL,\n\t \tspam int(1) DEFAULT '0' NOT NULL,\n\t \tadditional varchar(50) NOT NULL,\n\t \tflag int(2) NOT NULL,\n\t \tUNIQUE KEY id (id)\n\t \t)" . mysql_real_escape_string($_REQUEST['collate']) . ""); $abspath = str_replace("\\", "/", ABSPATH); require_once $abspath . 'wp-admin/upgrade-functions.php'; dbDelta($sql); message("<b>{$table_name} " . __("was created", "dmsguestbook") . "...</b>", 300, 800); } /* user can delete DMSGuestbook database after the confirmation */ if ($_REQUEST['action'] == "delete" && $_REQUEST['delete'] == "yes, i am sure") { $wpdb->query('DROP TABLE IF EXISTS ' . $table_name); $abspath = str_replace("\\", "/", ABSPATH); require_once $abspath . 'wp-admin/upgrade-functions.php'; message("<b>{$table_name} " . __("was deleted", "dmsguestbook") . "...</b>", 300, 800); } /* user can create DMSGuestbook option if the failed during the installation. */ if ($_REQUEST['action'] == "createoption") { initialize_option(); message("<b>" . __("DMSGuestbook options", "dmsguestbook") . "<br /></b><br />" . __("Don't forget to set the page id.", "dmsguestbook"), 260, 800); echo "<meta http-equiv='refresh' content='0; URL={$location}'>"; } /* user can delete all DMSGuestbook_ entries in DMSGuestbook option after confirmation. */ if ($_REQUEST['action'] == "deleteoption" && $_REQUEST['confirm_delete_option'] == "delete") { $wpdb->query('DELETE FROM ' . $table_option . ' WHERE option_name LIKE "DMSGuestbook_%"'); $abspath = str_replace("\\", "/", ABSPATH); require_once $abspath . 'wp-admin/upgrade-functions.php'; message("<b>" . __("All DMSGuestbook options were deleted", "dmsguestbook") . "...</b>", 300, 800); } ?> <script type="text/javascript"> //<![CDATA[ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}} //]]> </script> <script type="text/javascript" src="../wp-content/plugins/dmsguestbook/js/jquery-1.7.2.js"></script> <link rel="stylesheet" media="screen" type="text/css" href="../wp-content/plugins/dmsguestbook/js/colorpicker/css/colorpicker.css" /> <script type="text/javascript" src="../wp-content/plugins/dmsguestbook/js/colorpicker/js/colorpicker.js"></script> <link type="text/css" href="../wp-content/plugins/dmsguestbook/js/jquery-ui/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" /> <link type="text/css" href="../wp-content/plugins/dmsguestbook/js/jquery-simple-tooltip-0.9.1/style.css" rel="Stylesheet" /> <script type="text/javascript" src="../wp-content/plugins/dmsguestbook/js/jquery-ui/js/jquery-ui-1.8.5.custom.min.js"></script> <script type="text/javascript" src="../wp-content/plugins/dmsguestbook/js/jquery-simple-tooltip-0.9.1/jquery.simpletooltip-min.js"></script> <script> jQuery(document).ready(function(){ jQuery( "#dmsguestbook-menu" ).accordion({ clearStyle:true, collapsible:true, active:-1 }); jQuery("a.tooltiplink").simpletooltip({ margin: 10 }); jQuery('#bordercolor1').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color2_div').css('background-color', '#' + hex); jQuery('#bordercolor1').val(hex); } }) jQuery('#bordercolor2').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color3_div').css('background-color', '#' + hex); jQuery('#bordercolor2').val(hex); } }) jQuery('#navigationcolor').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color4_div').css('background-color', '#' + hex); jQuery('#navigationcolor').val(hex); } }) jQuery('#separatorcolor').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color1_div').css('background-color', '#' + hex); jQuery('#separatorcolor').val(hex); } }) jQuery('#fontcolor1').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color5_div').css('background-color', '#' + hex); jQuery('#fontcolor1').val(hex); } }) jQuery('#captcha_color').ColorPicker({ onChange: function (hsb, hex, rgb) { jQuery('#Color6_div').css('background-color', '#' + hex); jQuery('#captcha_color').val(hex); } }) }); </script> <?php $collaps_dashboard = "<a href='admin.php?page=dmsguestbook'>\n<img src='../wp-content/plugins/dmsguestbook/img/dashboard.png'><b>" . __("Dashboard", "dmsguestbook") . "</b></a>"; $collaps_dbs = "<a href='admin.php?page=dmsguestbook&dbs=1'>\n<img src='../wp-content/plugins/dmsguestbook/img/server.png'><b>" . __("Database settings", "dmsguestbook") . "</b></a>"; $collaps_basic = "<a href='admin.php?page=dmsguestbook&basic=1'>\n<img src='../wp-content/plugins/dmsguestbook/img/basic.png'><b>" . __("Guestbook settings", "dmsguestbook") . "</b></a>"; $collaps_advanced = "<a href='admin.php?page=dmsguestbook&advanced=1'>\n<img src='../wp-content/plugins/dmsguestbook/img/language.png'><b>" . __("Language settings", "dmsguestbook") . "</b></a>"; ?> <!-- table for DMSGuestbook and DMSGuestbook option environment--> <table style="width:100%;"> <tr> <td><?php echo $collaps_dashboard; ?> </td> <td><?php echo $collaps_dbs; ?> </td> <td><?php echo $collaps_basic; ?> </td> <td><?php echo $collaps_advanced; ?> </td> </tr> </table> <br /><br /><br /> <?php /* dashboard */ if ($_REQUEST['page'] == "dmsguestbook" && ($_REQUEST['dbs'] != 1 && $_REQUEST['basic'] != 1 && $_REQUEST['advanced'] != 1)) { $dashcolor = "#21759B"; function convert($convert) { if ($convert == 1) { return "Yes"; } else { return "No"; } } if (function_exists("gd_info")) { $gd_array = gd_info(); $gd_version = $gd_array["GD Version"]; $gd_freetype = convert($gd_array["FreeType Support"]); $gd_freetype_linkage = $gd_array["FreeType Linkage"]; $gd_png = convert($gd_array["PNG Support"]); } if (CheckAkismet() != "") { $akismet_notify = "Akismet: <span style='color:{$dashcolor};'>" . __("Yes", "dmsguestbook") . "</span>"; } else { $akismet_notify = "Akismet: <span style='color:{$dashcolor};'>" . __("No", "dmsguestbook") . "</span>"; } $abspath = str_replace("\\", "/", ABSPATH); $sqlversion = $wpdb->get_var("SELECT VERSION()"); $css_writable = convert(is_writable($abspath . "wp-content/plugins/dmsguestbook/dmsguestbook.css")); $ttf_readable = convert(is_readable($abspath . "wp-content/plugins/dmsguestbook/captcha/xfiles.ttf")); if (ini_get('memory_limit')) { $memory_limit = ini_get('memory_limit'); } else { $memory_limit = ""; } $result_spam = $wpdb->query("SELECT * FROM {$table_name} WHERE spam = '1'"); $result_post = $wpdb->query("SELECT * FROM {$table_name} WHERE spam = '0'"); $result_approval = $wpdb->query("SELECT * FROM {$table_name} WHERE flag = '1'"); echo "<table style='width:100%;' class='widefat comments' cellspacing='0'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='padding:5px 5px 5px 5px;width:25%;'>" . __("Dashboard", "dmsguestbook") . "</th>\n\t\t<th style='padding:0px 5px 0px 5px;width:25%;'></th>\n\t\t<th style='padding:0px 5px 0px 5px;width:50%;'></th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tr>\n\t\t\t<td style='padding:20px;'>\n\t\t\t<b style='font-size:16px;'><a href='admin.php?page=Entries'>{$result_post}</a> <span style='color:#008000;'>" . __("entries", "dmsguestbook") . "</span></b><br />\n\t\t\t<b style='font-size:16px;'><a href='admin.php?page=Entries&approval=1'>{$result_approval}</a> <span style='color:#ffa500;'>" . __("waiting for approval", "dmsguestbook") . "</span></b><br />\n\t\t\t<b style='font-size:16px;'><a href='admin.php?page=Spam'>{$result_spam}</a> <span style='color:#ff0000;'>" . __("spam", "dmsguestbook") . "</span></b><br />\n\t\t\t<div style='height:40px;'></div>\n\t\t\t<b style='font-size:14px;text-decoration:underline;'>" . __("Server Settings", "dmsguestbook") . "</b>\n\t\t\t<br />" . __("Server", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$_SERVER['SERVER_SOFTWARE']}</span><br />" . __("MYSQL Server", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$sqlversion}</span><br />" . __("Memory Limit", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$memory_limit}</span><br />\n\t\t\t<br />\n\t\t\t<b style='font-size:14px;text-decoration:underline;'>" . __("Graphic Settings", "dmsguestbook") . "</b>\n\t\t\t<br />" . __("GD Version", "dmsguestbook") . ": </b><span style='color:{$dashcolor};'>{$gd_version}</span><br />" . __("Freetype Support", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$gd_freetype}</span><br />" . __("Freetype Linkage", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$gd_freetype_linkage}</span><br />" . __("PNG Support", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$gd_png}</span><br />\n\t\t\t<br />\n\t\t\t<b style='font-size:14px;text-decoration:underline;'>" . __("Permissions", "dmsguestbook") . "</b>\n\t\t\t<br />" . __("Database settings", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role1']}</span><br />" . __("Guestbook settings", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role1']}</span><br />" . __("Language settings", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role1']}</span><br />" . __("Post settings", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role2']}</span><br />" . __("Spam settings", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role3']}</span><br />" . __("phpinfo", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$options['role1']}</span><br />\n\t\t\t</td>\n\n\t\t\t<td style='padding:20px'>\n\t\t\t<b style='font-size:14px;text-decoration:underline;'>" . __("Miscellaneous", "dmsguestbook") . "</b><br />\n\t\t\t{$akismet_notify}<br />" . __("CSS file writable", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$css_writable}</span> <span style='font-size:8px;'>1)</span><br />" . __("xfiles.ttf readable", "dmsguestbook") . ": <span style='color:{$dashcolor};'>{$ttf_readable}</span><br />\n\t\t\t<br />" . __("Captcha Image", "dmsguestbook") . ":<br /><img src='../wp-content/plugins/dmsguestbook/captcha/captcha.php' /> <span style='font-size:8px;'>2)</span><br />\n\t\t\t<br />\n\t\t\t<br />\n\t\t\t<div style='background-color:#eeeeee;padding:5px;'>\n\t\t\t<span style='font-size:8px;'>1)</span>" . __("If dmsguestbook.css exists and is writable, all CSS settings will be read from it.<br />Otherwise these settings will be loaded from the database.", "dmsguestbook") . "\n\t\t\t<br />\n\t\t\t<br />\n\t\t\t<span style='font-size:8px;'>2)</span>" . __("If you don't see the image here, check the xfiles.ttf and captcha.png permission in your captcha folder.", "dmsguestbook") . "</div>\n\t\t\t</td>\n\n\t\t\t<td style='padding:20px;'>"; echo "<b style='font-size:14px;text-decoration:underline;'>" . __("News", "dmsguestbook") . "</b><br />"; include_once ABSPATH . WPINC . '/rss.php'; unset($rss1); unset($items); $rss1 = fetch_rss('http://www.danielschurter.net/mainsite/category/DMSGuestbook/feed/'); $maxitems = 3; @($items = array_slice($rss1->items, 0, $maxitems)); echo "<ul>"; if (empty($items)) { echo "<li>" . __("No items", "dmsguestbook") . "</li>"; } else { foreach ($items as $item) { echo "<li><a href='{$item['link']}' title='{$item['title']}' target='_blank'>{$item['title']}</a> <span style='color:#666666;font-size:10px;'>" . mb_substr($item['pubdate'], 5, 12) . "</span><br />\n\t\t\t\t\t" . mb_substr($item['description'], 0, 80) . " [...]</li>"; } } echo "</ul>\n\t\t\t<br /><b style='font-size:14px;text-decoration:underline;'>" . __("Infos", "dmsguestbook") . "</b><br />\n\t\t\t<ul>\n\t\t\t\t<li><a href='http://www.danielschurter.net/mainsite/2009/03/05/dmsguestbook-faq/' target='_blank'>" . __("FAQ", "dmsguestbook") . "</a></li>\n\t\t\t\t<li><a href='http://www.danielschurter.net/mainsite/2007/07/28/dmsguestbook-10/' target='_blank'>" . __("Changelog", "dmsguestbook") . "</a></li>\n\t\t\t</ul>\n\n\t\t\t</td>\n\n\t\t</tr>\n\t</table>"; } if ($_REQUEST['dbs'] == 1) { $Role1 = CheckRole($options["role1"], 0); if (!current_user_can("level_" . $Role1) && ROLE != 0) { CheckRole($options["role1"], 1); exit; } /* dmsguestbook datatbase*/ // search prefix_dmsguestbook $result = $wpdb->query("SHOW TABLES LIKE '{$table_name}'"); if ($result > 0) { /* if prefix_dmsguestbook does exist */ $return_dmsguestbook_database = "<b style='color:#00bb00;'>" . sprintf(__("[Status OK] %s does exist.", "dmsguestbook"), $table_name) . "</b><br /><br />" . sprintf(__("Type \"yes, i am sure\" in this textfield if you want delete %s", "dmsguestbook"), $table_name) . "<br />\n \t\t\t<b>" . __("All guestbook data will be lost!", "dmsguestbook") . "</b><br />\n \t\t\t<form name='form0' method='post' action='{$location}'>\n \t\t\t<input type='text' name='delete' value='' /><br />\n \t\t\t<input name='action' value='delete' type='hidden' />\n \t\t\t<input class='button-secondary action' style='font-weight:bold; margin:10px 0px; width:250px;' type='submit' value='" . sprintf(__("delete %s", "dmsguestbook"), $table_name) . "' />\n\t\t\t</form>"; } else { /* if prefix_dmsguestbook isn't exist */ $return_dmsguestbook_database = "<b style='color:#bb0000;padding:5px;'>" . sprintf(__("%s isn't exist.", "dmsguestbook"), $table_name) . "</b><br /><br />\n\t\t\t<form name='form0' method='post' action='{$location}'>\n\t\t\t\t <select name='collate'>\n\t\t\t\t \t<option value='DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'>utf8_unicode_ci</option>\n\t\t\t\t\t<option value='DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci'>utf8_general_ci</option>\n\t\t\t\t\t<option value=''>" . __("if you use mySQL 4.0.xx or lower", "dmsguestbook") . "</option>\n\t\t\t\t</select><br />\n\t\t\t\t<input name='action' value='createnew' type='hidden' />\n\t\t\t\t<input class='button-primary action' style='font-weight:bold; margin:10px 0px; width:300px;' type='submit' value='" . __("Create", "dmsguestbook") . " {$table_name})' />\n\t\t\t</form>" . __("If you want use char like ä,ü,ö... and your mysql version is lower than 4.1, be sure the language\n\t\t\tsetting is e.g. \"de-iso-8859-1\" or similar. Check this with your mysql graphical frontenend like phpmyadmin.", "dmsguestbook") . "<br />"; } $return_dmsguestbook_database_error = "<br />" . sprintf(__("If there is something wrong with my %s table:", "dmsguestbook"), $table_name) . " <a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='../wp-content/plugins/dmsguestbook/default_sql.txt' target='_blank'>" . __("Help", "dmsguestbook") . "</a>"; /* dmsguestbook options*/ /* search all DMSGuestbook option (inform the user about the old dmsguestbook entries) */ $query_options = $wpdb->get_results("SELECT * FROM {$table_option} WHERE option_name LIKE 'DMSGuestbook_%'"); $num_rows_option = $wpdb->num_rows; /* search to DMSGuestbook_options */ $query_options1 = $wpdb->get_results("SELECT * FROM {$table_option} WHERE option_name LIKE 'DMSGuestbook_options'"); $num_rows_option1 = $wpdb->num_rows; if ($num_rows_option1 == 1) { $return_dmsguestbook_options = "<b style='color:#00bb00'>" . sprintf(__("[Status OK] \"DMSGuestbook_options\" found in %s.", "dmsguestbook"), $table_option) . "</b><br />"; } if ($num_rows_option1 == 0) { $return_dmsguestbook_options = "<b style='color:#bb0000'>" . sprintf(__("No \"DMSGuestbook_options\" found in %s.", "dmsguestbook"), $table_option) . "</b><br />"; } if ($num_rows_option >= 2) { $return_dmsguestbook_options = "<b style='color:#bb0000'>" . sprintf(__("Notice: You have some old \"DMSGuestbook_xxxx\" rows in your %s, but this have no functionality impact.", "dmsguestbook"), $table_option) . "</b>"; } $return_dmsguestbook_options .= "<form name='form0' method='post' action='{$location}'\n\t\t\t<input name='action' value='createoption' type='hidden' />\n\t\t\t<input class='button-secondary action' style='font-weight:bold; margin:10px 0px; width:400px;' type='submit' value='" . __("Create new DMSGuestbook options", "dmsguestbook") . "' />\n\t\t</form>\n\t\t<br /><br />\n\t\t<form name='form0' method='post' action='{$location}'>" . sprintf(__("Type \"delete\" to remove all DMSGuestbook option entries from the %s table.", "dmsguestbook"), $table_option) . "<br />\n\t\t\t\t<input type='text' name='confirm_delete_option' value='' /><br />\n\t\t\t\t<input name='action' value='deleteoption' type='hidden' />\n\t\t\t\t<input class='button-secondary action' style='font-weight:bold; margin:10px 0px; width:400px;' type='submit' value='" . __("Delete DMSGuestbook options from the database", "dmsguestbook") . "' />\n\t\t\t</form>\n\t<br />" . sprintf(__("If there is something wrong with my<br />DMSGuestbook_options in %s:", "dmsguestbook"), $table_option) . " <a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='../wp-content/plugins/dmsguestbook/default_options.txt' target='_blank'>" . __("Help", "dmsguestbook") . "</a>"; /* backup */ $return_dmsguestbook_options_backup = __("Copy this content to a text file in case if you need a backup.", "dmsguestbook") . "<br />\n\t\t<textarea style='width:450px; height:200px;' name='save_data'>" . get_option("DMSGuestbook_options") . "</textarea><br />\n\t\t<br />\n\t\t<br />" . __("Restore DMSGuestbook_options:<br />\n\t\tOpen your DMSGuestbook option backup text file and put the content in the textfield below.<br />\n\t\tAll data will be overwrite!", "dmsguestbook") . "\n\t\t<form action='{$location}' method='post'>\n\t\t<textarea style='width:450px; height:200px;' name='restore_data'></textarea><br />\n\t\t<input type='hidden' name='restore_options' value='1' />\n\t\t<input class='button-secondary action' style='font-weight:bold;' type='submit' value='" . __("Restore", "dmsguestbook") . "' onclick=\"return confirm('" . __("Would you really like to restore all data?", "dmsguestbook") . "');\" />\n\t\t</form>"; echo "<b style='font-size:20px;'>" . __("Database settings", "dmsguestbook") . "</b><br />"; echo "<table width='100%' border='0'>"; echo "<tr><td>"; ?> <div id="dmsguestbook-menu"> <h3 style="font-weight:bold;"><a href="#"><?php echo __("DMSGuestbook Database", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_dmsguestbook_database; ?> </li> <li><?php echo $return_dmsguestbook_database_error; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("DMSGuestbook options", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_dmsguestbook_options; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("DMSGuestbook options backup", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_dmsguestbook_options_backup; ?> <li> </ul> </p> </div> </div> <?php echo "</div>\n\t</div>"; echo "</td></tr></table>"; ?> <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script> <?php } ?> <!-- end table for DMSGuestbook and DMSGuestbook option environment --> <!-- main table with all DMSGuestbook options --> <?php $submitbutton = "<input class='button-primary action' style='font-weight:bold;margin:10px 0px; width:100px;'\n\t\ttype='submit' value='" . __("Save", "dmsguestbook") . "' name='csssave' onclick=\"document.getElementById('save')\" />"; if ($num_rows_option == $dmsguestbook_options) { if ($_REQUEST['basic'] == 1) { $Role1 = CheckRole($options["role1"], 0); if (!current_user_can("level_" . $Role1) && ROLE != 0) { CheckRole($options["role1"], 1); exit; } reset($options); while (list($key, $val) = each($options)) { if ($key == "page_id") { $query_posts = $wpdb->get_results("SELECT ID, post_title, post_status FROM {$table_posts} WHERE post_type = 'page' ORDER BY id ASC"); $num_rows_posts = $wpdb->num_rows; $part_page_id = explode(",", $options["page_id"]); $part_language = explode(",", $options["language"]); if ($options["supergb"] == "" || $options["supergb"] == 0) { $checked = "checked"; } $c = 0; $data = isset($data) ? $data : ''; $data .= "<b style='color:#bb0000;'>" . __("You have to delete the assigned guestbooks by clicking on \"Clear all\" before you can set this again. Assigned guestbooks will not be released until you press the \"Save\" button.", "dmsguestbook") . "</b>"; $data .= "<br /><br />" . __("To assign guestbook(s)", "dmsguestbook") . ":"; $data .= "<table style='width:95%;' border:0px;><tr><td>"; ### Language unset($tmp); $tmp = isset($tmp) ? $tmp : ''; $abspath = str_replace("\\", "/", ABSPATH); if ($handle = opendir($abspath . 'wp-content/plugins/dmsguestbook/language/')) { $tmp .= "<select name='langselect' id='langselect'>"; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != "README.txt" && $file != "mo") { $tmp_a[] = $file; } } sort($tmp_a); for ($x = 0; $x < count($tmp_a); $x++) { $tmp .= "<option value='{$tmp_a[$x]}'>{$tmp_a[$x]}</option>"; } $tmp .= "</select>"; closedir($handle); } ### $data .= "<table><tr>"; $data .= "<th style='font-size:9px;background-color:#cccccc;padding:2px;'>" . __("ID", "dmsguestbook") . "</th>"; $data .= "<th style='font-size:9px;background-color:#cccccc;padding:2px;'>" . __("Page", "dmsguestbook") . "</th>"; $data .= "<th style='font-size:9px;background-color:#cccccc;padding:2px;'>" . __("Page status", "dmsguestbook") . "</th>"; $data .= "<th style='font-size:9px;background-color:#cccccc;padding:2px;'>" . __("Guestbook", "dmsguestbook") . "<br /><br />" . __("Deactivate super guestbook ", "dmsguestbook") . "*<br /><input type='radio' name='supergb' value='0' {$checked}> </th>"; $data .= "<th style='font-size:9px;background-color:#cccccc;padding:2px;'>" . __("Language", "dmsguestbook") . "<br />{$tmp}</th></tr>"; foreach ($query_posts as $result) { $data .= "<tr><td style='font-size:9px;background-color:#dddddd;padding:2px;'>{$result->ID}</td><td style='font-size:9px;background-color:#eeeeee;padding:2px;'>" . $result->post_title . "</td> "; $data .= "<td style='font-size:9px;background-color:#dddddd;padding:2px;'><a href='page.php?action=edit&post={$result->ID}'>{$result->post_status}</a></td>"; for ($v = 0; $v < count($part_page_id); $v++) { unset($lang); $lang = isset($lang) ? $lang : ''; if ($result->ID == $part_page_id[$v]) { $vv = $v + 1; $set = "#" . $vv; $setnr = $vv; $disabled = "disabled"; $v = count($part_page_id); $lang = $part_language[$vv - 1]; } else { $set = __("not selected", "dmsguestbook"); $setnr = ''; $disabled = "disabled"; } } if ($setnr == $options["supergb"] && ($options["supergb"] != 0 || $options["supergb"] != "")) { $checked = "checked"; } else { $checked = 0; } $data .= "<td style='font-size:9px;background-color:#dddddd;padding:2px;'><input class='button-secondary action' style='width:70px;' id='pageid{$c}' name='pageid{$c}' type='action' value='{$set}' {$disabled} onclick=\"PageID('{$result->ID}', '{$c}')\"><br /><br />" . __("Activate this guestbook as super guestbook", "dmsguestbook") . "*<br /><input type='radio' name='supergb' value='{$setnr}' {$checked}></td>"; $data .= "<td style='font-size:9px;background-color:#dddddd;padding:2px;'><input style='width:120px;font-size:9px;background-color:#dddddd;border:1px;padding:2px;' type='text' id='language{$c}' name='language{$c}' value='{$lang}' readonly></td></tr>"; $c++; } $data .= "</table>"; $data .= "<input type='hidden' name='page_id' id='page_id' value='{$options['page_id']}'>"; $data .= "<input type='hidden' name='language' id='language' value='{$options['language']}'>"; $data .= "<input type='hidden' name='countpageid' id='countpageid' value='1'>"; $data .= "<input id='page_id_clear' name='page_id_clear' class='button-secondary action' style='width:150px;color:#bb0000;' type='action' value='" . __("Clear all", "dmsguestbook") . "' onclick=\"PageID_Clear('{$num_rows_posts}')\">"; $data .= "<span style='color:#bb0000;'><br />* " . __("Would you like to display one particular guestbook in a different languages? Select your desired guestbook and mark the radio button. After that all pages with the assigned language will be bound with the guestbook that you've selected.", "dmsguestbook") . "</span></td>"; $data .= "<script type='text/javascript'>"; $data .= "\n\t\t\t\tfunction PageID(id, c) {\n\t\t\t\tvar m = document.getElementById('countpageid').value;\n \t\t\t\tvar newpageid = document.getElementById('page_id').value;\n \t\t\t\tnewpageid = newpageid.concat(id + ',');\n \t\t\t\tdocument.getElementById('page_id').value = newpageid;\n \t\t\t\tdocument.getElementById('pageid' + c).value = '#' + m;\n \t\t\t\tdocument.getElementById('pageid' + c).disabled = true;\n\n \t\t\t\tdocument.getElementById('language' + c).value = document.getElementById('langselect').value;\n\n \t\t\t\tvar newlanguage = document.getElementById('language').value;\n \t\t\t\tnewlanguage = newlanguage.concat(document.getElementById('langselect').value + ',');\n \t\t\t\tdocument.getElementById('language').value = newlanguage;\n\n \t\t\t\tm++;\n \t\t\t\tdocument.getElementById('countpageid').value = m;\n \t\t\t\t}\n\n \t\t\t\tfunction PageID_Clear(c) {\n \t\t\t\t \tfor (var i = 0; i < c; i++) {\n \t\t\t \tdocument.getElementById('pageid' + i).disabled = false;\n \t\t\t\t \tdocument.getElementById('pageid' + i).value = '" . __("Set", "dmsguestbook") . "';\n \t\t\t\t \tdocument.getElementById('language' + i).value = '';\n \t\t\t\t \t}\n \t\t\t\tdocument.getElementById('page_id').value = '';\n \t\t\t\tdocument.getElementById('language').value = '';\n \t\t\t\tdocument.getElementById('countpageid').value = '1';\n \t\t\t\t}\n \t\t\t\t"; $data .= "</script>"; $tooltip = __("How to use:<br />1.) Reset all assigned guestbooks by clicking on \"Clear all\"<br />2.) Select your desired language<br /> 3.) Select your guestbook(s) by clicking \"Set\" in ascending order.<br />4.) Press the \"Save\" button", "dmsguestbook"); $data .= "<td style='text-align:right;'><a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='#tooltip_{$key}' class='tooltiplink'>?</a><div id='tooltip_{$key}' class='tooltip'>{$tooltip}</div></td>"; $data .= "</tr></table><br />"; $return_page_id = $data; } if ($key == "step") { $label = __("Post per page", "dmsguestbook") . ":"; $option = "1@3@5@10@15@20@25@30@35@40@45@50@60@70@80@90@100@"; $value = $options["step"]; $additional = ""; $style = ""; $tooltip = __("Number of entry in each page", "dmsguestbook"); $jscript = ""; $return_step = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "messagetext_length") { $label = __("Message text length", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["messagetext_length"]; $char_lenght = ""; $additional = __(" chars", "dmsguestbook"); $style = "width:50px;"; $tooltip = __("Define the maximum allowed lenght each message text<br />Deactivate this feature to set 0", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_messagetext_length = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "width1") { $label = __("Guestbook width", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["width1"]; $char_lenght = ""; $additional = "%"; $style = "width:50px;"; $tooltip = __("Guestbook width in percent<br /><br />Variable: {width1}", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_width1 = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "width2") { $label = __("Separator width", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["width2"]; $char_lenght = ""; $additional = "%"; $style = "width:50px;"; $tooltip = __("Separator width in percent<br /><br />Variable: {width2}", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_width2 = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "position1") { $label = __("Guestbook position (x-axis)", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["position1"]; $char_lenght = ""; $additional = "px"; $style = "width:50px;"; $tooltip = __("Absolute guestbook position in pixel horizontal (x-axis)<br /><br />Variable: {position1}", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_position1 = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "position2") { $label = __("Guestbook position (y-axis)", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["position2"]; $char_lenght = ""; $additional = "px"; $style = "width:50px;"; $tooltip = __("Absolute guestbook position in pixel vertical (y-axis)<br /><br />Variable: {position2}", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_position2 = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "forwardchar") { $tooltip = __("Navigation char style<br /><br />e.g. < >", "dmsguestbook"); $showtooltip = "<b style='background-color:#bb1100;color:#fff;padding:3px;' onmouseover=\"Tip('{$tooltip}')\" onclick=\"UnTip()\">?</b>"; $base64 = 1; /* If base64 is active */ if (BASE64 == 1 && $base64 == 1) { $forwardchar = base64_decode($options['forwardchar']); $backwardchar = base64_decode($options['backwardchar']); } else { $forwardchar = $options['forwardchar']; $backwardchar = $options['backwardchar']; } $return_forwardchar = "<li><table style='width:95%;' border='0'><colgroup><col width='40%'><col width='55%'><col width='5%'><colgroup><tr><td>" . __("Navigation char style", "dmsguestbook") . ":</td>\n\t\t<td><input style='width:50px;' type='text' name='backwardchar' value='{$backwardchar}' />\n\t\t<input style='width:50px;' type='text' name='forwardchar' value='{$forwardchar}' />\n\t\t<input type='hidden' name='base64-forwardchar' value='{$base64}' />\n\t\t<input type='hidden' name='base64-backwardchar' value='{$base64}' />\n\t\t</td>\n\t\t<td style='text-align:right;'>{$showtooltip}</td></tr></table>"; } if ($key == "navigationsize") { $label = __("Navigation char size", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["navigationsize"]; $char_lenght = ""; $additional = "px"; $style = "width:50px;"; $tooltip = __("Navigation font size in pixel<br /><br />Variable: {navigationsize}", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_navigationsize = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "formpos") { $label = __("Guestbook form position", "dmsguestbook") . ":"; $option = "top@bottom@"; $value = $options["formpos"]; $additional = ""; $style = ""; $tooltip = __("Visible the guestbook input form on top or bottom", "dmsguestbook"); $jscript = ""; $return_formpos = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "formposlink") { $label = __("Link text", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["formposlink"]; $char_lenght = ""; $additional = ""; $style = "width:150px;"; $tooltip = __("Define a link text if you selected \"bottom\"", "dmsguestbook"); $jscript = ""; $base64 = 1; $return_formposlink = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "sortitem") { $label = __("Sort guestbook items", "dmsguestbook") . ":"; $option = "ASC@DESC@"; $value = $options["sortitem"]; $additional = ""; $style = ""; $tooltip = __("DESC = Newer post first<br />ASC = Older post first", "dmsguestbook"); $jscript = ""; $return_sortitem = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "dbid") { $label = __("Database id", "dmsguestbook") . ":"; $entries = "0"; $value = $options["dbid"]; $additional = ""; $style = ""; $tooltip = __("Use the database id to consecutively numbered each guestbook entry", "dmsguestbook"); $jscript = ""; $return_dbid = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "form_template") { unset($tmp); $tmp = isset($tmp) ? $tmp : ''; $abspath = str_replace("\\", "/", ABSPATH); if ($handle = opendir($abspath . 'wp-content/plugins/dmsguestbook/template/form/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $tmp .= "{$file}" . "@"; } } closedir($handle); } $label = __("Form template", "dmsguestbook") . ":"; $option = $tmp; $value = $options["form_template"]; $additional = ""; $style = ""; $tooltip = __("Create your own input form template and use it is on your guestbook site<br /><br />See an examle in \"/template/form/default.tpl\"", "dmsguestbook"); $jscript = ""; $return_form_template = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "post_template") { unset($tmp); $tmp = isset($tmp) ? $tmp : ''; $abspath = str_replace("\\", "/", ABSPATH); if ($handle = opendir($abspath . 'wp-content/plugins/dmsguestbook/template/post/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $tmp .= "{$file}" . "@"; } } closedir($handle); } $label = __("Post template", "dmsguestbook") . ":"; $option = $tmp; $value = $options["post_template"]; $additional = ""; $style = ""; $tooltip = __("Create your own guestbook post template and use it is on your guestbook site<br /><br />See an examle in \"/template/post/default.tpl\"", "dmsguestbook"); $jscript = ""; $return_post_template = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "nofollow") { $label = __("rel=\"nofollow\" tag for posted url's", "dmsguestbook") . ":"; $entries = "0"; $value = $options["nofollow"]; $additional = ""; $style = ""; $tooltip = __("Activate the nofollow tag for posted url's<br /><a href=\"http://en.wikipedia.org/wiki/Nofollow\" target=\"_blank\">http://en.wikipedia.org/wiki/Nofollow</a>", "dmsguestbook"); $jscript = ""; $return_nofollow = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "additional_option") { unset($tmp); $tmp = isset($tmp) ? $tmp : ''; $abspath = str_replace("\\", "/", ABSPATH); if ($handle = opendir($abspath . 'wp-content/plugins/dmsguestbook/module/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != "README.txt") { $tmp .= "{$file}" . "@"; } } closedir($handle); } $label = __("Additional selectbox", "dmsguestbook") . ":"; $option = "none@" . $tmp; $value = $options["additional_option"]; $additional = ""; $style = ""; $tooltip = __("Define a selectbox and fill this with your own values.<br />See some examples in your \"dmsguestbook/module\" folder.", "dmsguestbook"); $jscript = ""; $return_additional_option = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "additional_option_title") { $label = __("Additional selectbox title", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["additional_option_title"]; $char_lenght = ""; $additional = ""; $style = "width:150px;"; $tooltip = __("This text will be shown on your input form guestbook page.<br />You could leave this textfield blank by using space character.", "dmsguestbook"); $jscript = ""; $base64 = 1; $return_additional_option_title = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "show_additional_option") { $label = __("Show additional value", "dmsguestbook") . ":"; $entries = "0"; $value = $options["show_additional_option"]; $additional = ""; $style = ""; $tooltip = __("Show additional text in each guestbook post.<br />You could edit the appearance in \"template/post/default.tpl\"<br />The default setting will be set the additional text on the footer of guestbook post.", "dmsguestbook"); $jscript = ""; $return_show_additional_option = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "separatorcolor") { $label = __("Separator color", "dmsguestbook") . ":"; $value = $options["separatorcolor"]; $char_lenght = 6; $id = 1; $additional = ""; $style = "width:150px;"; $tooltip = __("Separator between header and body in each entry<br /><br />Variable: {separatorcolor}", "dmsguestbook"); $return_separatorcolor = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "bordercolor1") { $label = __("Outside border color", "dmsguestbook") . ":"; $value = $options["bordercolor1"]; $char_lenght = 6; $id = 2; $additional = ""; $style = "width:150px;"; $tooltip = __("Color of the outside box<br /><br />Variable: {bordercolor1}", "dmsguestbook"); $jscript = ""; $return_bordercolor1 = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "bordercolor2") { $label = __("Textfield border color", "dmsguestbook") . ":"; $value = $options["bordercolor2"]; $char_lenght = 6; $id = 3; $additional = ""; $style = "width:150px;"; $tooltip = __("Color of all textfield borders<br /><br />Variable: {bordercolor2}", "dmsguestbook"); $jscript = ""; $return_bordercolor2 = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "navigationcolor") { $label = __("Navigation char color", "dmsguestbook") . ":"; $value = $options["navigationcolor"]; $char_lenght = 6; $id = 4; $additional = ""; $style = "width:150px;"; $tooltip = __("Define the navigation color<br /><br />Variable: {navigationcolor}", "dmsguestbook"); $jscript = ""; $return_navigationcolor = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "fontcolor1") { $label = __("Font color", "dmsguestbook") . ":"; $value = $options["fontcolor1"]; $char_lenght = 6; $id = 5; $additional = ""; $style = "width:150px;"; $tooltip = __("Overall font color<br /><br />Variable: {fontcolor1}", "dmsguestbook"); $jscript = ""; $return_fontcolor1 = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "captcha_color") { $label = __("Antispam image text color", "dmsguestbook") . ":"; $value = $options["captcha_color"]; $char_lenght = 6; $id = 6; $additional = ""; $style = "width:150px;"; $tooltip = __("Antispam image text color<br /><br />Variable: {captcha_color}", "dmsguestbook"); $jscript = ""; $return_captcha_color = ColorInput($key, $label, $id, $value, $additional, $style, $tooltip, $jscript); } if ($key == "dateformat") { $label = __("Date / Time format", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["dateformat"]; $char_lenght = ""; $additional = ""; $style = "width:200px;"; $tooltip = __("More infos", "dmsguestbook") . ": <a href=\"http://www.php.net/manual/en/function.strftime.php\" target=\"_blank\">http://www.php.net/manual/en/function.strftime.php</a>"; $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_dateformat = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "setlocale") { $label = __("Setlocale", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["setlocale"]; $char_lenght = ""; $additional = ""; $style = "width:80px;"; $tooltip = __("Set your language: e.g. en_EN, de_DE, fr_FR, it_IT, de, ge ...<br />(must be installed on your system)", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_setlocale = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "offset") { $label = __("Offset", "dmsguestbook") . ":"; $option = "-12@-11@-10@-9@-8@-7@-6@-5@-4@-3@-2@-1@0@+1@+2@+3@+4@+5@+6@+7@+8@+9@+10@+11@+12@"; $value = $options["offset"]; $additional = ""; $style = ""; $tooltip = __("Time offset: Use this offset if your Wordpress installation is not in the same country where you live.<br />e.g. You live in London and the Wordpress installation is on a server in Chicago.<br />If You want to show the date in GMT (Greenwich Mean Time), set the offset -6 and check the correct time below.<br /><br /> Notice: Don't use the %z or %Z parameter if your offset isn\"t 0.", "dmsguestbook"); $jscript = ""; $return_offset = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "send_mail") { $label = __("Send a mail", "dmsguestbook") . ":"; $entries = "0"; $value = $options["send_mail"]; $additional = ""; $style = ""; $tooltip = __("Receive a notification email when user write an new guestbook post", "dmsguestbook"); $jscript = ""; $return_send_mail = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "mail_adress") { $label = __("Email address", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["mail_adress"]; $char_lenght = ""; $additional = ""; $style = "width:150px;"; $tooltip = __("The email address which the message to be sent is<br />Multiple email adresses are allowed, split these with the \";\" separator.<br />e.g. test1@example.com;test2@example.com;test3@example.com", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_mail_adress = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "mail_method") { $label = __("Send method", "dmsguestbook") . ":"; $option = "Mail@SMTP@"; $value = $options["mail_method"]; $additional = ""; $style = ""; $tooltip = __("Use PHP internal mail function if your server supporting this.<br />A SMTP server could be need username and password as authentification which you must known.", "dmsguestbook"); $jscript = "onChange=\"smtpContainer();\""; $return_mail_send_method = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "smtp_host") { $label = __("SMTP host", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["smtp_host"]; $char_lenght = ""; $additional = ""; $style = "width:150px;"; $tooltip = __("The SMTP server which do you want to connect.", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_smtp_host = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "smtp_port") { $label = __("SMTP port", "dmsguestbook") . ":"; $option = "25@465@587@"; $value = $options["smtp_port"]; $additional = ""; $style = ""; $tooltip = __("25 = standard port<br />465 = SMTP over SSL port<br />587 = Alternative SMTP port<br /><br />Check your mail documentation for further information.", "dmsguestbook"); $jscript = ""; $return_smtp_port = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "smtp_username") { $label = __("SMTP username", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["smtp_username"]; $char_lenght = ""; $additional = ""; $style = "width:150px;"; $tooltip = __("SMTP username if is needed.<br /><br />Check your mail documentation for further information.", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_smtp_username = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "smtp_password") { $label = __("SMTP password", "dmsguestbook") . ":"; $type = "password"; $entries = 0; $value = $options["smtp_password"]; $char_lenght = ""; $additional = ""; $style = "width:140px;"; $tooltip = __("SMTP password if is needed.<br /><br />Check your mail documentation for further information.", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_smtp_password = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "smtp_auth") { $label = __("SMTP authentification", "dmsguestbook") . ":"; $entries = "0"; $value = $options["smtp_auth"]; $additional = ""; $style = ""; $tooltip = __("SMTP authentification if is needed. <br /><br />Check your mail documentation for further information.", "dmsguestbook"); $jscript = ""; $return_smtp_auth = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "smtp_ssl") { $label = __("SMTP SSL", "dmsguestbook") . ":"; $entries = "0"; $value = $options["smtp_ssl"]; $additional = ""; $style = ""; $tooltip = __("SMTP SSL (secure socket layer) if is needed.<br /><br />Check your mail documentation for further information.", "dmsguestbook"); $jscript = ""; $return_smtp_ssl = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "akismet") { $CheckAkismet = CheckAkismet(); if ($CheckAkismet != "") { $akismet_description = sprintf(__("DMSGuestbook has found an Akismet key %s", "dmsguestbook"), $CheckAkismet); } else { $akismet_description = __("No WordPress API key for Akismet was found! Activate the Akismet plugin and create a key. More information under: <a href=\"http://akismet.com/\" target=\"_blank\">http://akismet.com/</a> and <a href=\"http://en.wordpress.com/api-keys/\" target=\"_blank\">http://en.wordpress.com/api-keys/</a>", "dmsguestbook"); } $label = __("Akismet", "dmsguestbook") . ":"; $entries = "0"; $value = $options["akismet"]; $additional = ""; $style = ""; $tooltip = __("More infos", "dmsguestbook") . ":<a href=\"http://akismet.com/\" target=\"_blank\">http://akismet.com</a>"; $jscript = "onClick=\"akismetContainer();\""; $return_akismet = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); $return_akismet_key = "{$akismet_description}"; } if ($key == "akismet_action") { $label = __("Move spam to the spam folder@Block guestbook post if spam is found on it@", "dmsguestbook") . ":"; $entries = "1"; $value = $options["akismet_action"]; $additional = ""; $style = ""; $tooltip = __("What should Akismet do if spam are detected?", "dmsguestbook"); $jscript = ""; $return_akismet_action = RadioBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "require_antispam") { $label = __("Antispam off:@Antispam image:@Antispam mathematic figures:@reCAPTCHA:@", "dmsguestbook"); $entries = "3"; $value = $options["require_antispam"]; $additional = ""; $style = ""; $tooltip = __("Image:<br /><img src=\"../wp-content/plugins/dmsguestbook/captcha/captcha.php\" /><br />If you don't see the image here, check the xfiles.ttf and captcha.png permission in your captcha folder<br /><br />Mathematic figures:<br />4 + 9 = 13<br /><br />reCAPTCHA: <a href=\"http://recaptcha.net\" target=\"_blank\">learn more about reCAPTCHA</a>", "dmsguestbook"); $jscript = "onClick=\"recaptchaKeys();\""; $return_require_antispam = RadioBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "recaptcha_publickey") { $label = __("reCAPTCHA public key", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["recaptcha_publickey"]; $char_lenght = ""; $additional = ""; $style = "width:140px;"; $tooltip = __("Enter here you reCAPTCHA public key.", "dmsguestbook") . "<br /><a href=\"http://recaptcha.net/\" target=\"_blank\">" . __("Learn more about reCAPTCHA", "dmsguestbook") . "</a>"; $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_recaptcha_publickey = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "recaptcha_privatekey") { $label = __("reCAPTCHA private key", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["recaptcha_privatekey"]; $char_lenght = ""; $additional = ""; $style = "width:140px;"; $tooltip = __("Enter here you reCAPTCHA private key.", "dmsguestbook") . "<br /><a href=\"http://recaptcha.net/\" target=\"_blank\">" . __("Learn more about reCAPTCHA", "dmsguestbook") . "</a>"; $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_recaptcha_privatekey = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "antispam_key") { $value = RandomAntispamKey(); $label = __("Antispam key", "dmsguestbook") . ":"; $type = "hidden"; $entries = 0; $value = RandomAntispamKey(); $char_lenght = 20; $additional = $value; $style = "width:0px;"; $tooltip = __("Set a random key to prevent spam.<br />Every page refresh will create a new key which can be saved.<br />It's used for: Antispam image & Antispam mathematic figures.", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_antispam_key = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "require_email") { $label = __("Email", "dmsguestbook") . ":"; $entries = "0"; $value = $options["require_email"]; $additional = ""; $style = ""; $tooltip = __("User must fill out the email text field", "dmsguestbook"); $jscript = ""; $return_require_email = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "require_url") { $label = __("Website", "dmsguestbook") . ":"; $entries = "0"; $value = $options["require_url"]; $additional = ""; $style = ""; $tooltip = __("User must fill out the website text field", "dmsguestbook"); $jscript = ""; $return_require_url = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "mandatory_char") { $label = __("Mandatory char", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["mandatory_char"]; $char_lenght = 1; $additional = ""; $style = "width:20px;"; $tooltip = __("Mandatory char were to display on guestbook input form", "dmsguestbook"); $jscript = ""; $base64 = 1; $return_mandatory_char = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "show_email") { $label = __("Show email", "dmsguestbook") . ":"; $entries = "0"; $value = $options["show_email"]; $additional = ""; $style = ""; $tooltip = __("Visible email for everyone in each post", "dmsguestbook"); $jscript = ""; $return_show_email = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "show_url") { $label = __("Show website", "dmsguestbook") . ":"; $entries = "0"; $value = $options["show_url"]; $additional = ""; $style = ""; $tooltip = __("Visible website for everyone in each post", "dmsguestbook"); $jscript = ""; $return_show_url = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "show_ip") { $label = __("Show ip address", "dmsguestbook") . ":"; $entries = "0"; $value = $options["show_ip"]; $additional = ""; $style = ""; $tooltip = __("Visible ip for everyone in each post", "dmsguestbook"); $jscript = ""; $return_show_ip = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "ip_mask") { $label = __("Mask ip address", "dmsguestbook") . ":"; $option = "*.123.123.123@*.*.123.123@*.*.*.123@123.123.123.*@123.123.*.*@123.*.*.*@"; $value = $options["ip_mask"]; $additional = ""; $style = ""; $tooltip = __("Mask ip adress if this is visible", "dmsguestbook"); $jscript = ""; $return_ip_mask = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "email_image_path") { $part1 = explode("/", $options["email_image_path"]); $image = end($part1); $label = __("Email image path", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["email_image_path"]; $char_lenght = ""; $additional = ""; $style = "width:200px;"; $tooltip = __("Email image path", "dmsguestbook") . "<br /><a href=\"{$options['email_image_path']}\" target=\"_blank\">{$options['email_image_path']}</a><br /><br />" . __("Actually image:", "dmsguestbook") . "<img src=\"{$options['email_image_path']} \">"; $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_email_image_path = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "website_image_path") { $part1 = explode("/", $options["website_image_path"]); $image = end($part1); $label = __("Website image path", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["website_image_path"]; $char_lenght = ""; $additional = ""; $style = "width:200px;"; $tooltip = __("Website image path", "dmsguestbook") . " :<br /><a href=\"{$options['website_image_path']}\" target=\"_blank\">{$options['website_image_path']}</a><br /><br />" . __("Actually image:", "dmsguestbook") . "<img src=\"{$options['website_image_path']} \">"; $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_website_image_path = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "admin_review") { $label = __("Admin must every post review", "dmsguestbook") . ":"; $entries = "0"; $value = $options["admin_review"]; $additional = ""; $style = ""; $tooltip = __("Admin must review every post before this can display on the page.<br />You can edit the guestbook review status under \"Entries\".", "dmsguestbook"); $jscript = ""; $return_admin_review = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "url_overruled") { $label = __("URL overrule", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $value = $options["url_overruled"]; $additional = ""; $style = "width:200px;"; $tooltip = __("You can overrule this link if you have trouble with the guestbook form submit.", "dmsguestbook") . "<br /><br />" . __("Example", "dmsguestbook") . ":<br />{$url}/?p=3<br />{$url}/?page_id=3<br />{$url}/3/<br />{$url}/" . __("YourGuestBookName", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_url_overruled = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "gravatar") { $label = __("User can use Gravatar", "dmsguestbook") . ":"; $entries = "0"; $value = $options["gravatar"]; $additional = ""; $style = ""; $tooltip = __("More infos", "dmsguestbook") . ":<a href=\\'http://en.gravatar.com\\' target=\\'_blank\\'>http://en.gravatar.com</a>"; $jscript = ""; $return_gravatar = CheckBoxes($key, $label, $value, $entries, $additional, $style, $tooltip, $jscript); } if ($key == "gravatar_rating") { $label = __("Gravatar rating", "dmsguestbook") . ":"; $option = "G@PG@R@X@"; $value = $options["gravatar_rating"]; $additional = ""; $style = ""; $tooltip = __("You can specify a rating of G, PG, R, or X.<br />[G] A G rated gravatar is suitable for display on all websites with any audience type.<br />[PG] PG rated gravatars may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.<br />[R] R rated gravatars may contain such things as harsh profanity, intense violence, nudity, or hard drug use.<br />[X] X rated gravatars may contain hardcore sexual imagery or extremely disturbing violence.", "dmsguestbook"); $jscript = ""; $return_gravatar_rating = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "gravatar_size") { $label = __("Gravatar size", "dmsguestbook") . ":"; $type = "text"; $entries = 0; $char_lenght = 3; $value = $options["gravatar_size"]; $additional = "px"; $style = "width:30px;"; $tooltip = __("Image size in pixel", "dmsguestbook"); $jscript = ""; $base64 = 0; /* Do not use this unless you edit the preg_replace() in the create_options() function and $var_* in dmsguestbook.php */ $return_gravatar_size = OneInput($key, $label, $type, $entries, $value, $char_lenght, $additional, $style, $tooltip, $jscript, $base64); } if ($key == "role1") { $label = __("DMSGuestbook settings", "dmsguestbook") . ":"; $option = "Administrator@Editor@Author@Contributor@Subscriber@"; $value = $options["role1"]; $additional = ""; $style = ""; $tooltip = __("This role affects with", "dmsguestbook") . ":<br />-" . __("Database settings", "dmsguestbook") . "<br />-" . __("Guestbook settings", "dmsguestbook") . "<br />-" . __("Language settings", "dmsguestbook") . "<br />-" . __("phpinfo", "dmsguestbook"); $jscript = ""; $return_role1 = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "role2") { $label = __("Entries", "dmsguestbook") . ":"; $option = "Administrator@Editor@Author@Contributor@Subscriber@"; $value = $options["role2"]; $additional = ""; $style = ""; $tooltip = __("This role affects with", "dmsguestbook") . ":<br />-" . __("Guestbook entries (show, edit, delete)", "dmsguestbook"); $jscript = ""; $return_role2 = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "role3") { $label = __("Spam") . ":"; $option = "Administrator@Editor@Author@Contributor@Subscriber@"; $value = $options["role3"]; $additional = ""; $style = ""; $tooltip = __("This role affects with", "dmsguestbook") . ":<br />-" . __("Spam entries (show, edit, delete)", "dmsguestbook"); $jscript = ""; $return_role3 = SelectBox($key, $label, $option, $value, $additional, $style, $tooltip, $jscript); } if ($key == "css") { $part1 = explode("@", $options["css"]); $options["css"] = str_replace("[br]", "\r\n", $options["css"]); $part1 = explode("@", $options["css"]); $part11 = explode("@", $_SESSION['csscontainer']); if (count($part11) > count($part1)) { $newone = "<b style='color:#bb1100;'>" . __("NEW!", "dmsguestbook") . "</b><br />"; echo "<b style='font-size:12px;color:#bb1100;'>\n\t\t--------------------------------------------------<br />"; echo __("New CSS entries found, press the save button to save it.", "dmsguestbook") . "<br />"; echo "--------------------------------------------------</b><br /><br />"; } $restore_css = isset($restore_css) ? $restore_css : ''; $t = isset($t) ? $t : ''; if (count($part11) < count($part1)) { $restore_css = 1; echo "<b style='font-size:12px;color:#bb1100;'>\n\t\t--------------------------------------------------<br />"; echo _("Some CSS entries are missing!", "dmsguestbook") . "<br />" . __("Press the save button to restore CSS settings.", "dmsguestbook") . "<br />"; echo "--------------------------------------------------</b><br /><br />"; } $tooltip = "{width1} = " . __("Guestbook width", "dmsguestbook") . "<br />{width2} = " . __("Separator width", "dmsguestbook") . "<br />{position1} = " . __("Relative guestbook position (left to right)", "dmsguestbook") . "<br />{separatorcolor} = " . __("Separator between header and body in each entry", "dmsguestbook") . "<br />{bordercolor1} = " . __("Border of the outside box") . "<br />{bordercolor2} = " . __("Color of all textfield border", "dmsguestbook") . "<br />{navigationcolor} = " . __("Navigation color", "dmsguestbook") . "<br />{fontcolor1} = " . __("Overall font color", "dmsguestbook") . "<br />{navigationsize} = " . __("Navigation char size", "dmsguestbook") . "<br />{captcha_color} = " . __("Antispam image text color", "dmsguestbook") . "<br /><br />" . __("Stylesheet (CSS) Help & Tutorials:<br />English: <a href=\"http://www.html.net/tutorials/css/\" target=\"_blank\">http://www.html.net/tutorials/css/</a><br />German: <a href=\"http://www.css4you.de/\" target=\"_blank\">http://www.css4you.de/</a><br />Or ask Google and friends :-)", "dmsguestbook"); $return_css = isset($return_css) ? $return_css : ''; $return_css .= "<table border='0'><colgroup><col width='50'><col width='210'><col width='50'><colgroup>"; $xx = 0; for ($x = 0; $x < count($part11) - 1; $x++) { $part2 = explode("|", $part1[$xx]); $part22 = explode("|", $part11[$x]); if (trim($part2[1]) == trim($part22[1])) { $yxc[$x] = "<div style='font-size:0.9em;'>Description: {$part2['0']}<br />\n \t\t\t\t\tCSS class: {$part2['1']}</div><input type='hidden' name='cssdescription{$x}' value='{$part2['0']}' />\n \t\t\t\t\t<input type='hidden' name='cssname{$x}' value='{$part2['1']}' />"; $xx++; } else { if ($restore_css != 1) { $yxc[$x] = "<div style='font-size:0.9em;'>" . __("Description", "dmsguestbook") . ": {$part22['0']}<br />\n \t\t\t\t\t\t\tCSS class: {$part22['1']}</div><input type='hidden' name='cssdescription{$x}' value='{$part22['0']}' />\n \t\t\t\t\t\t\t<input type='hidden' name='cssname{$x}' value='{$part22['1']}' />"; $xx - 1; $t[] = $x; } } } $xx = 0; for ($x = 0; $x < count($part11) - 1; $x++) { $part2 = explode("|", $part1[$xx]); $part22 = explode("|", $part11[$x]); $y = $x + 1; $showtooltip = "<a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='#tooltip_css_{$x}' class='tooltiplink'>?</a><div id='tooltip_css_{$x}' class='tooltip'>{$tooltip}</div>"; if (!$t) { $t[] = 99999; } if (!in_array($x, $t) && $restore_css != 1) { $return_css .= "<tr><td style='background-color:#fff;text-align:center;'>({$y})</td>\n \t\t<td>{$yxc[$x]}<textarea name='css{$x}' cols='50' rows='5' >{$part2['2']}</textarea></td><td>{$showtooltip}</td></tr>"; unset($css_submitbutton); $css_submitbutton = isset($css_submitbutton) ? $css_submitbutton : ''; if ($x == 4 or $x == 9 or $x == 14 or $x == 19 or $x == 24 or $x == 29) { $css_submitbutton = "<br /><br />" . $submitbutton . "<br /><br />"; } $return_css .= "<tr><td></td><td>{$css_submitbutton}</td></tr>"; $xx++; } else { if ($restore_css != 1) { $return_css .= "<tr><td style='text-align:center;'><br />({$y})</td>\n \t\t\t \t<td>{$yxc[$x]}<textarea name='css{$x}' cols='50' rows='5' >{$part22['2']}</textarea></td><td>{$showtooltip}</td></tr>"; unset($css_submitbutton); if ($x == 4 or $x == 9 or $x == 14 or $x == 19 or $x == 24 or $x == 29) { $css_submitbutton = "<br /><br />" . $submitbutton . "<br /><br />"; } $return_css .= "<tr><td></td><td>{$css_submitbutton}</td></tr>"; $xx - 1; } } if ($restore_css == 1) { $return_css .= "<input type='hidden' name='cssdescription{$x}' value='{$part22['0']}' />"; $return_css .= "<input type='hidden' name='cssname{$x}' value='{$part22['1']}' />"; $return_css .= "<input type='hidden' name='css{$x}' value='{$part22['2']}' />"; } } $return_css .= "</table>"; } if ($key == "css_customize") { $options["css_customize"] = str_replace("[br]", "\r\n", $options["css_customize"]); $return_css_customize = "<table style='width:95%;' border='0'>"; $yxc = "<div style='font-size:0.9em;'>" . __("Custom CSS", "dmsguestbook") . ":</div>"; $tooltip = __("Class heredity:<br /><br />e.g.<br /><b>a.</b>css_navigation_char<b>:hover</b> {color:#ff0000;}<br />All url link with css_navigation_char (navigation link)<br />become hover color red when user drag over it<br /><br /><b>td</b>.css_guestbook_message_nr_name {background-color:#00ff00;}<br />All td with css_guestbook_message_nr_name (guestbook name & id)<br />become background color green<br /><br />", "dmsguestbook"); $showtooltip = "<b style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;' onmouseover=\"Tip('{$tooltip}')\" onclick=\"UnTip()\">?</b>"; $return_css_customize .= "<tr><td>{$yxc} <textarea name='css_customize' cols='55' rows='15' >{$options['css_customize']}</textarea></td><td>{$showtooltip}</td></tr>"; $return_css_customize .= "</table>"; } } echo "<b style='font-size:20px;'>" . __("Guestbook settings", "dmsguestbook") . "</b><br />"; echo "<table width='100%' border='0'>"; echo "<tr><td>"; echo "<form name='form1' method='post' action='{$location}'>"; echo $submitbutton; echo "<div id='outer'>"; ?> <div id="dmsguestbook-menu"> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Basic", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_page_id; ?> </li> <li><?php echo $return_step; ?> </li> <li><?php echo $return_formpos; ?> </li> <li><?php echo $return_formposlink; ?> </li> <li><?php echo $return_messagetext_length; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Extended"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_position1; ?> </li> <li><?php echo $return_position2; ?> </li> <li><?php echo $return_width1; ?> </li> <li><?php echo $return_width2; ?> </li> <li><?php echo $return_forwardchar; ?> </li> <li><?php echo $return_navigationsize; ?> </li> <li><?php echo $return_show_email; ?> </li> <li><?php echo $return_show_url; ?> </li> <li><?php echo $return_show_ip; ?> </li> <li><?php echo $return_ip_mask; ?> </li> <li> </li> <li><?php echo $return_sortitem; ?> </li> <li><?php echo $return_dbid; ?> </li> <li><?php echo $return_form_template; ?> </li> <li><?php echo $return_post_template; ?> </li> <li><?php echo $return_nofollow; ?> </li> <li><?php echo $return_additional_option; ?> </li> <li><?php echo $return_additional_option_title; ?> </li> <li><?php echo $return_show_additional_option; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Color", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_bordercolor1; ?> </li> <li><?php echo $return_bordercolor2; ?> </li> <li><?php echo $return_navigationcolor; ?> </li> <li><?php echo $return_separatorcolor; ?> </li> <li><?php echo $return_fontcolor1; ?> </li> <li><?php echo $return_captcha_color; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Time / Date", "dmsguestbook"); ?> </a></h3> <?php setlocale(LC_TIME, $options["setlocale"]); $offset = mktime(date("H") + $options["offset"], date("i"), date("s"), date("m"), date("d"), date("Y")); $time_example = htmlentities(strftime($options["dateformat"], $offset), ENT_QUOTES); ?> <div> <p> <ul> <li><?php echo $return_dateformat; ?> </li> <li><?php echo $return_setlocale; ?> </li> <li><?php echo $return_offset; ?> </li> <li> </li> <li><?php echo __("Example", "dmsguestbook") . " : {$time_example}"; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Email Notification", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_send_mail; ?> </li> <li><?php echo $return_mail_adress; ?> </li> <li><?php echo $return_mail_send_method; ?> </li> <li> </li> <span style='display:none;' id='smtp_container'> <li><?php echo $return_smtp_host; ?> </li> <li><?php echo $return_smtp_port; ?> </li> <li> </li> <li><?php echo $return_smtp_auth; ?> </li> <li><?php echo $return_smtp_ssl; ?> </li> <li><?php echo $return_smtp_username; ?> </li> <li><?php echo $return_smtp_password; ?> </li> </span> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Captcha / Akismet", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_require_antispam; ?> </li> <span style='display:none;' id='recaptcha_keys'> <li><?php echo $return_recaptcha_publickey; ?> </li> <li><?php echo $return_recaptcha_privatekey; ?> </li> <li> </li> </span> <li><?php echo $return_antispam_key; ?> </li> <li> </li> <li> </li> <li><?php echo $return_akismet; ?> </li> <span style='display:none;' id='akismet_container'> <li><?php echo $return_akismet_key; ?> </li> <li> </li> <li><?php echo $return_akismet_action; ?> </li> </span> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Mandatory", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><table style='width:95%;' border='0'><colgroup><col width='40%'><col width='55%'><col width='5%'><colgroup><tr><td><?php echo __("Name", "dmsguestbook"); ?> :</td> <td><input type='checkbox' checked disabled></td><td style='text-align:right;'><a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='#tooltip_mandatory_name' class='tooltiplink'>?</a><div id='tooltip_mandatory_name' class='tooltip'><?php echo __("User must fill out name text field", "dmsguestbook"); ?> </div></td></tr></li> <li><table style='width:95%;' border='0'><colgroup><col width='40%'><col width='55%'><col width='5%'><colgroup><tr><td><?php echo __("Message", "dmsguestbook"); ?> :</td> <td><input type='checkbox' checked disabled></td><td style='text-align:right;'><a style='font-weight:bold;background-color:#bb1100;color:#fff;padding:3px;text-decoration:none;' href='#tooltip_mandatory_message' class='tooltiplink'>?</a><div id='tooltip_mandatory_message' class='tooltip'><?php echo __("User must fill out message text field", "dmsguestbook"); ?> </div></td></tr></li> <li><?php echo $return_require_email; ?> </li> <li><?php echo $return_require_url; ?> </li> <li><?php echo $return_mandatory_char; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Gravatar", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_gravatar; ?> </li> <li><?php echo $return_gravatar_rating; ?> </li> <li><?php echo $return_gravatar_size; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Miscellaneous", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_email_image_path; ?> </li> <li><?php echo $return_website_image_path; ?> </li> <li><?php echo $return_admin_review; ?> </li> <li><?php echo $return_url_overruled; ?> </li> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("Role", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo $return_role1; ?> </li> <li><?php echo $return_role2; ?> </li> <li><?php echo $return_role3; ?> </li> <?php $abspath = str_replace("\\", "/", ABSPATH); if (is_writable($abspath . "wp-content/plugins/dmsguestbook/dmsguestbook.css")) { $css_notice = "<b>dmsguestbook.css </b><i style='color:#00bb00;font-style:normal;'>" . __("is writable", "dmsguestbook") . ".</i>"; } else { $css_notice = "<b>dmsguestbook.css </b><i style='color:#bb0000;font-style:normal;'>" . __("is not writable or doesn't exist", "dmsguestbook") . ".</i>"; } ?> </ul> </p> </div> <h3 style="font-weight:bold;"><a href="#"><?php echo __("CSS", "dmsguestbook"); ?> </a></h3> <div> <p> <ul> <li><?php echo __("If dmsguestbook.css exist and is writable, all CSS settings will be read from it.<br />Otherwise these settings will be loaded from the database.", "dmsguestbook"); ?> <br /><?php echo $css_notice; ?> <br /><br /> </li> <li><?php echo $return_css; ?> </li> <li><?php echo $return_css_customize; ?> </li> <li> <b><?php echo __("Settings for custom CSS", "dmsguestbook"); ?> </b><br /> <br /> <i><?php echo __("Mouse hover color", "dmsguestbook"); ?> </i><br /> a.css_navigation_char:hover {text-decoration:none; color:#{navigationcolor};}<br /> a.css_navigation_select:hover {text-decoration:none; color:#bb1100;}<br /> a.css_navigation_notselect:hover {text-decoration:none; color:#000000;}<br /> <br /> <i><?php echo __("Email and url image properties", "dmsguestbook"); ?> </i><br /> img.css_post_url_image {border:0px;}<br /> img.css_post_email_image {border:0px;}<br /> </li> </ul> </p> </div> </div> <!-- Check SMTP is on or not--> <script type="text/javascript"> smtpContainer(); function smtpContainer() { var mail_method = document.getElementById('mail_method').value; if(mail_method == "SMTP") { document.getElementById('smtp_container').style.display="block"; } if(mail_method == "Mail") { document.getElementById('smtp_container').style.display="none"; } } </script> <!-- Check reCAPTCHA is on or not--> <script type="text/javascript"> recaptchaKeys(); function recaptchaKeys() { if(document.form1.require_antispam[3].checked == true) { document.getElementById('recaptcha_keys').style.display="block"; } if(document.form1.require_antispam[3].checked == false) { document.getElementById('recaptcha_keys').style.display="none"; } } </script> <!-- Check Akismet is on or not--> <script type="text/javascript"> akismetContainer(); function akismetContainer() { var akismet = document.getElementById('akismet').checked; if(akismet == "1") { document.getElementById('akismet_container').style.display="block"; } if(akismet == "0") { document.getElementById('akismet_container').style.display="none"; } } </script> <?php echo "</div>\n\t</div>"; echo "</td></tr></table>"; echo "<table border='0'><colgroup><col width='100%' span='2'></colgroup><tr>"; echo "<td><input id='save' name='action' value='insert' type='hidden' />"; echo "<input class='button-primary action' style='font-weight:bold; margin:10px 0px; width:100px;' type='submit' value='" . __("Save", "dmsguestbook") . "' />"; echo "</form></td>"; #restore default settings button --> echo "<td><form name='form3' method='post' action='{$location}'>\n\t\t<input name='action' value='default_settings' type='hidden' />\n\t\t<input class='button-secondary action' style='font-weight:bold; margin:10px 0px;' type='submit'\n\t\tvalue='" . __("Restore default settings - All data will be replaced", "dmsguestbook") . "' onclick=\"return confirm('" . __("Would you really like to restore all data?", "dmsguestbook") . "');\" />\n \t</form></td>"; echo "</tr></table>"; ?> <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script> <?php } ?> <!-- language --> <?php if ($_REQUEST['advanced'] == 1) { $Role1 = CheckRole($options["role1"], 0); if (!current_user_can("level_" . $Role1) && ROLE != 0) { CheckRole($options["role1"], 1); exit; } clearstatcache(); $color3 = settablecolor(3, 0); unset($buffer); $buffer = isset($buffer) ? $buffer : ''; $save_advanced_button = isset($save_advanced_button) ? $save_advanced_button : ''; $valid_file = isset($valid_file) ? $valid_file : ''; $_REQUEST['file'] = isset($_REQUEST['file']) ? $_REQUEST['file'] : ''; echo "<b style='font-size:20px;'>" . __("Language settings", "dmsguestbook") . "</b><br />"; $abspath = str_replace("\\", "/", ABSPATH); if ($handle = opendir($abspath . 'wp-content/plugins/dmsguestbook/language/')) { /* language */ while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file != "mo") { if ($file == "README.txt") { echo "<a style='color:#bb0000;' href='admin.php?page=dmsguestbook&advanced=1&folder=language/&file={$file}'>{$file}</a>, "; } else { echo "<a href='admin.php?page=dmsguestbook&advanced=1&folder=language/&file={$file}'>{$file}</a>, "; } } } echo "<br />"; closedir($handle); } if ($_REQUEST['file'] != "") { clearstatcache(); /* check the file variable for language text file */ if (preg_match('/^[a-z0-9_]+\\.+(txt)/i', "{$_REQUEST['file']}") == 1) { $file = $_REQUEST['file']; if (file_exists($abspath . "wp-content/plugins/dmsguestbook/language/" . $file)) { $folder = "language/"; $valid_file = 1; $save_advanced_button = check_writable($folder, $file); } else { $valid_file = 0; echo "<br /><b>" . __("File not found!", "dmsguestbook") . "</b>"; } } /* error handling */ if ($file == "") { echo "<br /><b>" . __("Not a valid file, must be a language file with .txt prefix.") . "</b>"; } if ($valid_file == 1) { $handle = @fopen($abspath . "wp-content/plugins/dmsguestbook/" . $folder . $file, "r"); while (!feof($handle)) { $buffer .= fgets($handle, 4096); } fclose($handle); } } $showfiledata = htmlentities($buffer, ENT_QUOTES); ?> <br /> <table style="border:0px solid #000000; width:100%;background-color:#<?php echo $color3; ?> ;" cellspacing="0" cellpadding="0"> <tr> <form name="form0" method="post" action="<?php echo $location; ?> "> <td><textarea style="width:99%; height:500px;" name="advanced_data"><?php echo $showfiledata; ?> </textarea></td> </tr> <input name="action" value="save_advanced_data" type="hidden" /> <input name="folder" value="<?php echo $folder; ?> " type="hidden" /> <input name="file" value="<?php echo $file; ?> " type="hidden" /> <tr> <td style="text-align:center;"><?php echo $save_advanced_button; ?> </td> </tr> </form> </tr> </table> <?php } ?> </div> <?php } }
public static function showSelectCars($strBoxName, $strSelectedVal = null, $field1 = "class=\"typeselect\"") { $arCars = static::getListCar(); if (is_null($strSelectedVal)) { $strSelectedVal = static::getDefaultCarID(); } $arValues = array(); foreach ($arCars as $arCar) { $arValues[] = array("NAME" => $arCar['NAME'] . ' - ' . $arCar['CAR_NUMBER'], "VALUE" => $arCar['ID']); } return SelectBox($strBoxName, $arValues, "", $strSelectedVal, $field1); }
<?echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_SIZE")?>: <input name="FIELDS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT_SIZE]" type="text" value="<?echo htmlspecialcharsbx($arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_SIZE"])?>" size="3" > </div> <div class="adm-list-item" id="SETTINGS[<?echo $FIELD_ID?>][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]" style="padding-left:16px;display:<? if($arFields[$FIELD_ID]["DEFAULT_VALUE"]["USE_WATERMARK_TEXT"]==="Y") echo 'block'; else echo 'none'; ?>" > <?echo GetMessage("IB_E_FIELD_PICTURE_WATERMARK_POSITION")?>: <?echo SelectBox( "FIELDS[".$FIELD_ID."][DEFAULT_VALUE][WATERMARK_TEXT_POSITION]", IBlockGetWatermarkPositions(), "", $arFields[$FIELD_ID]["DEFAULT_VALUE"]["WATERMARK_TEXT_POSITION"] );?> </div> </div> <? break; case "SECTION_CODE": ?> <div class="adm-list"> <div class="adm-list-item"> <div class="adm-list-control"> <input type="checkbox" value="Y" id="FIELDS[<?echo $FIELD_ID?>][DEFAULT_VALUE][UNIQUE]"
<td valign="top"><input type="text" size="5" value="<?echo htmlspecialcharsbx($SUPPORT_MAX_FILESIZE)?>" name="SUPPORT_MAX_FILESIZE"></td> </tr> <tr> <td valign="top"><label><?php echo GetMessage("SUP_DEFAULT_VALUE_HIDDEN"); ?> </label></td> <td valign="top"><?echo InputType("checkbox", "DEFAULT_VALUE_HIDDEN", "Y", $DEFAULT_VALUE_HIDDEN, false, "", 'id="DEFAULT_VALUE_HIDDEN"')?></td> </tr> <tr> <td valign="top"><?php echo GetMessage("SUP_DEFAULT_RESPONSIBLE"); ?> </td> <td valign="top"><? echo SelectBox("DEFAULT_RESPONSIBLE_ID", CTicket::GetSupportTeamList(), " ", $DEFAULT_RESPONSIBLE_ID); ?></td> </tr> <tr> <td valign="top"><?php echo GetMessage("SUP_DEFAULT_AUTO_CLOSE_DAYS"); ?> </td> <td valign="top"><? $ref_id = array("-1", "0"); $ref = array(GetMessage("SUP_NOT_CHANGE"), GetMessage("SUP_SET_NULL")); for ($i=1;$i<=90;$i++) { $ref[] = $i." ".GetMessage("SUP_DAY"); $ref_id[] = $i; }
</td> <td valign="top"> <?php echo SelectBox("W_SUPPORT_CATEGORY", CTicket::GetRefBookValues("C", $W_SUPPORT_SITE_ID), " ", $W_SUPPORT_CATEGORY); ?> </td> </tr> <tr valign="top"> <td><?php echo GetMessage("SUPPORT_MAIL_ADD_WITH_CRITICALITY"); ?> </td> <td valign="top"> <?php echo SelectBox("W_SUPPORT_CRITICALITY", CTicket::GetRefBookValues("K", $W_SUPPORT_SITE_ID), " ", $W_SUPPORT_CRITICALITY); ?> </td> </tr> <script type="text/javascript"> <!-- var arCriticality = Array(); var arCategory = Array(); <?php if (is_array($arrSiteID)) { reset($arrSiteID); foreach ($arrSiteID as $sid) { ?> arCriticality["<?php echo $sid; ?>
public static function showSelectWhoPaidList($strBoxName, $selected = 1, $field1 = "class=\"whopaidselect\"") { $arRes = WhoPaidTable::getList(array('select' => array('ID' => 'VALUE', 'NAME'), 'filter' => array('ACTIVE' => true), 'order' => array('SORT' => 'ASC'))); return SelectBox($strBoxName, $arRes, '', $selected, $field1); }
</tr> </table> </div> </td> </tr> <tr> <td width="100%" colspan=2 align="center"> <div id="tr_responsible"> <table width="100%" cellspacing=0 cellpadding=0> <tr> <td align="right" width="40%"><?php echo GetMessage("SUP_RESPONSIBLE"); ?> </td> <td width="60%" align="left" style="padding-left: 10px;"><?php echo SelectBox("RESPONSIBLE_USER_ID", CTicket::GetSupportTeamList(), GetMessage("SUP_NO"), $str_RESPONSIBLE_USER_ID); ?> </td> </tr> </table> </div> </td> </tr> <?php if ($bTab2) { $tabControl->BeginNextTab(); ?> <tr> <td width="100%" colspan=2 align="center"> <div id="events"> <table width="100%" cellspacing="8" cellpadding="0">
</td> <?php if (in_array("EDIT", $arrRESULT_PERMISSION) && $F_RIGHT >= 25) { ?> <td><font class="smalltext"><?php echo GetMessage("FORM_CHANGE_TO"); ?> </font></td> <td><input type="hidden" name="STATUS_PREV_<?php echo $GLOBALS["f_ID"]; ?> " value="<?php echo $GLOBALS["f_STATUS_ID"]; ?> "><?php echo SelectBox("STATUS_" . $GLOBALS["f_ID"], CFormStatus::GetDropdown($WEB_FORM_ID, array("MOVE"), $GLOBALS["f_USER_ID"]), " ", "", "class='inputselect'"); ?> </td> <?php } // endif (in_array("EDIT",$arrRESULT_PERMISSION) && $F_RIGHT>=25); ?> </tr> <?php } // endif ($SHOW_STATUS == "Y") ?> </table> </td> </tr> <?php
<tr valign="center"> <td nowrap valign="top"><?php echo GetMessage("FLOW_F_STATUS"); ?> :</td> <td nowrap><input type="text" name="find_status" value="<?php echo htmlspecialcharsbx($find_status); ?> " size="47"><?php echo ShowExactMatchCheckbox("find_status"); ?> <?php echo ShowFilterLogicHelp(); ?> <br><?php echo SelectBox("find_status_id", CWorkflowStatus::GetDropDownList("Y"), GetMessage("MAIN_ALL"), htmlspecialcharsbx($find_status_id)); ?> </td> </tr> <?php echo ShowLogicRadioBtn(); $filter->Buttons(array("table_id" => $sTableID, "url" => $APPLICATION->GetCurPage(), "form" => "form1")); $filter->End(); ?> </form> <?php $lAdmin->DisplayList(); ?> <?php
<tr> <td nowrap><?php echo GetMessage("VOTE_F_CHANNEL"); ?> </td> <td nowrap><input type="text" name="find_channel" value="<?php echo htmlspecialcharsbx($find_channel); ?> " size="47"><?php echo InputType("checkbox", "find_channel_exact_match", "Y", $find_channel_exact_match, false, "", "title='" . GetMessage("VOTE_EXACT_MATCH") . "'"); ?> <?php echo ShowFilterLogicHelp(); ?> <br><?php echo SelectBox("find_channel_id", CVoteChannel::GetDropDownList(), GetMessage("VOTE_ALL"), htmlspecialcharsbx($find_channel_id)); ?> </td> </tr> <tr> <td nowrap><?php echo GetMessage("VOTE_F_ACTIVE"); ?> </td> <td nowrap><?php $arr = array("reference" => array(GetMessage("VOTE_YES"), GetMessage("VOTE_NO")), "reference_id" => array("Y", "N")); echo SelectBoxFromArray("find_active", $arr, htmlspecialcharsbx($find_active), GetMessage("VOTE_ALL")); ?> </td> </tr> <tr>
public static function showSelectListUsers($name = "USER_ID") { $arValues = array(); $arValues[] = array('NAME' => 'Общий', 'VALUE' => 0); global $USER; if ($arUsers = Users::getList()) { foreach ($arUsers as $arUser) { $arValues[] = array('NAME' => $arUser['NAME'], 'VALUE' => $arUser['USER_ID']); } } return SelectBox($name, $arValues, '', $USER->getID()); }
require_once $_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_admin_after.php'; if (!CModule::IncludeModule('bx_moddev')) { die('no bx_moddev module'); } $APPLICATION->SetAdditionalCSS('/bitrix/modules/bx_moddev/css/bx-moddev.css'); $active_module = array_key_exists('module', $_GET) ? filter_input(INPUT_GET, 'module', FILTER_SANITIZE_STRING) : 'bx_moddev'; $aTabs = array(array('DIV' => 'tab1', 'TAB' => GetMessage('MODULS_LIST_TAB'), 'ICON' => '', 'TITLE' => GetMessage('MODULS_LIST_TITLE'))); $tabControl = new CAdminTabControl("tabControl", $aTabs); $tabControl->Begin(); $tabControl->BeginNextTab(); ?> <tr> <td colspan="2" align="center"> <?php print SelectBox('moddev-module', CModule::GetDropdownList()); ?> </td> </tr> <? $tabControl->EndTab(); $tabControl->End(); ?> <div id="moddev-info"></div> <div id="moddev-module-container"></div> <script type="text/javascript" src="/bitrix/modules/bx_moddev/js/jquery-1.7.2.min.js"></script> <script type="text/javascript"> (function() {
if (intval($arResult["arResultData"]["USER_ID"])>0) { $rsUser = CUser::GetByID($arResult["arResultData"]["USER_ID"]); $arUser = $rsUser->Fetch(); $arResult["RESULT_USER_ID"] = $arResult["arResultData"]["USER_ID"]; $arResult["RESULT_USER_LOGIN"] = $arUser["LOGIN"]; $arResult["RESULT_USER_EMAIL"] = $arUser["USER_EMAIL"]; $arResult["RESULT_USER_FIRST_NAME"] = $arUser["NAME"]; $arResult["RESULT_USER_LAST_NAME"] = $arUser["LAST_NAME"]; $arResult["RESULT_USER_SECOND_NAME"] = $arUser["SECOND_NAME"]; } $arResult["isResultStatusChangeAccess"] = in_array("EDIT", $arResult["arrRESULT_PERMISSION"]) ? "Y" : "N"; $arResult["RESULT_STATUS_FORM"] = $arResult["isResultStatusChangeAccess"] == "Y" ? SelectBox("status_".$arResult["WEB_FORM_NAME"], CFormStatus::GetDropdown($arParams["WEB_FORM_ID"], array("MOVE"), $arResult["RESULT_USER_ID"]), " ", "", "") : ""; // define variables to assign $arResult = array_merge( $arResult, array( "RESULT_ID" => $arParams["RESULT_ID"], "WEB_FORM_ID" => $arParams["WEB_FORM_ID"], "RESULT_STATUS" => "<span class='".$arResult["arResultData"]["STATUS_CSS"]."'>".$arResult["arResultData"]["STATUS_TITLE"]."</span>", "RESULT_USER_AUTH" => $arResult["arResultData"]["USER_AUTH"] == "Y" ? "Y" : "N", "RESULT_DATE_CREATE" => $arResult["arResultData"]["DATE_CREATE"], "RESULT_TIMESTAMP_X" => $arResult["arResultData"]["TIMESTAMP_X"],
</tr> <?php } ?> <?php if ($can_select_sla == "Y" && $can_select_site == "Y") { ?> <tr valign="middle"> <td id="edit_20" align="right" width="20%" nowrap><?php echo GetMessage("SUP_SLA"); ?> :</td> <td id="edit_21" width="80%" nowrap><?php $rsSLA = CTicketSLA::GetDropDown($TICKET_SITE); echo SelectBox("SLA_ID", $rsSLA, "", $TICKET_SLA, "onChange=\"OnSLAChange(this[this.selectedIndex].value)\" id=\"SLA_ID\""); if ($can_select_responsible == "Y") { ?> <a id="icon_2" title="<?php echo GetMessage("SUP_RESPONSIBLE_SELECT_BY_SLA_ALT"); ?> " href="javascript:SetResponsible('SLA_ID')"><img src="/bitrix/images/support/resp.gif" width="16" height="16" border="0" alt="<?php echo GetMessage("SUP_RESPONSIBLE_SELECT_BY_SLA_ALT"); ?> "></a><?php } ?> </td> </tr> <script type="text/javascript">
?> </textarea><?php } ?> </td> </tr> <?php } ?> <tr> <td><?php echo GetMessage("FLOW_ADMIN"); ?> </td> <td><?php echo SelectBox("WORKFLOW_ADMIN_GROUP_ID", CGroup::GetDropDownList(""), GetMessage("MAIN_NO"), htmlspecialcharsbx($WORKFLOW_ADMIN_GROUP_ID)); ?> </td> </tr> <?php $tabControl->BeginNextTab(); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/admin/group_rights.php"; $tabControl->Buttons(); ?> <input <?php if ($WORKFLOW_RIGHT < "W") { echo "disabled"; } ?> type="submit" name="Update" value="<?php
if (strSourceValue!="NOT_REF") { document.getElementById("OWNER_SID").disabled = false; document.getElementById("OWNER_SID").style.display = "inline"; } } //--> </SCRIPT> <tr valign="middle"> <td width="20%" nowrap><?php echo GetMessage("SUP_SOURCE") . " / " . GetMessage("SUP_FROM"); ?> </td> <td width="80%" nowrap><?php echo SelectBox("SOURCE_ID", CTicket::GetRefBookValues("SR", $arTicket["LID"]), "< web >", $str_SOURCE_ID, "OnChange=SelectSource() "); ?> <input type="text" size="12" name="OWNER_SID" id="OWNER_SID" value="<?php echo $str_OWNER_SID; ?> "><?php echo FindUserID("OWNER_USER_ID", $str_OWNER_USER_ID); ?> </td> </tr> <SCRIPT LANGUAGE="JavaScript"> <!-- SelectSource(); //--> </SCRIPT> <tr valign="top">
public function ShowResultStatusForm() { if ($this->isResultStatusChangeAccess()) { return SelectBox("status_" . $this->arForm["SID"], CFormStatus::GetDropdown($this->WEB_FORM_ID, array("MOVE"), $this->arResult["USER_ID"]), " ", "", ""); } else { return ""; } }
</td> </tr> <?php } ?> <?php if (!$bSimple) { ?> <tr> <td><?php echo GetMessage("FORM_F_STATUS"); ?> </td> <td><?php echo SelectBox("find_status", CFormStatus::GetDropdown($WEB_FORM_ID, array("VIEW")), GetMessage("FORM_ALL"), htmlspecialcharsbx($find_status)); ?> </td> </tr> <tr> <td> <?php echo GetMessage("FORM_F_STATUS_ID"); ?> </td> <td><?php echo CForm::GetTextFilter("status_id"); ?> </td> </tr> <?php