From: <ma...@us...> - 2012-01-08 20:42:10
|
Revision: 8677 http://xoops.svn.sourceforge.net/xoops/?rev=8677&view=rev Author: mageg Date: 2012-01-08 20:42:02 +0000 (Sun, 08 Jan 2012) Log Message: ----------- changes in protector module (in templates admin, define new, etc.) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/advisory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/advisory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/advisory.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/advisory.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -21,19 +21,22 @@ include_once dirname(__FILE__) . '/header.php'; -$xoops = Xoops::getInstance(); - $db = XoopsDatabaseFactory::getDatabaseConnection(); -// beggining of Output -$xoops->header(); +// Call header +$xoops->header('protector_advisory.html'); -$advisoryAdmin = new XoopsModuleAdmin(); -echo $advisoryAdmin->renderNavigation('advisory.php'); -// open table for ADVISORY -echo "<style>dd {margin-left: 32px;}</style>\n"; -echo "<br />\n<div style='border: 2px solid #2F5376;padding:8px;width:95%;' class='bg4'>\n"; +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('advisory.php'); +// Define Stylesheet +$xoops->theme->addStylesheet('media/jquery/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); +// Define scripts +$xoops->theme->addScript($xoops->url('/media/jquery/plugins/jquery.ui.js')); +$xoops->theme->addScript('modules/system/js/admin.js'); + +$i = 0; +// XOOPS_ROOT_PATH // calculate the relative path between XOOPS_ROOT_PATH and XOOPS_TRUST_PATH $root_paths = explode('/', XOOPS_ROOT_PATH); $trust_paths = explode('/', XOOPS_TRUST_PATH); @@ -43,105 +46,112 @@ } } $relative_path = str_repeat('../', count($root_paths) - $i) . implode('/', array_slice($trust_paths, $i)); +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'XOOPS_TRUST_PATH'; +$security_arr[$i]['status'] = '-'; +$security_arr[$i]['info'] = "<img src='" . XOOPS_URL . '/' . htmlspecialchars($relative_path) . "/modules/protector/public_check.png' width='40' height='20' alt='' style='border:1px solid black;' /> <a href='" . XOOPS_URL . '/' . htmlspecialchars($relative_path) . "/modules/protector/public_check.php'>" . _AM_ADV_TRUSTPATHPUBLICLINK . "</a>"; +$security_arr[$i]['text'] = _AM_ADV_TRUSTPATHPUBLIC; +$i++; -// the path of XOOPS_TRUST_PATH accessible check -echo "<dl><dt>'XOOPS_TRUST_PATH' : "; -echo "<img src='" . XOOPS_URL . '/' . htmlspecialchars($relative_path) . "/modules/protector/public_check.png' width='40' height='20' alt='' style='border:1px solid black;' /><br /><a href='" . XOOPS_URL . '/' . htmlspecialchars($relative_path) . "/modules/protector/public_check.php'>" . _AM_ADV_TRUSTPATHPUBLICLINK . "</a></dt>\n"; -echo "<dd>" . _AM_ADV_TRUSTPATHPUBLIC . "</b><br /><br /></dd></dl>"; - // register_globals -echo "<dl><dt>'register_globals' : "; $safe = !ini_get("register_globals"); +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'register_globals'; if ($safe) { - echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>register_globals: off</span>"; } else { - echo "on <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd><br /><br />" . _AM_ADV_REGISTERGLOBALS . "<br /><br /> - " . XOOPS_ROOT_PATH . "/.htaccess<br /><br /> - " . _AM_ADV_REGISTERGLOBALS2 . "<br /><br /> - <b>php_flag register_globals off - </dd>"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>register_globals: on</span>"; } -echo "</b><br /><br /></dl>\n"; +$security_arr[$i]['text'] = _AM_ADV_REGISTERGLOBALS . "<br /><br />" . XOOPS_ROOT_PATH . "/.htaccess<br /><br />" . _AM_ADV_REGISTERGLOBALS2 . "<br /><br /><b>php_flag register_globals off</b>"; +$i++; // allow_url_fopen -echo "<dl><dt>'allow_url_fopen' : "; $safe = !ini_get("allow_url_fopen"); +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'allow_url_fopen'; if ($safe) { - echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>allow_url_fopen: off</span>"; } else { - echo "on <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd>" . _AM_ADV_ALLOWURLFOPEN . "</dd>"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>allow_url_fopen: on</span>"; } -echo "</b><br /><br /></dl>\n"; +$security_arr[$i]['text'] = _AM_ADV_ALLOWURLFOPEN; +$i++; // session.use_trans_sid -echo "<dl><dt>'session.use_trans_sid' : "; $safe = !ini_get("session.use_trans_sid"); +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'session.use_trans_sid'; if ($safe) { - echo "off <span style='color:green;font-weight:bold;'>OK</span></dt>\n"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>session.use_trans_sid: off</span>"; } else { - echo "on <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd>" . _AM_ADV_USETRANSSID . "</dd>"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>session.use_trans_sid: on</span>"; } -echo "</b><br /><br /></dl>\n"; +$security_arr[$i]['text'] = _AM_ADV_USETRANSSID; +$i++; // XOOPS_DB_PREFIX -echo "<dl><dt>'XOOPS_DB_PREFIX' : "; $safe = strtolower(XOOPS_DB_PREFIX) != 'xoops'; +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'XOOPS_DB_PREFIX'; if ($safe) { - echo XOOPS_DB_PREFIX . " <span style='color:green;font-weight:bold;'>OK</span></dt>\n<dd>"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>XOOPS_DB_PREFIX: " . XOOPS_DB_PREFIX . "</span>"; } else { - echo XOOPS_DB_PREFIX . " <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd>" . _AM_ADV_DBPREFIX . "<br />\n"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>XOOPS_DB_PREFIX: " . XOOPS_DB_PREFIX . "</span> <a href='prefix_manager.php'>" . _AM_ADV_LINK_TO_PREFIXMAN . "</a>"; } -echo "<a href='index.php?page=prefix_manager'>" . _AM_ADV_LINK_TO_PREFIXMAN . "</a></dd>"; -echo "</b><br /><br /></dl>\n"; +$security_arr[$i]['text'] = _AM_ADV_DBPREFIX; +$i++; // patch to mainfile.php -echo "<dl><dt>'mainfile.php' : "; +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'mainfile.php'; if (!defined('PROTECTOR_PRECHECK_INCLUDED')) { - echo "missing precheck <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd>" . _AM_ADV_MAINUNPATCHED . "</dd>"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>missing precheck</span>"; } else { if (!defined('PROTECTOR_POSTCHECK_INCLUDED')) { - echo "missing postcheck <span style='color:red;font-weight:bold;'>" . _AM_ADV_NOTSECURE . "</span></dt>\n"; - echo "<dd>" . _AM_ADV_MAINUNPATCHED . "</dd>"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>missing postcheck</span>"; } else { - echo "patched <span style='color:green;font-weight:bold;'>OK</span></dt>\n"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>patched</span>"; } + } -echo "</b><br /><br /></dl>\n"; +$security_arr[$i]['text'] = _AM_ADV_MAINUNPATCHED; +$i++; -// patch to databasefactory.php -echo "<dl><dt>'databasefactory.php' : "; -$db = XoopsDatabaseFactory::getDatabaseConnection(); +// databasefactory.php +$security_arr[$i]['id'] = $i + 1; +$security_arr[$i]['type'] = 'databasefactory.php'; if (substr(@XOOPS_VERSION, 6, 3) < 2.4 && strtolower(get_class($db)) != 'protectormysqldatabase') { - echo "<span style='color:red;font-weight:bold;'>" . _AM_ADV_DBFACTORYUNPATCHED . "</span></dt>\n"; + $security_arr[$i]['status'] = '0'; + $security_arr[$i]['info'] = "<span style='color:red;font-weight:bold;'>" . _AM_ADV_DBFACTORYUNPATCHED . "</span>"; } else { - echo _AM_ADV_DBFACTORYPATCHED . "<span style='color:green;font-weight:bold;'> OK</span></dt>\n"; + $security_arr[$i]['status'] = '1'; + $security_arr[$i]['info'] = "<span style='color:green;font-weight:bold;'>" . _AM_ADV_DBFACTORYPATCHED . "</span>"; } -echo "</dl>\n"; +$security_arr[$i]['text'] = ''; +$i++; -// close table for ADVISORY -echo "</div><br />\n"; +foreach (array_keys($security_arr) as $i) { + $xoops->tpl->append_by_ref('security', $security_arr[$i]); + $xoops->tpl->append_by_ref('popup_security', $security_arr[$i]); +} -// open table for PROTECTION CHECK -echo "<br />\n<div style='border: 2px solid #2F5376;padding:8px;width:95%;' class='bg4'>\n"; - -echo "<h3>" . _AM_ADV_SUBTITLECHECK . "</h3>\n"; // Check contaminations $uri_contami = XOOPS_URL . "/index.php?xoopsConfig%5Bnocommon%5D=1"; -echo "<dl><dt>" . _AM_ADV_CHECKCONTAMI . ":</dt>\n"; -echo "<dd><a href='$uri_contami' target='_blank'>$uri_contami</a></dd>"; -echo "</dl>\n"; +$xoops->tpl->assign('uri_contami', $uri_contami); // Check isolated comments $uri_isocom = XOOPS_URL . "/index.php?cid=" . urlencode(",password /*"); -echo "<dl><dt>" . _AM_ADV_CHECKISOCOM . ":</dt>\n"; -echo "<dd><a href='$uri_isocom' target='_blank'>$uri_isocom</a></dd>"; -echo "</dl>\n"; -// close table for PROTECTION CHECK -echo "</div>\n"; +$xoops->tpl->assign('uri_isocom', $uri_isocom); $xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -23,15 +23,6 @@ require_once dirname(dirname(__FILE__)) . '/class/gtickets.php'; -$xoops = Xoops::getInstance(); - - -//dirty trick to get navigation working with system menus -if (isset($_GET['num'])) { - $_SERVER['REQUEST_URI'] = 'admin/center.php?page=center'; -} - -$myts = MyTextSanitizer::getInstance(); $db = XoopsDatabaseFactory::getDatabaseConnection(); // GET vars @@ -43,7 +34,6 @@ // Protector object require_once dirname(dirname(__FILE__)) . '/class/protector.php'; -$db = XoopsDatabaseFactory::getDatabaseConnection(); $protector = Protector::getInstance($db->conn); $conf = $protector->getConf(); @@ -120,38 +110,12 @@ } } } - -// -// display stage -// - -// query for listing -$rs = $db->query("SELECT count(lid) FROM $log_table"); -list($numrows) = $db->fetchRow($rs); -$prs = $db->query("SELECT l.lid, l.uid, l.ip, l.agent, l.type, l.description, UNIX_TIMESTAMP(l.timestamp), u.uname FROM $log_table l LEFT JOIN " . $db->prefix("users") . " u ON l.uid=u.uid ORDER BY timestamp DESC LIMIT $pos,$num"); - -// Page Navigation -$nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "num=$num"); -$nav_html = $nav->renderNav(10); - -// Number selection -$num_options = ''; -$num_array = array(20, 100, 500, 2000); -foreach ($num_array as $n) { - if ($n == $num) { - $num_options .= "<option value='$n' selected='selected'>$n</option>\n"; - } else { - $num_options .= "<option value='$n'>$n</option>\n"; - } -} - // beggining of Output -$xoops->header(); +$xoops->header('protector_center.html'); +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('center.php'); -$centerAdmin = new XoopsModuleAdmin(); -echo $centerAdmin->renderNavigation('center.php'); - // bad_ips $bad_ips = $protector->get_bad_ips(true); uksort($bad_ips, 'protector_ip_cmp'); @@ -166,74 +130,32 @@ $group1_ips = $protector->get_group1_ips(); usort($group1_ips, 'protector_ip_cmp'); $group1_ips4disp = htmlspecialchars(implode("\n", $group1_ips), ENT_QUOTES); - // edit configs about IP ban and IPs for group=1 -echo " -<form name='ConfigForm' action='' method='POST'> -" . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'protector_admin') . " -<input type='hidden' name='action' value='update_ips' /> -<table width='95%' class='outer' cellpadding='4' cellspacing='1'> - <tr valign='top' align='left'> - <td class='head'> - " . _AM_TH_BADIPS . " - </td> - <td class='even'> - <textarea name='bad_ips' id='bad_ips' style='width:200px;height:60px;'>$bad_ips4disp</textarea> - <br /> - " . htmlspecialchars($protector->get_filepath4badips()) . " - </td> - </tr> - <tr valign='top' align='left'> - <td class='head'> - " . _AM_TH_GROUP1IPS . " - </td> - <td class='even'> - <textarea name='group1_ips' id='group1_ips' style='width:200px;height:60px;'>$group1_ips4disp</textarea> - <br /> - " . htmlspecialchars($protector->get_filepath4group1ips()) . " - </td> - </tr> - <tr valign='top' align='left'> - <td class='head'> - </td> - <td class='even'> - <input type='submit' value='" . _GO . "' /> - </td> - </tr> -</table> -</form> -"; - +$xoops->tpl->assign('ticket', $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'protector_admin')); +$xoops->tpl->assign('bad_ips4disp', $bad_ips4disp); +$xoops->tpl->assign('filepath4badips', htmlspecialchars($protector->get_filepath4badips())); +$xoops->tpl->assign('group1_ips4disp', $group1_ips4disp); +$xoops->tpl->assign('filepath4group1ips', htmlspecialchars($protector->get_filepath4group1ips())); // header of log listing -echo " -<table width='95%' border='0' cellpadding='4' cellspacing='0'><tr><td> -<form action='' method='GET' style='margin-bottom:0px;'> - <table width='95%' border='0' cellpadding='4' cellspacing='0'> - <tr> - <td align='left'> - <select name='num' onchange='submit();'>$num_options</select> - <input type='submit' value='" . _SUBMIT . "'> - </td> - <td align='right'> - $nav_html - </td> - </tr> - </table> -</form> -<form name='MainForm' action='' method='POST' style='margin-top:0px;'> -" . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'protector_admin') . " -<input type='hidden' name='action' value='' /> -<table width='95%' class='outer' cellpadding='4' cellspacing='1'> - <tr valign='middle'> - <th width='5'><input type='checkbox' name='dummy' onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=this.checked;}}}\" /></th> - <th>" . _AM_TH_DATETIME . "</th> - <th>" . _AM_TH_USER . "</th> - <th>" . _AM_TH_IP . "<br />" . _AM_TH_AGENT . "</th> - <th>" . _AM_TH_TYPE . "</th> - <th>" . _AM_TH_DESCRIPTION . "</th> - </tr> -"; - +// query for listing +$rs = $db->query("SELECT count(lid) FROM $log_table"); +list($numrows) = $db->fetchRow($rs); +$prs = $db->query("SELECT l.lid, l.uid, l.ip, l.agent, l.type, l.description, UNIX_TIMESTAMP(l.timestamp), u.uname FROM $log_table l LEFT JOIN " . $db->prefix("users") . " u ON l.uid=u.uid ORDER BY timestamp DESC LIMIT $pos,$num"); +// Number selection +$num_options = ''; +$num_array = array(20, 100, 500, 2000); +foreach ($num_array as $n) { + if ($n == $num) { + $num_options .= "<option value='$n' selected='selected'>$n</option>\n"; + } else { + $num_options .= "<option value='$n'>$n</option>\n"; + } +} +$xoops->tpl->assign('num_options', $num_options); +// Page Navigation +$nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "num=$num"); +$nav_html = $nav->renderNav(10); +$xoops->tpl->assign('nav_html', $nav_html); // body of log listing $oddeven = 'odd'; while (list($lid, $uid, $ip, $agent, $type, $description, $timestamp, $uname) = $db->fetchRow($prs)) { @@ -256,37 +178,19 @@ } $agent4disp = htmlspecialchars($agent, ENT_QUOTES); $agent_desc = $agent == $agent_short ? $agent4disp : htmlspecialchars($agent_short, ENT_QUOTES) . "<img src='../images/dotdotdot.gif' alt='$agent4disp' title='$agent4disp' />"; - - echo " - <tr> - <td class='$oddeven'><input type='checkbox' name='ids[]' value='$lid' /></td> - <td class='$oddeven'>" . XoopsLocal::formatTimestamp($timestamp) . "</td> - <td class='$oddeven'>$uname</td> - <td class='$oddeven'>$ip<br />$agent_desc</td> - <td class='$oddeven'>$type</td> - <td class='$oddeven' width='100%'>$description</td> - </tr>\n"; + + $log_arr['lid'] = $lid; + $log_arr['date'] = XoopsLocal::formatTimestamp($timestamp); + $log_arr['uname'] = $uname; + $log_arr['ip'] = $ip; + $log_arr['agent_desc'] = $agent_desc; + $log_arr['type'] = $type; + $log_arr['description'] = $description; + + $xoops->tpl->append_by_ref('log', $log_arr); + unset($table_arr); } -// footer of log listing -echo " - <tr> - <td colspan='8' align='left'>" . _AM_LABEL_REMOVE . "<input type='button' value='" . _AM_BUTTON_REMOVE . "' onclick='if(confirm(\"" . _AM_JS_REMOVECONFIRM . "\")){document.MainForm.action.value=\"delete\"; submit();}' /></td> - </tr> -</table> -<div align='right'> - $nav_html -</div> -<div style='clear:both;'><br /><br /></div> -<div align='right'> -" . _AM_LABEL_COMPACTLOG . "<input type='button' value='" . _AM_BUTTON_COMPACTLOG . "' onclick='if(confirm(\"" . _AM_JS_COMPACTLOGCONFIRM . "\")){document.MainForm.action.value=\"compactlog\"; submit();}' /> - -" . _AM_LABEL_REMOVEALL . "<input type='button' value='" . _AM_BUTTON_REMOVEALL . "' onclick='if(confirm(\"" . _AM_JS_REMOVEALLCONFIRM . "\")){document.MainForm.action.value=\"deleteall\"; submit();}' /> -</div> -</form> -</td></tr></table> -"; - $xoops->footer(); function protector_ip_cmp($a, $b) @@ -297,4 +201,4 @@ $bval = @$bs[0] * 167777216 + @$bs[1] * 65536 + @$bs[2] * 256 + @$bs[3]; return $aval > $bval ? 1 : -1; -} +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -45,5 +45,4 @@ 'link' => 'admin/about.php', 'icon' => $pathIcon32 . '/about.png', ), -); -?> +); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/prefix_manager.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -21,16 +21,18 @@ include_once dirname(__FILE__) . '/header.php'; -$xoops = Xoops::getInstance(); - require_once dirname(dirname(__FILE__)) . '/class/gtickets.php'; $db = XoopsDatabaseFactory::getDatabaseConnection(); +$xoops->header('protector_prefix.html'); +$error = ''; // COPY TABLES if (!empty($_POST['copy']) && !empty($_POST['old_prefix'])) { if (preg_match('/[^0-9A-Za-z_-]/', $_POST['new_prefix'])) { - die('wrong prefix'); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_WP); + $xoops->footer(); + exit; } // Ticket check @@ -44,7 +46,9 @@ $srs = $db->queryF('SHOW TABLE STATUS FROM `' . XOOPS_DB_NAME . '`'); if (!$db->getRowsNum($srs)) { - die("You are not allowed to copy tables"); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_NACT); + $xoops->footer(); + exit; } $count = 0; @@ -59,7 +63,7 @@ $crs = $db->queryF('SHOW CREATE TABLE ' . $old_table); if (!$db->getRowsNum($crs)) { - echo "error: SHOW CREATE TABLE ($old_table)<br />\n"; + $error .= sprintf(_AM_PROTECTOR_PREFIX_ERROR_SCT, $old_table) . '<br />'; continue; } $row_create = $db->fetchArray($crs); @@ -67,26 +71,32 @@ $crs = $db->queryF($create_sql); if (!$crs) { - echo "error: CREATE TABLE ($new_table)<br />\n"; + $error .= sprintf(_AM_PROTECTOR_PREFIX_ERROR_CT, $new_table) . '<br />'; continue; } $irs = $db->queryF("INSERT INTO `$new_table` SELECT * FROM `$old_table`"); if (!$irs) { - echo "error: INSERT INTO ($new_table)<br />\n"; + $error .= sprintf(_AM_PROTECTOR_PREFIX_ERROR_II, $new_table) . '<br />'; continue; } } $_SESSION['protector_logger'] = $xoops->logger->dump('queries'); - - $xoops->redirect('prefix_manager.php', 1, _AM_MSG_DBUPDATED); + + if ( $error != '' ) { + $xoops->tpl->assign('error', $error); + $xoops->footer(); + } else { + $xoops->redirect('prefix_manager.php', 1, _AM_MSG_DBUPDATED); + } // DUMP INTO A LOCAL FILE } else { if (!empty($_POST['backup']) && !empty($_POST['prefix'])) { - if (preg_match('/[^0-9A-Za-z_-]/', $_POST['prefix'])) { - die('wrong prefix'); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_WP); + $xoops->footer(); + exit; } // Ticket check @@ -98,8 +108,10 @@ // get table list $srs = $db->queryF('SHOW TABLE STATUS FROM `' . XOOPS_DB_NAME . '`'); - if (!$db->getRowsNum($srs)) { - die("You are not allowed to delete tables"); + if (!$db->getRowsNum($srs)) { + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_NADT); + $xoops->footer(); + exit; } $export_string = ''; @@ -167,7 +179,9 @@ if (!empty($_POST['delete']) && !empty($_POST['prefix'])) { if (preg_match('/[^0-9A-Za-z_-]/', $_POST['prefix'])) { - die('wrong prefix'); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_WP); + $xoops->footer(); + exit; } // Ticket check @@ -179,19 +193,25 @@ // check if prefix is working if ($prefix == XOOPS_DB_PREFIX) { - die("You can't drop working tables"); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_CTDWT); + $xoops->footer(); + exit; } // check if prefix_xoopscomments exists $check_rs = $db->queryF("SELECT * FROM {$prefix}_xoopscomments LIMIT 1"); - if (!$check_rs) { - die("This is not a prefix for XOOPS"); + if (!$check_rs) { + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_NPX); + $xoops->footer(); + exit; } // get table list $srs = $db->queryF('SHOW TABLE STATUS FROM `' . XOOPS_DB_NAME . '`'); if (!$db->getRowsNum($srs)) { - die("You are not allowed to delete tables"); + $xoops->tpl->assign('error', _AM_PROTECTOR_PREFIX_ERROR_NADT); + $xoops->footer(); + exit; } while ($row_table = $db->fetchArray($srs)) { @@ -210,14 +230,24 @@ } // beggining of Output -$xoops->header(); -$prefix_managerAdmin = new XoopsModuleAdmin(); -echo $prefix_managerAdmin->renderNavigation('prefix_manager.php'); + +$admin_page = new XoopsModuleAdmin(); +$admin_page->renderNavigation('prefix_manager.php'); + +$xoops->tpl->assign('prefix', sprintf(_AM_TXT_HOWTOCHANGEDB, XOOPS_VAR_PATH . "/data/secure.php")); +$xoops->tpl->assign('prefix_line', sprintf(_AM_PROTECTOR_PREFIX_CHANGEDBLINE, XOOPS_DB_PREFIX)); + +// Display Log if exists +if (!empty($_SESSION['protector_logger'])) { + $xoops->tpl->assign('protector_logger', $_SESSION['protector_logger']); + $_SESSION['protector_logger'] = ''; + unset($_SESSION['protector_logger']); +} + // query $srs = $db->queryF("SHOW TABLE STATUS FROM `" . XOOPS_DB_NAME . '`'); if (!$db->getRowsNum($srs)) { - //die("You are not allowed to copy tables"); - echo "You are not allowed to copy tables"; + $xoops->tpl->assign('error', '_AM_PROTECTOR_PREFIX_ERROR_NACT'); $xoops->footer(); exit; } @@ -235,20 +265,8 @@ $tables[] = $row_table["Name"]; } -// table -echo " -<table class='outer' width='95%'> - <tr> - <th>PREFIX</th> - <th>TABLES</th> - <th>UPDATED</th> - <th>COPY</th> - <th>ACTIONS</th> - </tr> -"; - +$xoops->tpl->assign('aff_table', true); foreach ($prefixes as $prefix) { - // count the number of tables with the prefix $table_count = 0; $has_xoopscomments = false; @@ -260,7 +278,6 @@ if (substr($table, 0, strlen($prefix['name']) + 1) === $prefix['name'] . '_') $table_count++; } - // check if prefix_xoopscomments exists if (!$has_xoopscomments) continue; @@ -269,48 +286,18 @@ $ticket_input = $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'protector_admin'); if ($prefix['name'] == XOOPS_DB_PREFIX) { - $del_button = ''; - $style_append = 'background-color:#FFFFFF'; + $del_button = false; } else { - $del_button = "<input type='submit' name='delete' value='delete' onclick='return confirm(\"" . _AM_CONFIRM_DELETE . "\")' />"; - $style_append = ''; + $del_button = true; } - - echo " - <tr> - <td class='odd' style='$style_append;'>$prefix4disp</td> - <td class='odd' style='text-align:right;$style_append;'>$table_count</td> - <td class='odd' style='text-align:right;$style_append;'>{$prefix['updated']}</td> - <td class='odd' style='text-align:center;$style_append;' nowrap='nowrap'> - <form action='?page=prefix_manager' method='POST' style='margin:0px;'> - $ticket_input - <input type='hidden' name='old_prefix' value='$prefix4disp' /> - <input type='text' name='new_prefix' size='8' maxlength='16' /> - <input type='submit' name='copy' value='copy' /> - </form> - </td> - <td class='odd' style='text-align:center;$style_append;'> - <form action='?page=prefix_manager' method='POST' style='margin:0px;'> - $ticket_input - <input type='hidden' name='prefix' value='$prefix4disp' /> - $del_button - <input type='submit' name='backup' value='backup' onclick='this.form.target=\"_blank\"' /> - </form> - </td> - </tr>\n"; + + $table_arr['prefix'] = $prefix4disp; + $table_arr['count'] = $table_count; + $table_arr['update'] = $prefix['updated']; + $table_arr['ticket'] = $ticket_input; + $table_arr['del'] = $del_button; + + $xoops->tpl->append_by_ref('table', $table_arr); + unset($table_arr); } - -echo " -</table> -<p>" . sprintf(_AM_TXT_HOWTOCHANGEDB, XOOPS_ROOT_PATH, XOOPS_DB_PREFIX) . "</p> - -"; - -// Display Log if exists -if (!empty($_SESSION['protector_logger'])) { - echo $_SESSION['protector_logger']; - $_SESSION['protector_logger'] = ''; - unset($_SESSION['protector_logger']); -} - -$xoops->footer(); +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/admin.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/admin.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -1,10 +1,4 @@ <?php - -// mymenu -define('_MD_A_MYMENU_MYTPLSADMIN', ''); -define('_MD_A_MYMENU_MYBLOCKSADMIN', 'Permissions'); -define('_MD_A_MYMENU_MYPREFERENCES', 'Preferences'); - // index.php define("_AM_TH_DATETIME", "Time"); define("_AM_TH_USER", "User"); @@ -33,10 +27,9 @@ define("_AM_FMT_CONFIGSNOTWRITABLE", "Turn the configs directory writable: %s"); // prefix_manager.php -define("_AM_H3_PREFIXMAN", "Prefix Manager"); define("_AM_MSG_DBUPDATED", "Database Updated Successfully!"); define("_AM_CONFIRM_DELETE", "All data will be dropped. OK?"); -define("_AM_TXT_HOWTOCHANGEDB", "If you want to change prefix,<br /> edit %s/mainfile.php manually.<br /><br />define('XOOPS_DB_PREFIX', '<b>%s</b>');"); +define("_AM_TXT_HOWTOCHANGEDB", "If you want to change prefix, edit <b>%s</b> manually"); // advisory.php define("_AM_ADV_NOTSECURE", "Not secure"); @@ -59,4 +52,39 @@ //XOOPS 2.5.4 define("_AM_ADV_REGISTERGLOBALS2", "and place in it the line below:"); -?> \ No newline at end of file +//XOOPS 2.6.0 +/************************************** +- Removed +- _AM_H3_PREFIXMAN +- _MD_A_MYMENU_MYTPLSADMIN +- _MD_A_MYMENU_MYBLOCKSADMIN +- _MD_A_MYMENU_MYPREFERENCES + +* Modified +* _AM_TXT_HOWTOCHANGEDB + +*****************************************/ +// advisory.php +define("_AM_ADV_ACTION", "Action"); +define("_AM_ADV_INFO", "Information"); +define("_AM_ADV_STATUS", "Status"); +define("_AM_ADV_TYPE", "Type of security"); +define("_AM_ADV_VIEW", "Information"); + +// prefix_manager.php +define("_AM_PROTECTOR_PREFIX", "PREFIX"); +define("_AM_PROTECTOR_PREFIX_ACTIONS", "ACTIONS"); +define("_AM_PROTECTOR_PREFIX_CHANGEDB", "Change prefix"); +define("_AM_PROTECTOR_PREFIX_CHANGEDBLINE", "Line: define('XOOPS_DB_PREFIX', '<b>%s</b>');"); +define("_AM_PROTECTOR_PREFIX_COPY", "COPY"); +define("_AM_PROTECTOR_PREFIX_ERROR_CT", "error: CREATE TABLE (%s)"); +define("_AM_PROTECTOR_PREFIX_ERROR_CTDWT", "You can't drop working tables"); +define("_AM_PROTECTOR_PREFIX_ERROR_II", "error: INSERT INTO (%s)"); +define("_AM_PROTECTOR_PREFIX_ERROR_NACT", "You are not allowed to copy tables"); +define("_AM_PROTECTOR_PREFIX_ERROR_NADT", "You are not allowed to delete tables"); +define("_AM_PROTECTOR_PREFIX_ERROR_NPX", "This is not a prefix for XOOPS"); +define("_AM_PROTECTOR_PREFIX_ERROR_SCT", "error: SHOW CREATE TABLE (%s)"); +define("_AM_PROTECTOR_PREFIX_ERROR_WP", "Wrong prefix"); +define("_AM_PROTECTOR_PREFIX_LOG", "Log"); +define("_AM_PROTECTOR_PREFIX_TABLES", "TABLES"); +define("_AM_PROTECTOR_PREFIX_UPDATED", "UPDATED"); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/index.html 2012-01-08 20:42:02 UTC (rev 8677) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html 2012-01-08 20:42:02 UTC (rev 8677) @@ -0,0 +1,55 @@ +<{includeq file="admin:system|admin_navigation.html"}> +<{includeq file="admin:system|admin_tips.html"}> +<table id="xo-advisorylist-sorter" cellspacing="1" class="outer tablesorter"> + <thead> + <tr> + <th class="txtcenter width15"><{$smarty.const._AM_ADV_TYPE}></th> + <th class="txtcenter width5"><{$smarty.const._AM_ADV_STATUS}></th> + <th class="txtcenter"><{$smarty.const._AM_ADV_INFO}></th> + <th class="txtcenter width5"><{$smarty.const._AM_ADV_ACTION}></th> + </tr> + </thead> + <tbody> + <{foreach item=security from=$security}> + <tr class="<{cycle values='even,odd'}>"> + <td class="txtcenter"><{$security.type}></td> + <td class="txtcenter"> + <{if $security.status == '1'}> + <img src="<{xoAdminIcons success.png}>" alt="OK" height="16"/> + <{/if}> + <{if $security.status == '0'}> + <img src="<{xoAdminIcons cancel.png}>" alt="<{$smarty.const._AM_ADV_NOTSECURE}>" height="16"/> + <{/if}> + <{if $security.status == '-'}> + <{$security.status}> + <{/if}> + </td> + <td class="txtleft"><{$security.info}></td> + <td class="xo-actions txtcenter"> + <{if $security.text != ''}> + <img class="tooltip" onclick="display_dialog(<{$security.id}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" title="<{$smarty.const._AM_ADV_VIEW}>" alt="<{$smarty.const._AM_ADV_VIEW}>" /> + <{/if}> + </td> + </tr> + <{/foreach}> + </tbody> +</table> + +<!--Pop-pup--> +<{foreach item=security from=$popup_security}> +<div id="dialog<{$security.id}>" title="<{$security.type}>" style='display:none;'> + <{$security.text}> +</div> +<{/foreach}> +<!--Pop-pup--> + +<fieldset> + <legend class="label" title="<{$box.title}>"><img src="<{$xoops_url}>/media/xoops/images/icons/16/info.png" alt="<{$box.title}>" /> <{$smarty.const._AM_ADV_SUBTITLECHECK}></legend> + <div class="bold spacer"> + <{$smarty.const._AM_ADV_CHECKCONTAMI}>: <a href='<{$uri_contami}>' target='_blank'><{$uri_contami}></a> + </div> + <br /> + <div class="bold spacer"> + <{$smarty.const._AM_ADV_CHECKISOCOM}>: <a href='<{$uri_isocom}>' target='_blank'><{$uri_isocom}></a> + </div> +</fieldset> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html 2012-01-08 20:42:02 UTC (rev 8677) @@ -0,0 +1,112 @@ +<{includeq file="admin:system|admin_navigation.html"}> +<{includeq file="admin:system|admin_tips.html"}> +<form name='ConfigForm' action='center.php' method='post'> + <{$ticket}> + <input type='hidden' name='action' value='update_ips' /> + <table width="100%" cellspacing="1" cellpadding='4' class="outer"> + <thead> + <tr> + <th colspan="2" class="txtcenter"><{$smarty.const._AM_PROTECTOR_PREFIX}></th> + </tr> + </thead> + <tbody> + <tr valign='top' align='left'> + <td class="txtleft width25 head"> + <{$smarty.const._AM_TH_BADIPS}> + </td> + <td class='even'> + <textarea name='bad_ips' id='bad_ips' style='width:200px' rows="3" cols="150"><{$bad_ips4disp}></textarea> + <br /> + <{$filepath4badips}> + </td> + </tr> + <tr valign='top' align='left'> + <td class="txtleft width25 head"> + <{$smarty.const._AM_TH_GROUP1IPS}> + </td> + <td class='even'> + <textarea name='group1_ips' id='group1_ips' style='width:200px' rows="3" cols="150"><{$group1_ips4disp}></textarea> + <br /> + <{$filepath4group1ips}> + </td> + </tr> + <tr valign='top' align='left'> + <td class='head'> </td> + <td class='even'> + <input type='submit' value='<{$smarty.const._GO}>' /> + </td> + </tr> + </tbody> + </table> +</form> + +<form action='center.php' method='get'> + <table width="100%" cellspacing="1" cellpadding='4'> + <tbody> + <tr> + <td align='left'> + <select name='num' onchange='submit();'><{$num_options}></select> + <input type='submit' value='<{$smarty.const._SUBMIT}>' /> + </td> + <td align='right'> + <{$nav_html}> + </td> + </tr> + </tbody> + </table> +</form> + +<form name='MainForm' action='center.php' method='post'> + <{$ticket}> + <input type='hidden' name='action' value='' /> + <table width="100%" cellspacing="1" cellpadding='4' class="outer"> + <thead> + <tr> + <th class="txtcenter width2"> + <input type='checkbox' name='dummy' onclick="with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type=='checkbox'){elements[i].checked=this.checked;}}}" /> + </th> + <th class="txtcenter width10"><{$smarty.const._AM_TH_DATETIME}></th> + <th class="txtcenter width10"><{$smarty.const._AM_TH_USER}></th> + <th class="txtcenter width10"> + <{$smarty.const._AM_TH_IP}> + <br /> + <{$smarty.const._AM_TH_AGENT}> + </th> + <th class="txtcenter width10"><{$smarty.const._AM_TH_TYPE}></th> + <th class="txtcenter"><{$smarty.const._AM_TH_DESCRIPTION}></th> + </tr> + </thead> + <tbody> + <{foreach item=log from=$log}> + <tr class="<{cycle values='even,odd'}>"> + <td class="txtcenter"><input type='checkbox' name='ids[]' value='<{$log.lid}>' /></td> + <td class="txtcenter"><{$log.date}></td> + <td class="txtcenter"><{$log.uname}></td> + <td class="txtleft"><{$log.ip}> + <{$log.ip}> + <br /> + <{$log.agent_desc}> + </td> + <td class="txtcenter"><{$log.type}></td> + <td class="txtleft"><{$log.description}></td> + </tr> + <{/foreach}> + <tr class="odd"> + <td colspan="6" class="txtleft"> + <{$smarty.const._AM_LABEL_REMOVE}> + <input type='button' value='<{$smarty.const._AM_BUTTON_REMOVE}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVECONFIRM}>")){document.MainForm.action.value="delete"; submit();}' /> + </td> + </tr> + </tbody> + </table> + <div align='right'> + <{$nav_html}> + </div> + <br /> + <br /> + <div align='right'> + <{$smarty.const._AM_LABEL_COMPACTLOG}><input type='button' value='<{$smarty.const._AM_BUTTON_COMPACTLOG}>' onclick='if(confirm("<{$smarty.const._AM_JS_COMPACTLOGCONFIRM}>")){document.MainForm.action.value="compactlog"; submit();}' /> + + <{$smarty.const._AM_LABEL_REMOVEALL}><input type='button' value='<{$smarty.const._AM_BUTTON_REMOVEALL}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVEALLCONFIRM}>")){document.MainForm.action.value="deleteall"; submit();}' /> + </div> +</form> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html 2012-01-08 20:42:02 UTC (rev 8677) @@ -0,0 +1,74 @@ +<{includeq file="admin:system|admin_navigation.html"}> +<{includeq file="admin:system|admin_tips.html"}> +<{if $error}> + <div class="errorMsg"> + <{$error}> + </div> +<{/if}> + +<{if $aff_table}> +<table id="xo-advisorylist-sorter" cellspacing="1" class="outer tablesorter"> + <thead> + <tr> + <th class="txtcenter width10"><{$smarty.const._AM_PROTECTOR_PREFIX}></th> + <th class="txtcenter width5"><{$smarty.const._AM_PROTECTOR_PREFIX_TABLES}></th> + <th class="txtcenter"><{$smarty.const._AM_PROTECTOR_PREFIX_UPDATED}></th> + <th class="txtcenter width25"><{$smarty.const._AM_PROTECTOR_PREFIX_COPY}></th> + <th class="txtcenter width25"><{$smarty.const._AM_PROTECTOR_PREFIX_ACTIONS}></th> + </tr> + </thead> + <tbody> + <{foreach item=table from=$table}> + <{if $table.del}> + <tr class="even"> + <{else}> + <tr class="odd"> + <{/if}> + <td class="txtcenter"><{$table.prefix}></td> + <td class="txtcenter"><{$table.count}></td> + <td class="txtcenter"><{$table.update}></td> + <td class="txtcenter"> + <form action='prefix_manager.php' method='post' style='margin:0px;'> + <{$table.ticket}> + <input type='hidden' name='old_prefix' value='<{$table.prefix}>' /> + <input type='text' name='new_prefix' size='8' maxlength='16' /> + <input type='submit' name='copy' value='copy' /> + </form> + </td> + <td class="txtcenter"> + <form action='prefix_manager.php' method='post' style='margin:0px;'> + <{$table.ticket}> + <input type='hidden' name='prefix' value='<{$table.prefix}>' /> + <{if $table.del}> + <input type='submit' name='delete' value='delete' onclick='return confirm("<{$smarty.const._AM_CONFIRM_DELETE}>")' /> + <{/if}> + <input type='submit' name='backup' value='backup' onclick='this.form.target=\"_blank\"' /> + </form> + </td> + </tr> + <{/foreach}> + </tbody> +</table> +<{/if}> + +<{if $prefix}> +<fieldset> + <legend class="label" title="<{$box.title}>"><img src="<{$xoops_url}>/media/xoops/images/icons/16/info.png" alt="<{$box.title}>" /> <{$smarty.const._AM_PROTECTOR_PREFIX_CHANGEDB}></legend> + <div class="spacer"> + <{$prefix}> + </div> + <br /> + <div class="spacer"> + <{$prefix_line}> + </div> +</fieldset> +<{/if}> + +<{if $protector_logger}> +<fieldset> + <legend class="label" title="<{$box.title}>"><img src="<{$xoops_url}>/media/xoops/images/icons/16/info.png" alt="<{$box.title}>" /> <{$smarty.const._AM_PROTECTOR_PREFIX_LOG}></legend> + <div class="spacer"> + <{$protector_logger}> + </div> +</fieldset> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/index.html 2012-01-08 20:42:02 UTC (rev 8677) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php 2012-01-08 17:26:36 UTC (rev 8676) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/xoops_version.php 2012-01-08 20:42:02 UTC (rev 8677) @@ -74,6 +74,11 @@ $modversion['adminindex'] = "admin/index.php"; $modversion['adminmenu'] = "admin/menu.php"; +// Admin Templates +$modversion['templates'][] = array( 'file' => 'protector_advisory.html', 'description' => '', 'type' => 'admin' ); +$modversion['templates'][] = array( 'file' => 'protector_prefix.html', 'description' => '', 'type' => 'admin' ); +$modversion['templates'][] = array( 'file' => 'protector_center.html', 'description' => '', 'type' => 'admin' ); + /* Blocks */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |