Ejemplo n.º 1
0
function error_handler($ibid)
{
    opentable();
    echo "<p class=\"errorhandler\" align=\"center\">" . adm_translate("Merci d'entrer l'information en fonction des spécifications") . "<br /><br />";
    echo "{$ibid}<br /><a href=\"admin.php?op=mod_authors\" class=\"noir\">" . adm_translate("Retour en arrière") . "</a></p>";
    closetable();
}
switch ($op) {
    case 'mod_authors':
        displayadmins();
        break;
    case 'modifyadmin':
        modifyadmin($chng_aid);
        break;
    case 'UpdateAuthor':
        updateadmin($chng_aid, $chng_name, $chng_email, $chng_url, $chng_radminfilem, $chng_radminsuper, $chng_pwd, $chng_pwd2, $temp_system_md5);
        break;
    case 'AddAuthor':
        if (!($add_aid && $add_name && $add_email && $add_pwd)) {
            global $hlpfile;
            include "header.php";
            GraphicAdmin($hlpfile);
            echo error_handler(adm_translate("Vous devez remplir tous les Champs") . "<br />");
            include "footer.php";
            return;
        }
        if ($system_md5) {
            $add_pwdX = crypt($add_pwd, $add_pwdX);
        }
        $result = sql_query("INSERT INTO " . $NPDS_Prefix . "authors VALUES ('{$add_aid}', '{$add_name}', '{$add_url}', '{$add_email}', '{$add_pwdX}', '0','{$add_radminfilem}', '{$add_radminsuper}')");
        updatedroits($add_aid);
Ejemplo n.º 2
0
            if ($admin_n) {
                $pwSQL['forumadmin'] = ',' . implode(',', $admin_n) . ',';
            } else {
                $pwSQL['forumadmin'] = '';
            }
            $errorname = array_merge($errorname, array_diff($admin_a, $admin_n));
        }
        if ($order[$foruminfo['fid']] != $foruminfo['vieworder']) {
            $pwSQL['vieworder'] = $order[$foruminfo['fid']];
        }
        if ($pwSQL) {
            $db->update("UPDATE pw_forums SET" . pwSqlSingle($pwSQL) . "WHERE fid=" . pwEscape($foruminfo['fid'], false));
        }
    }
    updatecache_f();
    updateadmin();
    $errorname && ($errorname = implode(',', $errorname));
    adminmsg($errorname ? 'user_not_exists' : 'operate_success');
} elseif ($action == 'delete') {
    InitGP(array('fid'));
    if (empty($_POST['step'])) {
        include PrintEot('setforum');
        exit;
    } else {
        $count = $db->get_value("SELECT COUNT(*) AS count FROM pw_forums WHERE fup=" . pwEscape($fid) . " AND type<>'category'");
        if ($count) {
            adminmsg('forum_havesub');
        }
        delforum($fid);
        P_unlink(D_P . 'data/bbscache/c_cache.php');
        updatecache_f();
Ejemplo n.º 3
0
         echo "<br>";
         OpenTable();
         echo "<center><b>Not Authorized</b><br><br>" . "Unauthorized editing of authors detected<br><br>" . "" . _GOBACK . "";
         CloseTable();
         include "footer.php";
     }
 }
 switch ($op) {
     case "mod_authors":
         displayadmins();
         break;
     case "modifyadmin":
         modifyadmin($chng_aid);
         break;
     case "UpdateAuthor":
         updateadmin($chng_aid, $chng_name, $chng_email, $chng_url, $chng_radminsuper, $chng_pwd, $chng_pwd2, $chng_admlanguage, $adm_aid, $auth_modules);
         break;
     case "AddAuthor":
         $add_aid = strtolower(substr("{$add_aid}", 0, 25));
         $add_name = substr("{$add_name}", 0, 25);
         if (!($add_aid && $add_name && $add_email && $add_pwd)) {
             include "header.php";
             GraphicAdmin();
             OpenTable();
             echo "<center><font class=\"title\"><b>" . _AUTHORSADMIN . "</b></font></center>";
             CloseTable();
             echo "<br>";
             OpenTable();
             echo "<center><font class=\"option\"><b>" . _CREATIONERROR . "</b></font><br><br>" . "" . _COMPLETEFIELDS . "<br><br>" . "" . _GOBACK . "</center>";
             CloseTable();
             include "footer.php";