예제 #1
0
function at_admin_entrypage($vars)
{
    extract($vars);
    if (!$template) {
        $template = "entrypage.html";
    }
    $admin = $all = $loggedin = $anonymous = "";
    switch ($type) {
        case "admin":
            $admin = "selected";
            break;
        case "all":
            $all = "selected";
            break;
        case "loggedin":
            $loggedin = "selected";
            break;
        default:
            $anonymous = "selected";
            break;
    }
    $themepath = at_gettheme_path($themedir);
    $filelist = at_listfiles($themepath, "htm");
    $output = "<table><tr><td>" . _AT_TEMPLATE . "</td>" . at_file_select($themedir, "template", $template, $filelist) . "</tr></table>" . _AT_APPLIESTO . " <select name=\"type\">\n" . "<option {$admin} value=\"admin\">" . _AT_ADMIN . "</option>\n" . "<option {$all} value=\"all\">" . _AT_ALL . "</option>\n" . "<option {$anonymous} value=\"anonymous\">" . _AT_ANONYMOUS . "</option>\n" . "<option {$loggedin} value=\"loggedin\">" . _AT_LOGGEDIN . "</option>\n" . "</select>\n";
    return $output;
}
예제 #2
0
function at_admin_maintenance($vars)
{
    extract($vars);
    $themepath = at_gettheme_path($themedir);
    $filelist = at_listfiles($themepath, "htm");
    $output = "<table><tr><td>" . _AT_TEMPLATE . "</td>" . at_file_select($themedir, "template", $template, $filelist) . "</tr></table>";
    return $output;
}
예제 #3
0
function AutoTheme_admin_generalform($var, $formvars)
{
    $autoconfig = atGetAutoConfig();
    extract($autoconfig);
    $var = atExportVar($var);
    extract($var);
    if (@file_exists(AT_DIRPREFIX . "themes/{$themedir}/theme.cfg")) {
        include AT_DIRPREFIX . "themes/{$themedir}/theme.cfg";
        $filelist = at_listfiles(AT_DIRPREFIX . "themes/{$themedir}", "htm");
        $csslist = at_listfiles(AT_DIRPREFIX . "themes/{$themedir}", "css");
        $imglist = array_merge((array) at_listfiles(AT_DIRPREFIX . "themes/{$themedir}", "gif"), (array) at_listfiles(AT_DIRPREFIX . "themes/{$themedir}", "jpg"), (array) at_listfiles(AT_DIRPREFIX . "themes/{$themedir}", "png"));
    } elseif (@file_exists("{$themedir}/theme.cfg")) {
        include "{$themedir}/theme.cfg";
        $filelist = at_listfiles($themedir, "htm");
        $csslist = at_listfiles($themedir, "css");
        $imglist = array_merge((array) at_listfiles($themedir, "gif"), (array) at_listfiles($themedir, "jpg"), (array) at_listfiles($themedir, "png"));
    }
    $templist = at_listfiles($atdir . "templates/{$platform}", "htm");
    extract($formvars);
    extract($config);
    $ysh = $nsh = $yalt = $nalt = $yleft = $nleft = $ycenter = $ncenter = $yright = $nright = "";
    if ($striphead) {
        $ysh = "checked";
    } else {
        $nsh = "checked";
    }
    if ($altsummary) {
        $yalt = "checked";
    } else {
        $nalt = "checked";
    }
    if ($left) {
        $yleft = "checked";
    } else {
        $nleft = "checked";
    }
    if ($center) {
        $ycenter = "checked";
    } else {
        $ncenter = "checked";
    }
    if ($right) {
        $yright = "checked";
    } else {
        $nright = "checked";
    }
    if (!isset($modops)) {
        $modops = "default";
    }
    if (isset($thememod)) {
        $thisfrm = $thememod;
        $def = $thememod;
        $blockshow = _AT_BLOCKSHOW;
        $temp = $thememod;
    } else {
        $thisfrm = _AT_MAIN;
        $def = _AT_DEF;
        $blockshow = _AT_BLOCKDEFAULT;
        $temp = "default";
    }
    atAdminOpenTable();
    echo "<form name=\"general\" method=\"POST\" action=\"" . AT_ADMINPAGE . "\">\n";
    if (isset($thememod)) {
        echo "  <input type=\"hidden\" name=\"op\" value=\"updatemod\">\n" . "  <input type=\"hidden\" name=\"thememod\" value=\"{$thememod}\">\n" . "  <input type=\"hidden\" name=\"modops\" value=\"{$modops}\">\n";
    } else {
        echo "  <input type=\"hidden\" name=\"op\" value=\"updategeneral\">\n";
    }
    echo "  <input type=\"hidden\" name=\"module\" value=\"" . $GLOBALS['module'] . "\">\n" . "  <input type=\"hidden\" name=\"themedir\" value=\"{$themedir}\">\n" . "  <table border=\"0\" width=\"100%\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" cellspacing=\"0\">\n" . "    <tr>\n" . "      <td><b>{$def} " . _AT_THEME . " " . _AT_TEMPLATES . "</b></td>\n" . "      <td><b>" . _AT_FILENAME . "</b></td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_DTDTEMPLATE . "</td>\n" . at_file_select($atdir . "templates/doctype", "dtd", $temps['dtd'], $templist, 0, 0) . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_PAGETEMPLATE . "</td>\n" . at_file_select($themedir, "main", $temps['main'], $filelist) . "      <td><b>" . _AT_STRIPTOHEAD . "</b></td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td><input type=\"radio\" name=\"striphead\" value=\"1\" {$ysh}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"striphead\" value=\"0\" {$nsh}>" . _AT_NO . "</td>\n" . "    </tr>\n";
    if (!isset($thememod) || $thememod == "News" || $thememod == "*HomePage") {
        echo "    <tr>\n" . "      <td>" . _AT_SUMMARY . " " . _AT_ARTICLE . "</td>\n" . at_file_select($themedir, "summary", $temps['summary'], $filelist) . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_FIRST . " " . _AT_ALTERNATING . " " . _AT_SUMMARY . "</td>\n" . at_file_select($themedir, "summary1", $temps['summary1'], $filelist) . "      <td><b>" . _AT_ALTSUMMARY . "</b></td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_SECOND . " " . _AT_ALTERNATING . " " . _AT_SUMMARY . "</td>\n" . at_file_select($themedir, "summary2", $temps['summary2'], $filelist) . "      <td><input type=\"radio\" name=\"altsummary\" value=\"1\" {$yalt}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"altsummary\" value=\"0\" {$nalt}>" . _AT_NO . "</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_FULL . " " . _AT_ARTICLE . "</td>\n" . at_file_select($themedir, "article", $temps['article'], $filelist) . "      <td>&nbsp;</td>\n" . "    </tr>\n";
    } else {
        echo "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n";
    }
    echo "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td><b>{$blockshow}</b></td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_LEFT . " " . _AT_BLOCKS . "</td>\n" . at_file_select($themedir, "leftblock", $temps['leftblock'], $filelist) . "      <td><input type=\"radio\" name=\"left\" value=\"1\" {$yleft}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"left\" value=\"0\" {$nleft}>" . _AT_NO . "</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_CENTER . " " . _AT_BLOCKS . "</td>\n" . at_file_select($themedir, "centerblock", $temps['centerblock'], $filelist) . "      <td><input type=\"radio\" name=\"center\" value=\"1\" {$ycenter}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"center\" value=\"0\" {$ncenter}>" . _AT_NO . "</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_RIGHT . " " . _AT_BLOCKS . "</td>\n" . at_file_select($themedir, "rightblock", $temps['rightblock'], $filelist) . "      <td><input type=\"radio\" name=\"right\" value=\"1\" {$yright}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"right\" value=\"0\" {$nright}>" . _AT_NO . "</td>\n" . "    </tr>\n";
    if ($autoblock) {
        ksort($autoblock);
        if (isset($thememod)) {
            foreach ($autoblock as $key => $ablock) {
                if ($blockdisplay[$temp][$modops]["autoblock" . $key]) {
                    $yes = "checked";
                    $no = "";
                } else {
                    $yes = "";
                    $no = "checked";
                }
                echo "    <tr>\n" . "      <td>{$ablock} " . _AT_BLOCKS . "</td>\n" . at_file_select($themedir, "autoblock" . $key, $temps["autoblock" . $key], $filelist) . "      <td><input type=\"radio\" name=\"ablockdis[{$key}]\" value=\"1\" {$yes}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"ablockdis[{$key}]\" value=\"0\" {$no}>" . _AT_NO . "</td>\n" . "    </tr>\n";
            }
        } else {
            foreach ($autoblock as $key => $ablock) {
                if ($blockdisplay[$temp]["autoblock" . $key]) {
                    $yes = "checked";
                    $no = "";
                } else {
                    $yes = "";
                    $no = "checked";
                }
                echo "    <tr>\n" . "      <td>{$ablock} " . _AT_BLOCKS . "</td>\n" . at_file_select($themedir, "autoblock" . $key, $temps["autoblock" . $key], $filelist) . "      <td><input type=\"radio\" name=\"ablockdis[{$key}]\" value=\"1\" {$yes}>" . _AT_YES . "\n" . "          <input type=\"radio\" name=\"ablockdis[{$key}]\" value=\"0\" {$no}>" . _AT_NO . "</td>\n" . "    </tr>\n";
            }
        }
    }
    echo "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_FIRST . " " . _AT_TBL . "</td>\n" . at_file_select($themedir, "table1", $temps['table1'], $filelist) . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_SECOND . " " . _AT_TBL . "</td>\n" . at_file_select($themedir, "table2", $temps['table2'], $filelist) . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_STYLESHEET . "</td>\n" . at_file_select($themedir, "stylesheet", $stylesheet, $csslist, 0, 0) . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_LOGO . " " . _AT_IMG . "</td>\n" . at_file_select($themedir, "logoimg", $logoimg, $imglist, 0, 0) . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td><b>{$def} " . _AT_THEME . " " . _AT_COLORS . "</b></td>\n" . "      <td><b>" . _AT_COLOR . "</b></td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_BG . " " . _AT_COLOR . " 1</td>\n" . "      <td><input type=\"text\" name=\"color1\" size=\"7\" value=\"{$color1}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color1'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td bgcolor=\"{$color1}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_BG . " " . _AT_COLOR . " 2</td>\n" . "      <td><input type=\"text\" name=\"color2\" size=\"7\" value=\"{$color2}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color2'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td bgcolor=\"{$color2}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_BG . " " . _AT_COLOR . " 3</td>\n" . "      <td><input type=\"text\" name=\"color3\" size=\"7\" value=\"{$color3}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color3'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td bgcolor=\"{$color3}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_BG . " " . _AT_COLOR . " 4</td>\n" . "      <td><input type=\"text\" name=\"color4\" size=\"7\" value=\"{$color4}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color4'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td bgcolor=\"{$color4}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TXT . " " . _AT_COLOR . " 1</td>\n" . "      <td><input type=\"text\" name=\"color5\" size=\"7\" value=\"{$color5}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color5'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td bgcolor=\"{$color5}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TXT . " " . _AT_COLOR . " 2</td>\n" . "      <td><input type=\"text\" name=\"color6\" size=\"7\" value=\"{$color6}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color6'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td  bgcolor=\"{$color6}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TBL . " " . _AT_BORDER . " " . _AT_COLOR . " 1</td>\n" . "      <td><input type=\"text\" name=\"color7\" size=\"7\" value=\"{$color7}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color7'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td  bgcolor=\"{$color7}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TBL . " " . _AT_BG . " " . _AT_COLOR . " 1</td>\n" . "      <td><input type=\"text\" name=\"color8\" size=\"7\" value=\"{$color8}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color8'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td  bgcolor=\"{$color8}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TBL . " " . _AT_BORDER . " " . _AT_COLOR . " 2</td>\n" . "      <td><input type=\"text\" name=\"color9\" size=\"7\" value=\"{$color9}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color9'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td  bgcolor=\"{$color9}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>" . _AT_TBL . " " . _AT_BG . " " . _AT_COLOR . " 2</td>\n" . "      <td><input type=\"text\" name=\"color10\" size=\"7\" value=\"{$color10}\"><a href=\"javascript:TCP.popup(document.forms['general'].elements['color10'], 0)\">" . _AT_SELECT . "</a></td>\n" . "      <td  bgcolor=\"{$color10}\">&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td colspan=\"3\"><b>{$def} " . _AT_HEAD . " " . _AT_CONTENT . "</b><br />\n" . "<textarea type=\"text\" wrap=\"virtual\" rows=\"5\" style=\"width: 100%\" name=\"head\">\n" . htmlentities($head) . "</textarea></td>\n" . "    </tr>\n" . "    <tr>\n" . "      <td><br /><input type=\"submit\" value=\"" . _AT_SAVE . "\" name=\"B1\"></td>\n" . "      <td>&nbsp;</td>\n" . "      <td>&nbsp;</td>\n" . "    </tr>\n" . "  </table>\n" . "</form>\n";
    atAdminCloseTable();
}
예제 #4
0
function at_admin_transitionpages($vars)
{
    extract($vars);
    $themepath = at_gettheme_path($themedir);
    $filelist = at_listfiles($themepath, "htm");
    $admin = $all = $loggedin = $anonymous = $yes = $no = "";
    if ($visits < 2) {
        $visits = 0;
    }
    if ($rotate) {
        $yes = "checked";
    } else {
        $no = "checked";
    }
    switch ($type) {
        case "admin":
            $admin = "selected";
            break;
        case "all":
            $all = "selected";
            break;
        case "loggedin":
            $loggedin = "selected";
            break;
        default:
            $anonymous = "selected";
            break;
    }
    $i = 0;
    if (is_array($template)) {
        foreach ($template as $val) {
            $output .= "<table><tr><td>" . _AT_TEMPLATE . " " . ++$i . "</td>" . at_file_select($themedir, "template[]", $val, $filelist) . "</tr></table>";
        }
    }
    $output .= "<table><tr><td>" . _AT_TEMPLATE . " " . ++$i . "</td>" . at_file_select($themedir, "template[]", $template, $filelist) . "</tr></table>" . _AT_ROTATE . "<br />" . "<input type=\"radio\" name=\"rotate\" value=\"1\" {$yes}>" . _YES . "\n" . "<input type=\"radio\" name=\"rotate\" value=\"0\" {$no}>" . _NO . "<br />\n" . _AT_VISITS . " <input type=\"text\" size=\"3\" name=\"visits\" value=\"{$visits}\"><br />\n" . _AT_APPLIESTO . " <select name=\"type\">\n" . "<option {$admin} value=\"admin\">" . _AT_ADMIN . "</option>\n" . "<option {$all} value=\"all\">" . _AT_ALL . "</option>\n" . "<option {$anonymous} value=\"anonymous\">" . _AT_ANONYMOUS . "</option>\n" . "<option {$loggedin} value=\"loggedin\">" . _AT_LOGGEDIN . "</option>\n" . "</select>\n";
    return $output;
}