コード例 #1
0
function getLanguagesAdminContent()
{
    global $action;
    $content = '';
    switch ($action) {
        case 'edit':
            $ID = (int) $_REQUEST['ID'];
            $content .= getEdit($ID);
            break;
        case 'add':
            $content .= getAdd();
            break;
        default:
            $content .= getList();
            break;
    }
    return $content;
}
コード例 #2
0
function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $ret = '';
    switch ($action) {
        case 'edit':
            $ret .= getEdit();
            break;
        case 'add':
            $ret .= getAdd();
            break;
        default:
            $ret .= getList();
            break;
    }
    return $ret;
}
コード例 #3
0
function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $content = '';
    switch ($action) {
        case 'edit':
            $ID = (int) $_REQUEST['ID'];
            $content .= getEdit($ID);
            break;
        case 'add':
            $content .= getAdd();
            break;
        default:
            $content .= getList();
            break;
    }
    return $content;
}
コード例 #4
0
 * It has template system and no limit to usage with free for any changes.
 *
 * Copyright (c) 2009
 */
include "../include_php/admin_init.php";
include "../include_php/TemplVotingView.php";
$smarty->assign("site_title", "Edit email templates :: Admin Panel :: " . $gConfig['site_title']);
$smarty->assign("page_header_text", "Edit email templates");
if (isset($_POST['go'])) {
    $q = mysql_query("select * from LTemplates order by ID");
    while ($arr = mysql_fetch_assoc($q)) {
        mysql_query("update LTemplates set text='" . mysql_escape_string($_POST['text' . $arr['ID']]) . "',subj='" . mysql_escape_string($_POST['subj' . $arr['ID']]) . "' where ID=" . $arr['ID']);
    }
    header("location: /admin/letters.php");
}
$smarty->assign("page_content", getEdit());
$smarty->display('index.tpl');
function getEdit()
{
    global $site;
    $ret = '<form method="POST">';
    $arr = mysql_fetch_assoc(mysql_query("select * from LTemplates where ID=4"));
    $ret .= '<b>Notify for member</b><br>
	Subject<br>
	<input type="text" name="subj4" value="' . $arr['subj'] . '"><br>
	Text<bR>
	<textarea name="text4" style="width:500px;height:100px;">' . $arr['text'] . '</textarea><br><br>
	<b>Special variables:</b><br>
	{TO_NAME} - Recipient name.<br>
	{FROM_NAME} - Sender name.<br>
	{FROM_MAIL} - Sender email.<br>