التطور للوب بواسطةmysql!PHP - ويلينغ — الصفحة ٦٥٦

بناء خدمة بريد إلكتروني متوافق مع الوب الفصل 27 السرد (227) index.php - العمود الفقري للنظام Warm Mail <? // This file is the main body of the Warm Mail application. // It works basically as a state machine and shows users the // output for the action they have chosen //************************› // Stage 1: pre-processing ************ // Do any required processing before page header is sent // and decide what details to show on page headers include ('include_fns.php'); session_start(); $buttons = array(); *********** **************** //append to this string if anything processed before header has output $status = ''; // need to process log in or out requests before anything else if($username || $password) { if(login($username, $passwd)) } $status .= "<p>Logged in successfully.<br><br><br><br><br><br>"; $auth_user = $username; session_register("auth_user"); else $status .= "<p>Sorry, we could not log you in with that username and password.<br><br><br><br><br><br>"; if($action == 'log-out') } } { session_destroy(); unset($action); } unset($auth_user); //need to process choose, delete or store account before drawing header switch($action ) case 'delete-account' : { { break; } delete_account($auth_user, $account); case 'store-settings' : store_account_settings($auth_user, $HTTP_POST_VARS); { break; } 672
ص ٦٥٦

النص مستخرج آليًّا من صور الكتاب، وقد يقع فيه خطأ.