Inbox To New Users

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

11 replies · 1,112 views · started 18 years ago · 1 min read

3 participants
S4u Junior · 21 posts #1

heelollolol guys ne have auto inbox to new users like a welcome mail i want it for chatzone script lolzzzz

ReGzBk Developer · 115 posts #2

Include this in ua reg.php at suitable place :-

if($to = $login) {
$msg = "Welcome to Enchantme enjoy ua stay here u .Feel free to inbox staff if u have a ny queries bookmark the hall page nd dont forget to chkout ua features panel nd fun menu .smile. .This is a Auto Pm Dnt reply";
$subject = "Welcome To Enchantme";
$msg = htmlspecialchars(replace($msg));
$subject = htmlspecialchars(replace($subject));
include 'convert_to_smiles.php';
@mysql_query("insert into `".$px.$ltable."` values('','Owners','$to','$subject','$msg','".time()."',1)");}

Edit the message nd subject , sender name(in ma case its owner) to whtever u want...

ViSiT Ma SiTe Nd PoSt Ua CoMmEnTs On It In Ma PoSt

Anshul Senior · 296 posts #3

put this after this line in ur reg.php

if (strtolower($login) != strtolower($db_login)) {
S4u Junior · 21 posts #4

GIVEN SOME ERROR WHERE TO ADD PLZ TELL

 <?php
//заголовок
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="utf-8"?>'.
'<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
//включаем файл конфигурации
include "./ini.php";
//обрабатываем полученные данные
$login=htmlspecialchars(stripslashes(trim($login)));
$login=substr($login,0,20);
$pass=htmlspecialchars(stripslashes(trim($pass)));
$name=htmlspecialchars(stripslashes(trim($name)));
$live=htmlspecialchars(stripslashes(trim($live)));
$sex=htmlspecialchars(stripslashes(trim($sex)));
$mobile=htmlspecialchars(stripslashes(trim($mobile)));
$about=htmlspecialchars(stripslashes(trim($about)));
$email=htmlspecialchars(stripslashes(trim($email)));
$wapurl=htmlspecialchars(stripslashes(trim($wapurl)));
$weburl=htmlspecialchars(stripslashes(trim($weburl)));
$icq=htmlspecialchars(stripslashes(trim($icq)));
$operator=htmlspecialchars(stripslashes(trim($operator)));
//вывод Ñ�траницы в браузер
print '<card title="Register">'.
'<p align="left">';
//запро�� в базу данных
$query_users_login = @mysql_query("select * from `".$px.$utable."` where login='".$login."';");
$users_login = @mysql_fetch_array($query_users_login);
///провер��ем нужные пол��, запи��ываем ошибки в переменную
if(empty($login)) $error='NickName Needed!
';
if(empty($pass)) $error=$error.'Password Needed!
';
if(empty($name)) $error=$error.'Name Needed!
';
if(empty($sex)) $error=$error.'Are You Male or Female!
';
if(preg_match("/[^\da-zA-Z-@#!_]+/",$login)) $error.='Nick Already Exists!
';
if(preg_match("/[^\da-zA-Z_]+/",$pass)) $error.='Pass Is Invalid!
';
///////////////////////////////////
$db_login = $users_login['login'];
//е��ли ошибок нет
if(empty($error))
{//е��ли логин и пароль пу��ты
    //е��ли введенный логин не равен логину в базе, то:
    if(strtolower($login) != strtolower($db_login))
    {
    //запро�� на реги��трацию пользовател��
    @mysql_query("insert into `".$px.$utable."` values(0,'$login','$pass','$name','$sex','$bday','$bmonth','$byear','','$live','$mobile','$operator','$email','$wapurl','$weburl','$icq','$about','',0,0,0,'','','','','','',0,0,0,0,'".time()."','".time()."','".getenv(REMOTE_ADDR)."','".getenv(HTTP_USER_AGENT)."','".getenv(HTTP_REFFERER)."','".getenv(HTTP_X_FORWARDED_FOR)."','','0');");
    print $login." Welcome to zigychat :)
";
    print '<anchor>Enter Chat<go href="enter.php" method="post">
    <postfield name="login" value="$(login)"/>
    <postfield name="pass" value="$(pass)"/>
    </go>
    </anchor>';
    }
    else
    {
    print 'Somethings Wrong';
    }
}
else
{//выводим ошибки
    print $error;
}
print '</p></card></wml>';
//разрываем Ñ�оединение Ñ� бд
@mysql_close();
?>
Anshul Senior · 296 posts #5
<?php
    
    header("Content-type:text/vnd.wap.wml; charset=utf-8");
    print '<?xml version="1.0" encoding="utf-8"?>'.
    '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
    ' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
    '<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
    
    include "./ini.php";
    
    $login=htmlspecialchars(stripslashes(trim($login)));
    $login=substr($login,0,20);
    $pass=htmlspecialchars(stripslashes(trim($pass)));
    $name=htmlspecialchars(stripslashes(trim($name)));
    $live=htmlspecialchars(stripslashes(trim($live)));
    $sex=htmlspecialchars(stripslashes(trim($sex)));
    $mobile=htmlspecialchars(stripslashes(trim($mobile)));
    $about=htmlspecialchars(stripslashes(trim($about)));
    $email=htmlspecialchars(stripslashes(trim($email)));
    $wapurl=htmlspecialchars(stripslashes(trim($wapurl)));
    $weburl=htmlspecialchars(stripslashes(trim($weburl)));
    $icq=htmlspecialchars(stripslashes(trim($icq)));
    $operator=htmlspecialchars(stripslashes(trim($operator)));
    
    print '<card title="Register">'.
    '<p align="left">';
    
    $query_users_login = @mysql_query("select * from `".$px.$utable."` where login='".$login."';");
    $users_login = @mysql_fetch_array($query_users_login);
    
    if (empty($login)) {
        $error='NickName Needed!
';
    }
    if (empty($pass)) {
        $error=$error.'Password Needed!
';
    }
    if (empty($name)) {
        $error=$error.'Name Needed!
';
    }
    if (empty($sex)) {
        $error=$error.'Are You Male or Female!
';
    }
    if (preg_match("/[^\da-zA-Z-@#!_]+/",$login)) {
        $error.='Nick Already Exists!
';
    }
    if (preg_match("/[^\da-zA-Z_]+/",$pass)) {
        $error.='Pass Is Invalid!
';
    }
    ///////////////////////////////////
    $db_login = $users_login['login'];
    
    if (empty($error))
    {
    if(strtolower($login) != strtolower($db_login)) {
        
        @mysql_query("insert into `".$px.$utable."` values(0,'$login','$pass','$name','$sex','$bday','$bmonth','$byear','','$live','$mobile','$operator','$email','$wapurl','$weburl','$icq','$about','',0,0,0,'','','','','','',0,0,0,0,'".time()."','".time()."','".getenv(REMOTE_ADDR)."','".getenv(HTTP_USER_AGENT)."','".getenv(HTTP_REFFERER)."','".getenv(HTTP_X_FORWARDED_FOR)."','','0');");
        
        /////////these lines r for auto inbox//////
         $msg = "Welcome to Enchantme enjoy ua stay here u .Feel free to inbox staff if u have a ny queries bookmark the hall page nd dont forget to chkout ua features panel nd fun menu .smile. .This is a Auto Pm Dnt reply";
        $subject = "Welcome To Enchantme";
        $msg = htmlspecialchars(replace($msg));
        $subject = htmlspecialchars(replace($subject));
        include 'convert_to_smiles.php';
        $sendinbox= mysql_query("insert into `".$px.$ltable."` values('','Owners','$to','$subject','$msg','".time()."',1)");
        ///////////////
        
        print $login." Welcome to zigychat :)
";
        print '<anchor>Enter Chat<go href="enter.php" method="post">
<postfield name="login" value="$(login)"/>
<postfield name="pass" value="$(pass)"/>
</go>
</anchor>';
    } else {
        print 'Somethings Wrong';
    }
} else {
    print $error;
}
print '</p></card></wml>';

@mysql_close();
?>

try this External image (may be gone)

S4u Junior · 21 posts #6

error

  {
                    $success = @mysql_query("insert into `" . $px . $utable . "` values(0,'$login','$pass','$name','$sex','$bday','$bmonth','$byear','','$live','$mobile','$operator','$email','$wapurl','$weburl','$icq','$about','',0,0,'','','','kick','System','$kick_message','$kick_time',0,0,0,'" .
                        time() . "','" . time() . "','0','" . getenv(REMOTE_ADDR) . "','" . getenv(HTTP_USER_AGENT) .
                        "','$wins','$lose','$smilie','$hidden','$quiz','$pic','$team','$stat','$url','$rip','$numb','');");

 /////////these lines r for auto inbox//////
        
        $msg = "Welcome to Enchantme enjoy ua stay here u .Feel free to inbox staff if u have a ny queries bookmark the hall page nd dont forget to chkout ua features panel nd fun menu .smile. .This is a Auto Pm Dnt reply";
        $subject = "Welcome To Enchantme";
        $msg = htmlspecialchars(replace($msg));
        $subject = htmlspecialchars(replace($subject));
        include 'convert_to_smiles.php';
        $sendinbox= mysql_query("insert into `".$px.$ltable."` values('','Owners','$to','$subject','$msg','".time()."',1)");
        ///////////////

                    if ($success)

                    {

                        print "<img src=\"images/ok.gif\" alt=\"o\"/> [b]" . $login . "[/b]
";
                        print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
                        print "[b]Successfully Registered![/b]
";
                        
                        print "<a href=\"index1.php?\">Login Now</a>";
                    } else
                        print "Database Error:
<a href=\"register.phpl\">Retry Properly</a>";

                } else
                {
                    print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
                    print 'There Is An Error!';
                    print "
<a href=\"register.phpl\">Retry Properly</a>";
                }
            } else
            {
                print $error;
                print "
<a href=\"register.phpl\">Retry Properly</a>";
            }
            print '</p>';
            print '<p align="center">';
            print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
            print "" . $lang['copy'] . "
";
            print '</p></card></wml>';
        }
    }
}

@mysql_close();
?>

WML ERROR

Anshul Senior · 296 posts #7

Post your chat_letters table as far i knw u ppl use updated version of chat_service script so i cn help if u post ur letters table

External image (may be gone)

ReGzBk Developer · 115 posts #8

Lols this wud work fine :-

<?php
//заголовок
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="utf-8"?>'.
'<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
//включаем файл конфигурации
include "./ini.php";
//обрабатываем полученные данные
$login=htmlspecialchars(stripslashes(trim($login)));
$login=substr($login,0,20);
$pass=htmlspecialchars(stripslashes(trim($pass)));
$name=htmlspecialchars(stripslashes(trim($name)));
$live=htmlspecialchars(stripslashes(trim($live)));
$sex=htmlspecialchars(stripslashes(trim($sex)));
$mobile=htmlspecialchars(stripslashes(trim($mobile)));
$about=htmlspecialchars(stripslashes(trim($about)));
$email=htmlspecialchars(stripslashes(trim($email)));
$wapurl=htmlspecialchars(stripslashes(trim($wapurl)));
$weburl=htmlspecialchars(stripslashes(trim($weburl)));
$icq=htmlspecialchars(stripslashes(trim($icq)));
$operator=htmlspecialchars(stripslashes(trim($operator)));
//вывод Ñ�траницы в браузер
print '<card title="Register">'.
'<p align="left">';
//запро�� в базу данных
$query_users_login = @mysql_query("select * from `".$px.$utable."` where login='".$login."';");
$users_login = @mysql_fetch_array($query_users_login);
///провер��ем нужные пол��, запи��ываем ошибки в переменную
if(empty($login)) $error='NickName Needed!
';
if(empty($pass)) $error=$error.'Password Needed!
';
if(empty($name)) $error=$error.'Name Needed!
';
if(empty($sex)) $error=$error.'Are You Male or Female!
';
if(preg_match("/[^\da-zA-Z-@#!_]+/",$login)) $error.='Nick Already Exists!
';
if(preg_match("/[^\da-zA-Z_]+/",$pass)) $error.='Pass Is Invalid!
';
///////////////////////////////////
$db_login = $users_login['login'];
//е��ли ошибок нет
if(empty($error))
{//е��ли логин и пароль пу��ты
    //е��ли введенный логин не равен логину в базе, то:
    if(strtolower($login) != strtolower($db_login))
    {
    //запро�� на реги��трацию пользовател��
    @mysql_query("insert into `".$px.$utable."` values(0,'$login','$pass','$name','$sex','$bday','$bmonth','$byear','','$live','$mobile','$operator','$email','$wapurl','$weburl','$icq','$about','',0,0,0,'','','','','','',0,0,0,0,'".time()."','".time()."','".getenv(REMOTE_ADDR)."','".getenv(HTTP_USER_AGENT)."','".getenv(HTTP_REFFERER)."','".getenv(HTTP_X_FORWARDED_FOR)."','','0');");
    print $login." Welcome to zigychat :)
";
    print '<anchor>Enter Chat<go href="enter.php" method="post">
    <postfield name="login" value="$(login)"/>
    <postfield name="pass" value="$(pass)"/>
    </go>
    </anchor>';
    }
    else
    {
    print 'Somethings Wrong';
    }
if($to = $login) {
$msg = "Welcome to Enchantme enjoy ua stay here u .Feel free to inbox staff if u have a ny queries bookmark the hall page nd dont forget to chkout ua features panel nd fun menu .smile. .This is a Auto Pm Dnt reply";
$subject = "Welcome To Enchantme";
$msg = htmlspecialchars(replace($msg));
$subject = htmlspecialchars(replace($subject));
include 'convert_to_smiles.php';
@mysql_query("insert into `".$px.$ltable."` values('','Owners','$to','$subject','$msg','".time()."',1)");
} 
}
else
{//выводим ошибки
    print $error;
}
print '</p></card></wml>';
//разрываем Ñ�оединение Ñ� бд
@mysql_close();
?>

ViSiT Ma SiTe Nd PoSt Ua CoMmEnTs On It In Ma PoSt

S4u Junior · 21 posts #9

CREATE TABLE chat_letters ( id int(11) NOT NULL auto_increment, from_user text NOT NULL, to_user text NOT NULL, subject text, letter text NOT NULL, time text NOT NULL, new int(11) default NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2400 ;

<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="utf-8"?>' .
    '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"' .
    ' "http://www.wapforum.org/DTD/wml_1.1.xml">' .
    '<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

include "./ini.php";

        {

            $login = htmlspecialchars(stripslashes(trim($login)));
            $login = substr($login, 0, 15);
            $pass = htmlspecialchars(stripslashes(trim($pass)));
            $pass = substr($pass, 0, 15);
            $name= htmlspecialchars(stripslashes(trim($name)));
            $name= substr($name, 0, 20);
            $sex = htmlspecialchars(stripslashes(trim($sex)));

            print '<card title="Registration">' . '<p align="center">';

            $query_users_login = @mysql_query("select * from `" . $px . $utable .
                "` where login='" . $login . "';");
            $users_login = @mysql_fetch_array($query_users_login);

            if (empty($login))
                $error = 'Nickname Required!
';
            if (empty($pass))
                $error = $error . 'Password Required!
';
            if (empty($name))
                $error = $error . 'NIKNAME!
';
            if (empty($sex))
                $error = $error . 'What Are You Male Or Female!
';
            if (preg_match("/[^\da-zA-Z-@#!_]+/", $login))
                $error .= 'This Nick Already Exists!
';
            if (preg_match("/[^\da-zA-Z_]+/", $pass))
                $error .= 'Error!
';
            ///////////////////////////////////
            $wins = "0";
            $lose = "0";
            $smilie = "";
            $hidden = "";
            $quiz = "0";
            $pic = "";
            $team = "";
            $stat = "Member";
            $url = "";
            $rip = "";
            $ban_by = "";
            $ptime = "0";
            ////////////////////////////////////

            $db_login = $users_login['login'];

            if (empty($error))
            {
                if (strtolower($login) != strtolower($db_login))
                {
                    $success = @mysql_query("insert into `" . $px . $utable . "` values(0,'$login','$pass','$name','$sex','$bday','$bmonth','$byear','','$live','$mobile','$operator','$email','$wapurl','$weburl','$icq','$about','',0,0,'','','','kick','System','$kick_message','$kick_time',0,0,0,'" .
                        time() . "','" . time() . "','0','" . getenv(REMOTE_ADDR) . "','" . getenv(HTTP_USER_AGENT) .
                        "','$wins','$lose','$smilie','$hidden','$quiz','$pic','$team','$stat','$url','$rip','$numb','');");

                    if ($success)

                    {

                        print "<img src=\"images/ok.gif\" alt=\"o\"/> [b]" . $login . "[/b]
";
                        print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
                        print "[b]Successfully Registered![/b]
";
                        
                        print "<a href=\"index1.php?\">Login Now</a>";

                    } else
                        print "Database Error:
<a href=\"register.phpl\">Retry Properly</a>";

                } else
                {
                    print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
                    print 'There Is An Error!';
                    print "
<a href=\"register.phpl\">Retry Properly</a>";
                }
            } else
            {
                print $error;
                print "
<a href=\"register.php\">Retry Properly</a>";
            }
            print '</p>';
            print '<p align="center">';
            print "<img src=\"images/bar2.gif\" alt=\"----------\"/>
";
            print "" . $lang['copy'] . "
";
            print '</p></card></wml>';
        }
    }
}

@mysql_close();
?>

add i this

ReGzBk Developer · 115 posts #10

S4u didnt the one i gave u worked ? pm me ua site addy ..

ViSiT Ma SiTe Nd PoSt Ua CoMmEnTs On It In Ma PoSt

Guest #11

oh thanx mates but i already have auto inbox script...

Guest #12

i already have easy way to add... but this is also a good one....

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close