Exemplo n.º 1
0
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
******************************************************************************/
if (isset($_SESSION['superadmin']) && isset($_GET['id']) && is_numeric($_GET['did']) && $_SESSION['superadmin'] == '1' || $_SESSION['admin'] == '1' && isset($_GET['id']) && is_numeric($_GET['did']) && $access_domain) {
    $sql = sprintf("SELECT efrom,eto FROM forwardings WHERE id='%s'", $db->escapeSimple($_GET['id']));
    $result =& $db->query($sql);
    $edata = $result->fetchrow(DB_FETCHMODE_ASSOC);
    $smarty->assign('efrom', $edata['efrom']);
    //$smarty->assign('eto' , get_first_forward($edata['eto']));
    $forwards = array();
    if (check_multi_forward($edata['eto']) == 'y') {
        $eto_array = array();
        $eto_array = split(',', $edata['eto']);
        foreach ($eto_array as $key) {
            array_push($forwards, array('etosingle' => $key));
        }
    } else {
        array_push($forwards, array('etosingle' => $edata['eto']));
    }
    $smarty->assign('forwards', $forwards);
    if (isset($_POST['del_ok']) && $_POST['del_ok'] == "true") {
        $smarty->assign('if_del_ok', 'y');
        $pos = strpos($edata['efrom'], '@');
        $forward = substr($edata['efrom'], 0, $pos);
        if ($forward == "postmaster") {
            $smarty->assign('error_msg', 'y');
Exemplo n.º 2
0
     $autoresponder = 0;
     $sql = sprintf("SELECT id FROM autoresponder WHERE email='%d' AND active='y'", $db->escapeSimple($data['id']));
     $res =& $db->query($sql);
     if ($res->numRows() == 1) {
         $autoresponder = 1;
     }
     array_push($table_email, array('id' => $data['id'], 'did' => $_GET['did'], 'email' => $data['email'], 'access' => $data['access'], 'mb_size' => mailbox_size_human($data['mb_size']), 'autoresponder' => $autoresponder));
 }
 //ENDE WHILE eMails
 $sql = sprintf("SELECT * FROM forwardings WHERE domainid='%s' ORDER BY efrom", $db->escapeSimple($_GET['did']));
 $result =& $db->query($sql);
 echo mysql_error();
 $table_forward = array();
 while ($data = $result->fetchrow(DB_FETCHMODE_ASSOC)) {
     if (!ereg('^@', $data['efrom'])) {
         array_push($table_forward, array('id' => $data['id'], 'did' => $_GET['did'], 'from' => $data['efrom'], 'to' => get_first_forward($data['eto']), 'if_multif' => check_multi_forward($data['eto']), 'access' => $data['access']));
     }
 }
 //ENDE WHILE forward
 if ($config['mailinglists'] == '1') {
     //Run ML-Code only ==1
     $sql = sprintf("SELECT id,COUNT(*) as num FROM list_recp GROUP BY id", $db->escapeSimple($_GET['did']));
     $res =& $db->query($sql);
     $list_recps = array();
     while ($row = $res->fetchrow(DB_FETCHMODE_ASSOC)) {
         $list_recps[$row['id']] = $row['num'];
     }
     $sql = sprintf("SELECT * FROM lists WHERE domainid = %d ORDER BY address", $db->escapeSimple($_GET['did']));
     $res =& $db->query($sql);
     $table_list = array();
     while ($row = $res->fetchrow(DB_FETCHMODE_ASSOC)) {