Visualizzazione risultati 1 fino 8 di 8

Discussione: mail list

  1. #1
    Guest

    Predefinito mail list

    gestisco la mia ML con questo modulo di phpnuke

    il modulo funziona correttamente solo che al secondo o terzo indirizzo interrompe l'invio. Da una ricerca fatta sul forum sembra un problema comune di AV e bisogna aggiungere un time di intervallo tra un invio e l'altro di 2-3 sec
    alla fine del ciclo di invio.

    Ora capito il problema e trovata la soluzione non riesco a trovare nel mio codice dove eseguire questa correzione e la funzione esatta (forse sleep()?)

    Spero di ricevere un aiuto da qualcuno

    questo il cod.

    if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
    $result = $db->sql_query("select aid, email, radmingroup, radminsuper from $prefix"._authors." where aid='$aid'");
    list($aname, $amail, $radmingroup, $radminsuper) = $db->sql_fetchrow($result);
    if (($radmingroup==1) OR ($radminsuper==1)) {

    function NSNGroupsAdmin() {
    OpenTable();
    echo "<center>\n<table cellpadding=\"3\">\n<tr>\n";
    echo "<td align=\"center\" valign=\"top\" width=\"150\">";
    echo "<a href=\"admin.php?op=NSNGroupsAdd\">"._GR_GROUPSADD ."</a><br>";
    echo "<a href=\"admin.php?op=NSNGroupsView\">"._GR_GROUPSVI EW."</a><br>";
    echo "</td>\n";
    echo "<td align=\"center\" valign=\"top\" width=\"150\">";
    echo "<a href=\"admin.php?op=NSNGroupsUsersEmail\">"._GR_GR OUPSEMAIL."</a><br>";
    echo "</td>\n";
    echo "<td align=\"center\" valign=\"top\" width=\"150\">";
    echo "<a href=\"admin.php?op=NSNGroupsUsersAdd\">"._GR_GROU PSUSERSADD."</a><br>";
    echo "<a href=\"admin.php?op=NSNGroupsUsersView\">"._GR_GRO UPSUSERSVIEW."</a><br>";
    echo "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n<td colspan=\"3\" align=\"center\"><a href=\"admin.php\">"._MAINADMINMENU."</a></td>\n</tr>\n";
    echo "</table>\n</center>\n";
    CloseTable();
    }

    function NSNGroupsUsersCheck($uid,$gid) {
    global $prefix, $db;
    $ingroup = $db->sql_numrows($db->sql_query("SELECT uid FROM ".$prefix."_users_groups_users WHERE uid='$uid' AND gid='$gid'"));
    if ($ingroup > 0) {
    $pagetitle = _GR_ADMIN;
    global $prefix, $user_prefix, $dbi, $bgcolor1, $bgcolor2;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><b>"._GR_INGROUP."</b></center><br>\n";
    echo "<center>"._GOBACK."</center>\n";
    CloseTable();
    include("footer.php");
    die();
    }
    }

    switch($op) {

    /* case "NSNGroups":
    $pagetitle = _GR_ADMIN;
    global $prefix, $dbi, $bgcolor1, $bgcolor2, $bgcolor3;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    include("footer.php");
    break;*/

    case "NSNGroupsAdd":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSADD;
    global $prefix, $dbi;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n";
    echo "<form method=post action=\"admin.php?op=NSNGroupsAddSave\">\n";
    echo "<tr>\n";
    echo "<td class=\"option\" align=\"center\">"._GR_GROUPNAME."<br>";
    echo "<input type=\"text\" name=\"gname\" size=\"32\" maxlength=\"32\"><br>\n";
    echo "<input type=\"submit\" value=\""._GR_ADDGRP."\"></td>\n";
    echo "</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsAddSave":
    global $prefix, $db;
    if ($gname != "") {
    $db->sql_query("INSERT INTO ".$prefix."_users_groups VALUES (NULL, '$gname')");
    }
    Header("Refresh: 0; url=admin.php?op=NSNGroupsView");
    break;

    case "NSNGroupsDelete":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSDELETE;
    include("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo "<center><table><tr>\n";
    echo "<form action=\"admin.php\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"op\" value=\"NSNGroupsDeleteConf\">\n";
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<td align=\"center\">"._GR_DELGROUP." #$gid ($gname)?</td>\n";
    echo "</tr><tr>\n";
    echo "<td align=\"center\"><input type=\"submit\" value=\""._GR_DELETE." &quot;$gname&quot;\"></td>\n";
    echo "</form>\n";
    echo "</tr></table></center>\n";
    echo "<center>"._GOBACK."</center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsDeleteConf":
    global $prefix, $db;
    $db->sql_query("DELETE FROM ".$prefix."_users_groups WHERE gid='$gid'");
    $db->sql_query("OPTIMIZE TABLE ".$prefix."_users_groups");
    $db->sql_query("DELETE FROM ".$prefix."_users_groups_users WHERE gid='$gid'");
    $db->sql_query("OPTIMIZE TABLE ".$prefix."_users_groups_users");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsView");
    break;

    case "NSNGroupsEdit":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSEDIT;
    global $prefix, $db;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n";
    echo "<form method=\"post\" action=\"admin.php?op=NSNGroupsEditSave\">\n";
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<tr>\n";
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo "<td class=\"option\" align=\"center\">"._GR_GROUP."<br>";
    echo "<input type=\"text\" name=\"name\" size=\"32\" maxlength=\"32\" value=\"$gname\"><br>\n";
    echo "<input type=\"submit\" value=\""._GR_EDITGRP."\"></td>\n";
    echo "</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsEditSave":
    global $prefix, $db;
    $db->sql_query("UPDATE ".$prefix."_users_groups SET gname='$name' WHERE gid='$gid'");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsView");
    break;

    case "NSNGroupsEmpty":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSEMPTY;
    include("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo "<center><table><tr>\n";
    echo "<form action=\"admin.php\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"op\" value=\"NSNGroupsEmptyConf\">\n";
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<td align=\"center\">"._GR_EMPGROUP." #$gid ($gname)?</td>\n";
    echo "</tr><tr>\n";
    echo "<td align=\"center\"><input type=\"submit\" value=\""._GR_EMPTY." &quot;$gname&quot;\"></td>\n";
    echo "</form>\n";
    echo "</tr></table></center>\n";
    echo "<center>"._GOBACK."</center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsEmptyConf":
    global $prefix, $db;
    $db->sql_query("DELETE FROM ".$prefix."_users_groups_users WHERE gid='$gid'");
    $db->sql_query("OPTIMIZE TABLE ".$prefix."_users_groups_users");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsView");
    break;
    ....segue codice .....
    Ultima modifica di emj : 14-10-2004 alle ore 03.20.27

  2. #2
    Guest

    Predefinito

    ...continua codice 2 parte....

    case "NSNGroups":
    case "NSNGroupsView":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSVIEW;
    global $prefix, $db, $bgcolor1, $bgcolor2;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" bgcolor=\"$bgcolor2\">\n";
    echo "<tr>\n";
    echo "<td align=\"center\" class=\"option\" width=\"200\">"._GR_GRPNAME."</td>\n";
    echo "<td align=\"center\" class=\"option\" width=\"100\">"._GR_NUMUSERS."</td>\n";
    echo "<td align=\"center\" class=\"option\" width=\"100\">"._FUNCTIONS."</td>\n";
    echo "</tr>\n";
    $result = $db->sql_query("SELECT gid, gname FROM ".$prefix."_users_groups ORDER BY gname");
    while(list($gid, $gname) = $db->sql_fetchrow($result)) {
    echo "<tr bgcolor=\"$bgcolor1\">\n";
    echo "<td align=\"center\" class=\"content\"><a href=\"admin.php?op=NSNGroupsUsersView&amp;gid=$gi d\">$gname</a> ($gid)</td>\n";
    $numusers = $db->sql_numrows($db->sql_query("SELECT uid FROM ".$prefix."_users_groups_users WHERE gid='$gid'"));
    echo "<td align=\"center\" class=\"content\">$numusers</td>\n";
    echo "<td align=\"center\" class=\"content\">\n";
    echo "<a href=\"admin.php?op=NSNGroupsUsersAdd&amp;gid=$gid \"><img src=\"images/groups/add.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_ADDUSR."\" title=\""._GR_ADDUSR."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsEdit&amp;gid=$gid\">< img src=\"images/groups/edit.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_EDIT."\" title=\""._GR_EDIT."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsDelete&amp;gid=$gid\" ><img src=\"images/groups/delete.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_DELETE."\" title=\""._GR_DELETE."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsEmpty&amp;gid=$gid\"> <img src=\"images/groups/empty.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_EMPTY."\" title=\""._GR_EMPTY."\"></a>\n";
    echo "</td>\n";
    echo "</tr>\n";
    }
    echo "</table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersAdd":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSADD;
    global $prefix, $user_prefix, $db, $bgcolor1, $bgcolor2, $bgcolor3;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    if ($gid > 0) {
    echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n";
    echo "<form method=post action=\"admin.php?op=NSNGroupsUsersAddSave\">\n";
    echo "<INPUT TYPE=HIDDEN NAME=\"gid\" VALUE=\"$gid\">\n";
    echo "<tr>\n";
    list($grpName) = $db->sql_fetchrow($db->sql_query("select gname from ".$prefix."_users_groups where gid='$gid'"));
    echo "<td align=\"center\">"._GR_ADDUSRTO." <b>$grpName</b><br>";
    echo "<SELECT NAME=\"add_uid[]\" size=\"10\" multiple>\n";
    $result3 = $db->sql_query("select user_id, username from ".$user_prefix."_users order by username");
    while(list($thisUID, $thisUNAME) = $db->sql_fetchrow($result3)) {
    $ingroup = $db->sql_numrows($db->sql_query("SELECT uid FROM ".$prefix."_users_groups_users WHERE uid='$thisUID' AND gid='$gid'"));
    if ($ingroup < 1) {
    echo "<option value=\"$thisUID\">$thisUNAME</option>\n";
    }
    }
    echo "</SELECT><br>"._GR_ADDNOTE."<br><br>";
    echo ""._GR_LENGTHMEMBER."<br><input type=\"text\" name=\"e_date\" value=\"0\" size=\"5\"><br>";
    echo ""._GR_0UNLIMIT."<br><br>";
    echo "<INPUT TYPE=SUBMIT VALUE=\""._GR_ADDUSR."\"></td>\n";
    echo "</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    } else {
    echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n";
    echo "<form method=post action=\"admin.php?op=NSNGroupsUsersAdd\">\n";
    echo "<tr>\n";
    echo "<td align=\"center\">"._GR_ADDUSRTO."<br>";
    echo "<SELECT NAME=\"gid\" size=\"5\">\n";
    $result3 = $db->sql_query("select gid, gname from ".$prefix."_users_groups order by gname");
    while(list($thisGID, $thisGNAME) = $db->sql_fetchrow($result3)) {
    echo "<option value=\"$thisGID\">$thisGNAME</option><br>\n";
    }
    echo "</SELECT><br><INPUT TYPE=SUBMIT VALUE=\""._GR_SELECTGRP."\"></td>\n";
    echo "</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    }
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersAddSave":
    global $prefix, $user_prefix, $db;
    $xdate = date ("Y-m-d");
    if ($e_date == 0) {
    $ydate = "0000-00-00";
    } else {
    $datestr = explode("-", $xdate);
    $days = ($e_date * 7)-1;
    $ydate = date("Y-m-d", mktime(0,0,0, $datestr[1], $datestr[2]+$days, $datestr[0]));
    }
    $j = count($add_uid);
    for ($i=0; $i < $j; $i++) {
    $ingroup = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_users_groups_users WHERE gid=$gid AND uid='$add_uid[$i]'"));
    if ($ingroup == 0) {
    list($mname, $email) = $db->sql_fetchrow($db->sql_query("select username, user_email from ".$user_prefix."_users WHERE user_id='$add_uid[$i]'"));
    $db->sql_query("insert into ".$prefix."_users_groups_users values ('$gid', '$add_uid[$i]', '$mname', '$email', '$xdate', '$ydate')");
    }
    }
    Header("Refresh: 0; url=admin.php?op=NSNGroupsUsersView&gid=$gid");
    break;
    Ultima modifica di emj : 14-10-2004 alle ore 03.21.49

  3. #3
    Guest

    Predefinito

    ...continua 3 parte

    case "NSNGroupsUsersDelete":
    global $prefix, $db;
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSDELETE;
    include("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo "<center>"._GR_DELUSER." $chng_uid "._GR_FROM." #".$gid." (".$gname.")?</center><br>";
    echo "<center>[ <a href=\"admin.php?op=NSNGroupsUsersDeleteConf&amp;g id=$gid&amp;uid=$chng_uid\">"._GR_YES."</a> | <a href=\"admin.php?op=NSNGroupsView&amp;gid=$gid\">" ._GR_NO."</a> ]</center>";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersDeleteConf":
    global $prefix, $db;
    $db->sql_query("DELETE FROM ".$prefix."_users_groups_users WHERE gid='$gid' AND uid='$uid'");
    $db->sql_query("OPTIMIZE TABLE ".$prefix."_users_groups_users");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsUsersView&gid=$gid");
    break;

    case "NSNGroupsUsersExpire":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSEXPIRE;
    include("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    list($uname) = $db->sql_fetchrow($db->sql_query("SELECT mname FROM ".$prefix."_users_groups_users WHERE uid='$chng_uid' AND gid='$gid'"));
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo "<center><table><tr>\n";
    echo "<form action=\"admin.php\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"op\" value=\"NSNGroupsUsersExpireDone\">\n";
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<input type=\"hidden\" name=\"uid\" value=\"$chng_uid\">\n";
    echo "<td align=\"center\">"._GR_EXPUSER." #$chng_uid ($uname) "._GR_FROM." $gname?</td>\n";
    echo "</tr><tr>\n";
    echo "<td align=\"center\"><input type=\"submit\" value=\""._GR_EXPIRE." &quot;$uname&quot;\"></td>\n";
    echo "</form>\n";
    echo "</tr></table></center>\n";
    echo "<center>"._GOBACK."</center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersExpireDone":
    $newDate = strftime("%Y-%m-%d",mktime(0,0,0,date("m") ,date("d")-1,date("Y")));
    $db->sql_query("UPDATE ".$prefix."_users_groups_users SET edate='$newDate' WHERE gid='$gid' AND uid='$uid'");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsUsersView&gid=$gid");
    break;

    case "NSNGroupsUsersMove":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSMOVE;
    global $prefix, $db;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"2\">\n";
    echo "<form method=\"post\" action=\"admin.php?op=NSNGroupsUsersMoveSave\">\n" ;
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<input type=\"hidden\" name=\"uid\" value=\"$chng_uid\">\n";
    echo "<tr>\n";
    list($mname) = $db->sql_fetchrow($db->sql_query("SELECT mname FROM ".$prefix."_users_groups_users WHERE uid='$chng_uid'"));
    echo "<td class=\"content\" align=\"center\">"._GR_USRNAME.": $mname<br>\n";
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    echo ""._GR_CURRGROUP.": $gname<br>\n";
    echo ""._GR_NEWGROUP.": <SELECT NAME=\"new_gid\">\n";
    $result3 = $db->sql_query("select gid, gname from ".$prefix."_users_groups order by gname");
    while(list($thisGID, $thisGNAME) = $db->sql_fetchrow($result3)) {
    if ($thisGID != $gid) {
    echo "<option value=\"$thisGID\">$thisGNAME</option><br>\n";
    }
    }
    echo "</select><br>\n";
    echo "<input type=\"submit\" value=\""._GR_MOVEUSR."\"></td>\n";
    echo "</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersMoveSave":
    global $prefix, $db;
    NSNGroupsUsersCheck($uid,$new_gid);
    $db->sql_query("UPDATE ".$prefix."_users_groups_users SET gid='$new_gid' WHERE gid='$gid' AND uid='$uid'");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsUsersView&gid=$new_gid") ;
    break;

    case "NSNGroupsUsersUpdate":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSUPDATE;
    include("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    list($uname, $uemail) = $db->sql_fetchrow($db->sql_query("SELECT username, user_email FROM ".$user_prefix."_users WHERE user_id='$chng_uid'"));
    list($mname, $memail, $edate) = $db->sql_fetchrow($db->sql_query("SELECT mname, email, edate FROM ".$prefix."_users_groups_users WHERE uid='$chng_uid' AND gid='$gid'"));
    echo "<center><table>\n";
    echo "<form action=\"admin.php\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"op\" value=\"NSNGroupsUsersUpdateSave\">\n";
    echo "<input type=\"hidden\" name=\"gid\" value=\"$gid\">\n";
    echo "<input type=\"hidden\" name=\"uid\" value=\"$chng_uid\">\n";
    echo "<tr><td>"._GR_USRNAME.":</td><td><select name=\"newname\">\n<option value=\"$mname\" selected>$mname "._GR_OLDVAL."</option>\n";
    echo "<option value=\"$uname\">$uname "._GR_NEWVAL."</option>\n</select></td></tr>\n";
    echo "<tr><td>"._GR_USRMAIL.":</td><td><select name=\"newemail\">\n<option value=\"$memail\" selected>$memail "._GR_OLDVAL."</option>\n";
    echo "<option value=\"$uemail\">$uemail "._GR_NEWVAL."</option>\n</select></td></tr>\n";
    echo "<tr><td>"._GR_EXPIRES.":</td><td><select name=\"newdate\">\n";
    echo "<option value=\"$edate\" selected>";
    if ($edate == "0000-00-00") {
    echo _GR_NOLIMIT." ";
    } else {
    echo "$edate ";
    }
    echo _GR_OLDVAL."</option>\n";
    echo "<option value=\"0000-00-00\">"._GR_NOLIMIT."</option>\n";
    $i = 1;
    $cdate = $edate;
    while ($i <= 52) {
    if ($edate == "0000-00-00") { $edate = date("Y-m-d"); }
    $datestr = explode("-", $edate);
    if ($cdate == "0000-00-00") { $days = ($i * 7)-1; } else { $days = ($i * 7); }
    $ydate = date("Y-m-d", mktime(0,0,0, $datestr[1], $datestr[2]+$days, $datestr[0]));
    echo "<option value=\"$ydate\">$ydate</option>";
    $i++;
    }
    echo "</select></td></tr>\n";
    echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\""._GR_UPDATE." &quot;$mname&quot;\"></td></tr>\n";
    echo "</form></table></center>\n";
    echo "<center>"._GOBACK."</center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersUpdateSave":
    $db->sql_query("UPDATE ".$prefix."_users_groups_users SET mname='$newname', email='$newemail', edate='$newdate' WHERE gid='$gid' AND uid='$uid'");
    Header("Refresh: 0; url=admin.php?op=NSNGroupsUsersView&gid=$gid");
    break;

  4. #4
    Guest

    Predefinito

    .....4 ed ultima parte....

    case "NSNGroupsUsersView":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSUSERSVIEW;
    global $prefix, $user_prefix, $db, $bgcolor1, $bgcolor2;
    include ("header.php");
    title("$pagetitle");
    NSNGroupsAdmin();
    echo "<br>\n";
    OpenTable();
    echo "<center><table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n";
    echo "<form method=post action=\"admin.php?op=NSNGroupsUsersView\">\n";
    echo "<tr>\n<td align=\"center\"><SELECT NAME=\"gid\">\n";
    echo "<option value=\"0\"";
    if ($gid == 0) { echo " selected"; }
    echo ">"._GR_ALLGROUP."</option><br>\n";
    $result3 = $db->sql_query("select gid, gname from ".$prefix."_users_groups order by gname");
    while(list($thisGID, $thisGNAME) = $db->sql_fetchrow($result3)) {
    echo "<option value=\"$thisGID\"";
    if ($gid == $thisGID) { echo " selected"; }
    echo ">$thisGNAME</option><br>\n";
    }
    echo "</SELECT> <INPUT TYPE=SUBMIT VALUE=\""._GR_SELECTGRP."\"></td>\n</tr>\n";
    echo "</form>\n";
    echo "</table></center>\n";
    if ($gid > 0) {
    echo "<center><a href=\"admin.php?op=NSNGroupsUsersAdd&amp;gid=$gid \">"._GR_ADDUSRS."</a></center>";
    }
    echo "<br>\n";
    echo "<center><table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" bgcolor=\"$bgcolor2\">\n";
    echo "<tr>\n";
    echo "<td align=\"center\" class=\"option\">"._GR_USERNAME."</td>\n";
    echo "<td align=\"center\" class=\"option\">"._GR_GROUP."</td>\n";
    echo "<td align=\"center\" class=\"option\">"._GR_START."</td>\n";
    echo "<td align=\"center\" class=\"option\">"._GR_EXPIRES."<br>$newDate</td>\n";
    echo "<td align=\"center\" class=\"option\">"._FUNCTIONS."</td>\n";
    echo "</tr>\n";
    if ($gid == 0) {
    $result = $db->sql_query("SELECT gid, uid, mname, sdate, edate FROM ".$prefix."_users_groups_users ORDER BY mname,gid");
    } else {
    $result = $db->sql_query("SELECT gid, uid, mname, sdate, edate FROM ".$prefix."_users_groups_users WHERE gid=$gid ORDER BY mname");
    }
    while(list($thisGroup, $thisUser, $thisName, $sDate, $eDate) = $db->sql_fetchrow($result)) {
    list($grpName) = $db->sql_fetchrow($db->sql_query("select gname from ".$prefix."_users_groups where gid='$thisGroup'"));
    $thisDate = date("Y-m-d");
    if ($eDate=="0000-00-00") { $eDate = _GR_NOLIMIT; }
    if (($eDate < $thisDate) AND ($eDate != _GR_NOLIMIT)) { $eDate = _GR_EXPIRED; }
    echo "<tr bgcolor=\"$bgcolor1\">\n";
    echo "<td align=\"center\" class=\"content\">$thisName</td>\n";
    echo "<td align=\"center\" class=\"content\">$grpName</td>\n";
    echo "<td align=\"center\" class=\"content\">$sDate</td>\n";
    echo "<td align=\"center\" class=\"content\">$eDate</td>\n";
    echo "<td align=\"center\" class=\"content\">\n";
    echo "<a href=\"admin.php?op=NSNGroupsUsersMove&amp;chng_ui d=$thisUser&amp;gid=$thisGroup\"><img src=\"images/groups/move.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_MOVE."\" title=\""._GR_MOVE."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsUsersExpire&amp;chng_ uid=$thisUser&amp;gid=$thisGroup\"><img src=\"images/groups/expire.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_EXPIRE."\" title=\""._GR_EXPIRE."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsUsersUpdate&amp;chng_ uid=$thisUser&amp;gid=$thisGroup\"><img src=\"images/groups/edit.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_UPDATE."\" title=\""._GR_UPDATE."\"></a>\n";
    echo "<a href=\"admin.php?op=NSNGroupsUsersDelete&amp;chng_ uid=$thisUser&amp;gid=$thisGroup\"><img src=\"images/groups/delete.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\""._GR_DELETE."\" title=\""._GR_DELETE."\"></a>\n";
    echo "</td>\n";
    echo "</tr>\n";
    }
    echo "</table></center>\n";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersEmail":
    $pagetitle = _GR_ADMIN.": "._GR_GROUPSEMAIL;
    global $prefix, $db, $bgcolor1, $bgcolor2, $aname, $amail;
    include ("header.php");
    NSNGroupsAdmin();
    echo "<br>\n";
    title("$pagetitle");
    OpenTable();
    echo "<center><form method=\"post\" action=\"admin.php\">\n";
    echo "<b>"._GR_TYPE.":</b> <select name=\"etype\">\n";
    echo "<option value=\"0\">"._GR_TEXT."</option>\n<option value=\"1\">"._GR_HTML."</option>\n";
    echo "</select><br><br>\n";
    echo "<b>"._GR_FROMA.":</b> $aname<br><br>\n";
    echo "<b>"._GR_TO.":</b> <select name=\"gid\">\n";
    echo "<option value=\"0\">"._GR_ALLGR."</option>\n";
    $result = $db->sql_query("SELECT gid, gname FROM ".$prefix."_users_groups ORDER BY gname");
    while (list($gid, $gname) = $db->sql_fetchrow($result)) {
    echo "<option value=\"$gid\">$gname</option>\n";
    }
    echo "</select><br><br>\n";
    echo "<b>"._GR_SUB.":</b> <input type=\"text\" name=\"gsubject\" size=\"50\"><br><br>\n";
    echo "<b>"._GR_MES.":</b><br><textarea name=\"gcontent\" cols=\"60\" rows=\"20\"></textarea><br><br>\n";
    echo "<input type=\"hidden\" name=\"aname\" value=\"$aname\">\n";
    echo "<input type=\"hidden\" name=\"amail\" value=\"$amail\">\n";
    echo "<input type=\"hidden\" name=\"op\" value=\"NSNGroupsUsersEmailSend\">\n";
    echo "<input type=\"submit\" value=\""._GR_SEND."\">\n";
    echo "</form>";
    CloseTable();
    include("footer.php");
    break;

    case "NSNGroupsUsersEmailSend":
    global $prefix, $db, $sitename;
    $gcontent = stripslashes($gcontent);
    $headers = "MIME-Version: 1.0\n";
    if ($etype < 1) {
    $headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
    $gcontent .= "\n--------------------\n"._GR_THANK.";\n$aname <$amail>";
    } else {
    $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
    $gcontent .= "<hr>"._GR_THANK.";<br><a href=\"mailto:$amail\">$aname</a>";
    }
    $headers .= "From: $aname <$amail>\n";
    $headers .= "Return-Path: $amail\n";
    $headers .= "Reply-To: $amail\n";
    $headers .= "X-Mailer: PHP/".phpversion()."";
    if ($gid == 0) {
    $gsubject = "[$sitename "._GR_GLET."]: ".stripslashes($gsubject)."";
    $result = $db->sql_query("SELECT email FROM ".$prefix."_users_groups_users");
    while(list($email) = $db->sql_fetchrow($result)) {
    $to = ""._GR_GLET." <$email>";
    mail($to, $gsubject, $gcontent, $headers);
    }
    Header("Refresh: 0; url=admin.php?op=NSNGroups");
    } else {
    list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_users_groups WHERE gid='$gid'"));
    $gsubject = "[$gname "._GR_GLET."]: ".stripslashes($gsubject)."";
    $result = $db->sql_query("SELECT email FROM ".$prefix."_users_groups_users WHERE gid='$gid'");
    while(list($email) = $db->sql_fetchrow($result)) {
    $to = "$gname <$email>";
    mail($to, $gsubject, $gcontent, $headers);
    }
    Header("Refresh: 0; url=admin.php?op=NSNGroups");
    }
    break;

    }

    } else {
    echo "Access Denied";
    }

    ?>

  5. #5
    Guest

    Predefinito

    chiedo scusa ai mod ma il testo eccedeva di inserimento

  6. #6
    Guest

    Predefinito


    proprio nessuno ci prova a darmi una mano?

  7. #7
    Guest

    Predefinito

    guru di php dove siete?

  8. #8
    L'avatar di Evcz
    Evcz non è connesso Utente storico
    Data registrazione
    31-05-2002
    Residenza
    Vicenza
    Messaggi
    5,670

    Predefinito

    manda via una mail sola passando tutto via bcc:

    http://forum.altervista.org/showthread.php?t=22009
    Ultima modifica di Evcz : 19-10-2004 alle ore 21.44.13
    There are three kinds of people in this world: people who watch things happen ... people who complain about things that happen ... and people who make things happen...

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •