webForumDet fria alternativet
Logga in / Bli medlem

HjÄlp!!!

PHP

3 svar · 161 visningar · startad av aleborg

Medlem sedan jan. 20013 341 inlägg
Frågan#1

Jag har en PHP sida som jag skulle behöva få veta "vad den betyder"

Jag vet att den sparar information om en ny användare, men jag skulle behöva "översätta" den till asp!

<?
  $errorstring = "<HTML><HEAD><TITLE>ICE Web Mail - Creation Error</TITLE><LINK REL=\"StyleSheet\" HREF=\"styles.css\" type=\"text/css\"><SCRIPT type=\"text/javascript\" src=\"menu.js\"></SCRIPT></HEAD><BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#000080\" VLINK=\"#800080\" ALINK=\"#FF0000\" LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>";

  include("include.html");

  $accounts = getaccounts();
  
  $message = "";
  if (($accountname == "") &#0124;&#0124; (strpos($accountname, " ") <> 0))
  {
    $message = "\"Account Name\"";
    if ($email == "") $message .= ", ";
  }
  if (!($integrate)) if ($email == "") $message .= "\"E-mail\"";
  if (!($message == ""))
  {
    include(messagesfile);
    $message = $emptyfields["MESSAGE"] . $message;
    echo $errorstring;
    showmessage($message, "", "", true, errorcolor, false);
    die();
  }
  
  if ($ddomain) $accountname = $ddomain . "/" . $accountname;

  $account["USER"] = $accountname;
  $account["PASS"] = $accountpass;

  if ($integrate)
  {
    $add = "";

    list($fdomain, $username) = explode("/", $accountname);
    if (!($username)) 
    {
      list($fdomain) = explode(";", $domain);
      $username = $accountname;
    }

    if (!(strpos($username, "@"))) $add = "@" . $fdomain; 
    $account["EMAIL"] = $username . $add;
    $account["HOSTUSER"] = $accountname;
    $account["HOSTPASS"] = $accountpass;
    $account["HOST"] = $mailserver;
  }
  else
  {
    $account["EMAIL"] = $email;  
    $account["HOSTUSER"] = $hostuser;
    $account["HOSTPASS"] = $hostpass;
    $account["HOST"] = $host;
  }
  $account["DELETE"] = !($dleavemessages);
  $account["DELETESERVER"] = $otherconfig["DELETEMESSAGES"];
  $account["UIDLDELETE"] = $otherconfig["DELETEDELETED"];  
  $account["FULLNAME"] = $fullname;
  $account["ADMIN"] = false;
  $account["REPLYTO"] = "";
  $account["FULLHEADER"] = "";
  $account["MULTI"] = "";
  $account["ATTACH"] = "";
      
  if (getnewaccountid($accounts, $account["USER"]))
    $accounts[] = $account;
  else
  {
    include(messagesfile);
    echo $errorstring;
    showmessage($alreadyexists, "", "", true, errorcolor, false);
    die();      
  }
  saveaccounts($accounts);
  
  if (!($integrate))
  {
    $username = $accountname;
    $password = $accountpass;
    
    $accountcreated = true;
    $noinclude = true;
    include("index.html");  
  }
  else
  {
    if ($otherconfig["FULLMERAK"])
    {
      $xdomain = "";
      if ($fdomain) $xdomain = "@" . $fdomain;
      $line = "-a -u\"" . $username . $xdomain . "\" -m\"" . $username . "\" -n\"" . $fullname . "\" -p\"" . $accountpass . "\"";
      $result = integrationcall($line);
    }
    
    if ($result) 
    {
      $accounts[count($accounts) - 1]["DELETED"] = true;
      saveaccounts($accounts);
      
      $nocreateuser = true;     
      $noinclude = true;  
      
      include("self.html");
    }
    else
    {  
      $accountcreated = true;
      $noinclude = true;
      include("index.html");
    } 
  }
?>

Är det möjligt?

Medlem sedan jan. 20012 204 inlägg
#2

Det akn nog ta ett tag :e

Medlem sedan jan. 20013 341 inlägg
#3

jag vore jätte tacksam för hjälp

det är det här eller http://cgi.webforum.nu/wf/Forum11/HTML/004163.html
som kan lösa mitt problem

Medlem sedan maj 200139 inlägg
#4

Om du kan ordna filen include.html så kanske det kan gå att ordna, men utan den så vet man inte hur funktionerna ser ut (ex. getaccounts() ).

253 ms totalt · 4 externa anrop · v20260731065814-full.1b2494f0
120 ms — deklarationer (db)
0 ms — hämta statistik (cache)
129 ms — hämta tråd, inlägg och bilagor (db)
121 ms — ändringar (db)