├── .gitignore ├── INSTALL ├── README.md ├── addressbook.php ├── attachments.php ├── classes ├── imap.inc ├── imap_pop3.inc ├── mailbox.inc ├── mime_mail.inc ├── phpDB-msql.inc ├── phpDB-mssql.inc ├── phpDB-mysql.inc ├── phpDB-postgresql.inc ├── phpDB-sybase.inc ├── phpDB.inc ├── pop3.inc └── userclass.inc ├── contactdetails.php ├── contactupdate.php ├── createcontact.php ├── createfavorites.php ├── createfolder.php ├── createnote.php ├── deleteattachment.php ├── deletecontact.php ├── deletefavorites.php ├── deletefolder.php ├── deletemessage.php ├── deletenote.php ├── doc ├── FAQ │ ├── FAQ │ ├── FAQ.doc │ └── FAQ.pdf ├── INSTALL ├── LICENSE ├── THANKS ├── TODO ├── UPGRADE └── WHATSNEW ├── download_attachment.php ├── favoritedetails.php ├── favorites.php ├── favoritesupdate.php ├── folders.php ├── htaccess ├── images ├── attach.gif ├── background.gif ├── block.gif ├── bt_addressbook.gif ├── bt_addressbook2.gif ├── bt_email.gif ├── bt_favorites.gif ├── bt_notebook.gif ├── button.psd ├── company_logo.jpg ├── company_logo2.jpg ├── company_logo3.jpg ├── delete.gif ├── deutsch_version1.gif ├── deutsch_version2.gif ├── dot.gif ├── dutch_version1.gif ├── dutch_version2.gif ├── empty.gif ├── english_version1.gif ├── english_version2.gif ├── espanol_version1.gif ├── espanol_version2.gif ├── forward.gif ├── francais_version1.gif ├── francais_version2.gif ├── italiano_version1.gif ├── italiano_version2.gif ├── line_horizantal_shadow.gif ├── line_tool.gif ├── line_vertical_blue_back.gif ├── next.gif ├── norsk_version1.gif ├── norsk_version2.gif ├── polski_version1.gif ├── polski_version2.gif ├── portugues_version1.gif ├── portugues_version1.gif.tmp ├── portugues_version2.gif ├── postaci_webmail.jpg ├── previous.gif ├── print.gif ├── reply.gif ├── save.gif ├── sponsor.gif ├── turkce_version1.gif ├── turkce_version2.gif ├── turkish_version1.gif ├── turkish_version2.gif ├── welcome.psd ├── welcome_deutsch.gif ├── welcome_dutch.gif ├── welcome_english.gif ├── welcome_espanol.gif ├── welcome_francais.gif ├── welcome_italiano.gif ├── welcome_norsk.gif ├── welcome_polski.gif ├── welcome_polski.gif.tmp ├── welcome_portugues.gif └── welcome_turkce.gif ├── import_addressbook.php ├── includes ├── commonhead.inc ├── finish_spell.php ├── functions.inc ├── global.inc ├── headinside.inc ├── javascripts.inc ├── spellcheck.php └── stylesheets.inc ├── index.php ├── lang ├── deutsch.inc ├── dutch.inc ├── english.inc ├── espanol.inc ├── francais.inc ├── italiano.inc ├── norsk.inc ├── polski.inc ├── portugues.inc └── turkce.inc ├── mailbox.php ├── message_move.php ├── notebook.php ├── notebookdetails.php ├── notebookupdate.php ├── postmail.php ├── preferences.php ├── queries ├── UPGRADE │ ├── upgrade-mysql-1.1.0-1.1.3.sql │ └── upgrade-mysql-1.1.1-1.1.3.sql ├── postaci-mssql-1.1.sql ├── postaci-mysql-1.1.sql ├── postaci-pgsql-1.1.sql └── tblDomains.sql ├── readmessage.php ├── renamefolder.php ├── renamefolder_action.php ├── save_preferences.php ├── sendmail.php ├── spellcheck.php ├── template.php ├── upload.php └── validate_login.php /.gitignore: -------------------------------------------------------------------------------- 1 | # osx noise 2 | .DS_Store 3 | profile 4 | 5 | # xcode noise 6 | build/* 7 | *.mode1 8 | *.mode1v3 9 | *.mode2v3 10 | *.perspective 11 | *.perspectivev3 12 | *.pbxuser 13 | *.xcworkspace 14 | xcuserdata 15 | 16 | # svn & cvs 17 | .svn 18 | CVS 19 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Postaci Webmail is a complex piece of software in terms of installation and maintanance. 2 | Please read doc/INSTALL file and follow these steps carefully. When you have finished, 3 | please read the FAQ which is also in the doc directory. These documents should give a 4 | slight idea of what Postaci is. 5 | 6 | More information is also available at http://www.postaciwebmail.org/ 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Postaci Webmail 2 | Postaci (Turkish for Postman) is multiplatform Webmail software which is database independent, multilanguage, POP3/IMAP, and fully MIME-compatible. While using POP3 mode to fetch messages it uses database fields to simulate IMAP folders, on which you can save, move, delete, and read e-mail. It also contains an adressbook, a notebook, and a bookmark manager application. 3 | 4 | ### Recent releases 5 | 6 | **2.0.1 01 Oct 2006 19:24** 7 | Release Notes: SMTP authentication for those who need to authenticate to send email. An Email Address field in Preferences allows you to manually set your From: email address. A problem in moving messages when using IMAP has been fixed. 8 | 9 | **2.0 20 Mar 2006 02:03** 10 | Pete Larsen is maintaining the project from now on. A spell check feature and an address book window have been added to the sendmail page. Passwords will no longer be stored in the database. SQL injection attacks are prevented. Problems adding, renaming, and deleting folders and problems adding, moving, and deleting messages have been fixed. The message size is stored in the database when you move messages. It is easier to customize the colors. There are numerous enhancements. 11 | 12 | **1.1.3 07 Nov 2000 16:39** 13 | Release Notes: The infamous attachments bug was fixed. Some problems with Courier-IMAP servers were fixed, and some minor bugfixes were made. Polish and Spanish support was added. 14 | 15 | **1.1.2 04 Nov 2000 20:35** 16 | Release Notes: This release adds French and Norwegian support and some minor bugfixes. 17 | 18 | **1.1.1 31 Oct 2000 09:13** 19 | Release Notes: A severe security hole has been fixed, and minor bugfixes were added. An FAQ and global.inc file documentation were included. Translations are provided for German, Italian, Dutch, and Portuguese. Support for Qmail/vpop users has been added. 20 | -------------------------------------------------------------------------------- /classes/imap.inc: -------------------------------------------------------------------------------- 1 | port = $port; 30 | $this->protocol = $protocol; 31 | $this->hostname = $hostname; 32 | $this->username = $username; 33 | $this->password = $password; 34 | $this->mbox = false; 35 | $this->mbox_id = $mbox_id; 36 | $this->messagecount = 0; 37 | 38 | if (trim($port) == "") { 39 | switch ($protocol) { 40 | case "imap" : 41 | $this->port = "143"; 42 | break; 43 | case "pop3" : 44 | $this->port = "110"; 45 | break; 46 | default : 47 | echo " 

 

 

$text80

"; 48 | die; 49 | } // end switch 50 | } // end if 51 | 52 | $this->makealive(); 53 | } // end function 54 | 55 | function authenticate() { 56 | $this->mbox = imap_open("{" . $this->hostname . "/" . $this->protocol . "}", $this->username, $this->password); 57 | if ($this->mbox) { 58 | imap_close($this->mbox); 59 | return true; 60 | } else { 61 | return false; 62 | } // end if 63 | 64 | } // end function 65 | 66 | function decode_mime_string ($string) { 67 | if (eregi("=?([A-Z,0-9,-]+)?([A-Z,0-9,-]+)?([A-Z,0-9,-,=,_]+)?=", $string)) { 68 | $coded_strings = explode('=?', $string); 69 | $counter = 1; 70 | $string = $coded_strings[0]; 71 | while ($counter < sizeof($coded_strings)) { 72 | $elements = explode('?', $coded_strings[$counter]); 73 | if (eregi("Q", $elements[1])) { 74 | $elements[2] = str_replace('_', ' ', $elements[2]); 75 | $elements[2] = eregi_replace("=([A-F,0-9]{2})", "%\\1", $elements[2]); 76 | $string .= urldecode($elements[2]); 77 | } else { 78 | $elements[2] = str_replace('=', '', $elements[2]); 79 | if ($elements[2]) { $string .= base64_decode($elements[2]); } 80 | } 81 | if (isset($elements[3]) && $elements[3] != '') { 82 | $elements[3] = ereg_replace("^=", '', $elements[3]); 83 | $string .= $elements[3]; 84 | } 85 | $string .= " "; 86 | $counter++; 87 | } 88 | } 89 | return $string; 90 | } 91 | 92 | /*******************************************************************************/ 93 | /* Only IMAP specific functions */ 94 | /*******************************************************************************/ 95 | 96 | function makealive() { // checks to see if imap stream is active. If not it does. 97 | if (!$this->mbox) { 98 | $this->mbox = imap_open("{" . $this->hostname . "/" . $this->protocol . ":" . $this->port . "}$this->mbox_id", $this->username, $this->password) or die (""); 99 | } else { 100 | $active = imap_ping($this->mbox); 101 | if (!$active) { 102 | $this->mbox = imap_open("{" . $this->hostname . "/" . $this->protocol . ":" . $this->port . "}$this->mbox_id", $this->username, $this->password) or die (""); 103 | } // end if 104 | } // end if 105 | } // end function 106 | 107 | 108 | /*******************************************************************************/ 109 | /* IMAP specific functions with shared names */ 110 | /*******************************************************************************/ 111 | 112 | function getMailboxes() { // returns an array of subscribed imap folders 113 | $this->makealive(); 114 | if ($this->mbox ){ 115 | $list = imap_getsubscribed($this->mbox, "{" . $this->hostname . ":" . $this->port . "}", "*"); 116 | if (is_array($list)) { 117 | $folders = array("name" => array(), 118 | "id" => array()); 119 | 120 | $folder_counter=-1; 121 | reset($list); 122 | while (list($key, $val) = each($list)) { 123 | $folder_counter++; 124 | $folders["name"][$folder_counter] = substr(stristr(imap_utf7_decode($val->name),"}"), 1); 125 | $folders["id"][$folder_counter] = rawurlencode(substr(stristr($val->name,"}"), 1)); 126 | } // end while 127 | } // end if 128 | } 129 | 130 | return $folders; 131 | } // end function 132 | 133 | 134 | function mbox_exists($mbox_id) { // Checks to see if the mbox_id is a valid mailbox or not. 135 | if (trim($mbox_id) != "INBOX") { 136 | $this->makealive(); 137 | if ($this->mbox){ 138 | $it_exists = false; 139 | $list = imap_getsubscribed($this->mbox, "{" . $this->hostname . ":" . $this->port . "}", "*"); 140 | if (is_array($list)) { 141 | while (list($key, $val) = each($list)) { 142 | if (substr(stristr(imap_utf7_decode($val->name),"}"), 1) == trim($mbox_id)) { 143 | $it_exists = true; 144 | } // end if 145 | } // end while 146 | } // end if 147 | } else { 148 | Header("Location: index.php?error_id=2"); 149 | } // end if 150 | if (!$it_exists) { 151 | Header("Location: index.php?error_id=3"); 152 | } 153 | } 154 | } // end function 155 | 156 | 157 | function postaci_get_headers() { 158 | global $text40, $topmsg, $seperator; 159 | $postaci_headers= array("msg_no" => array(), 160 | "attach" => array(), 161 | "from" => array(), 162 | "to" => array(), 163 | "subject" => array(), 164 | "size" => array(), 165 | "status" => array(), 166 | "cc" => array(), 167 | "msg_date"=> array()); 168 | 169 | $this->makealive(); 170 | if ($this->mbox ){ 171 | $mailbox_headers = array(); 172 | $mailbox_headers=imap_headers($this->mbox); 173 | 174 | if ($topmsg >= $this->messagecount) { 175 | $topmsg = $this->messagecount; 176 | $bottommsg = $this->messagecount - $seperator +1; 177 | } 178 | if ($topmsg <= 0) { 179 | $topmsg = $this->messagecount; 180 | $bottommsg = $this->messagecount - $seperator +1; 181 | } else { 182 | $bottommsg = $topmsg - $seperator +1; 183 | } 184 | if ($bottommsg <= 0) { 185 | $bottommsg = 1; 186 | } 187 | 188 | $simple_counter = -1; 189 | 190 | for ($i = $topmsg; $i>=$bottommsg;$i = $i -1) { 191 | 192 | $simple_counter++; 193 | 194 | $size=$mailbox_headers[$i-1]; 195 | $size=ereg_replace(".*\(","",$size); 196 | $size=ereg_replace(" .*$"," ",$size); 197 | $htmlsize=ceil($size/1024). "K"; 198 | 199 | $message_header=imap_header($this->mbox,$i); 200 | 201 | $message_date=ereg_replace(" "," ", date("Y M d - H:i",$message_header->udate)); 202 | if ($message_header->Unseen == "U" || $message_header->Recent == "N") { 203 | $message_is_new = 1; 204 | } else { 205 | $message_is_new = 0; 206 | } 207 | $htmlfrom = htmlspecialchars($this->decode_mime_string($message_header->fromaddress)); 208 | $htmlcc = htmlspecialchars($this->decode_mime_string($message_header->ccaddress)); 209 | $htmlto = htmlspecialchars($this->decode_mime_string($message_header->toaddress)); 210 | $mysubject = $this->decode_mime_string($message_header->subject); 211 | if (strlen($mysubject) <= 0 ) { 212 | $mysubject="$text40"; 213 | } 214 | $message_number=trim($message_header->Msgno); 215 | $structure=imap_fetchstructure($this->mbox,$message_number); 216 | $c=count($structure->parts); 217 | $attachment_exists = 0; 218 | if ($c>1 ) { 219 | $attachment_exists = 1; 220 | } 221 | 222 | $postaci_headers["msg_no"][$simple_counter] = $message_number; 223 | if ($attachment_exists == 0) { 224 | $postaci_headers["attach"][$simple_counter] = 0; 225 | } else { 226 | $postaci_headers["attach"][$simple_counter] = 1; 227 | } 228 | $postaci_headers["from"][$simple_counter] = $htmlfrom; 229 | $postaci_headers["to"][$simple_counter] = $htmlto; 230 | $postaci_headers["subject"][$simple_counter] = $mysubject; 231 | $postaci_headers["size"][$simple_counter] = $htmlsize; 232 | $postaci_headers["status"][$simple_counter] = $message_is_new; 233 | $postaci_headers["cc"][$simple_counter] = $htmlcc; 234 | $postaci_headers["msg_date"][$simple_counter] = $message_date; 235 | } 236 | 237 | } else { 238 | Header("Location: index.php?error_id=2"); 239 | } // end if 240 | 241 | return $postaci_headers; 242 | } // end function 243 | 244 | function empty_mailbox() { 245 | $this->makealive(); 246 | if ($this->mbox){ 247 | $mboxstatus=imap_check($this->mbox); 248 | $this->messagecount=$mboxstatus->Nmsgs; 249 | if ($this->messagecount == 0) { 250 | return true; 251 | } else { 252 | return false; 253 | } 254 | } else { 255 | Header("Location: index.php?error_id=2"); 256 | } // end if 257 | } // end function 258 | 259 | function close_mailbox() { 260 | if ($this->mbox){ 261 | imap_close($this->mbox); 262 | } 263 | } // end function 264 | 265 | 266 | } // end class 267 | 268 | ?> 269 | -------------------------------------------------------------------------------- /classes/imap_pop3.inc: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /classes/mailbox.inc: -------------------------------------------------------------------------------- 1 | execute("select mbox_id from tblMailBoxes"); 23 | $dbq->lastrow(); 24 | $this->mbox_id = $dbq->fields['mbox_id']; 25 | $dbq->close(); 26 | 27 | return $this->mbox_id; 28 | } // end function 29 | 30 | 31 | } // end class 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /classes/mime_mail.inc: -------------------------------------------------------------------------------- 1 | parts = array(); 26 | $this->to = ""; 27 | $this->from = ""; 28 | $this->cc = ""; 29 | $this->bcc = ""; 30 | $this->subject = ""; 31 | $this->body = ""; 32 | $this->headers = ""; 33 | $this->message_all = ""; 34 | $this->smtp_user = ""; 35 | $this->smtp_pass = ""; 36 | } 37 | 38 | function add_attachment($message, $name, $ctype) { 39 | $this->parts[] = array ("ctype" => $ctype, 40 | "message" => $message, 41 | "encode" => $encode, 42 | "name" => $name); 43 | } 44 | 45 | function build_message($part) { 46 | $message = $part[ "message"]; 47 | $message = chunk_split(base64_encode($message)); 48 | $encoding = "base64"; 49 | return "Content-Type: ".$part[ "ctype"]. 50 | ($part[ "name"]? "; name = \"".$part[ "name"]. 51 | "\"" : ""). 52 | 53 | "\nContent-Transfer-Encoding: $encoding\n\n$message\n"; 54 | } 55 | 56 | function build_multipart() { 57 | $boundary = "b".md5(uniqid(time())); 58 | $multipart = 59 | "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME encoded message.\n\n--$boundary"; 60 | 61 | for($i = sizeof($this->parts)-1; $i >= 0; $i--) 62 | { 63 | $multipart .= "\n".$this->build_message($this->parts[$i]). 64 | "--$boundary"; 65 | } 66 | return $multipart.= "--\n"; 67 | } 68 | 69 | function get_mail($complete = true) { 70 | global $remote_ip; 71 | 72 | $mime = ""; 73 | $this->message_all = $mime; 74 | 75 | $this->message_all = $this->message_all . "Subject: $this->subject\n"; 76 | $this->message_all = $this->message_all . "To: ".$this->to. "\n"; 77 | if (!empty($this->from)) 78 | $mime .= "From: ".$this->from. "\n"; 79 | if (!empty($this->cc)) 80 | $mime .= "Cc: ".$this->cc. "\n"; 81 | if (!empty($this->bcc)) 82 | $mime .= "Bcc: ".$this->bcc. "\n"; 83 | 84 | $mime .= "X-Mailer:Postaci 1.1.0 (ftp://ftp.onar.com.tr/pub/linux/postaci)\n"; 85 | $mime .= "X-Comment: This message was sent from " . $remote_ip . "\n"; 86 | 87 | if (!empty($this->body)) 88 | $this->add_attachment($this->body, "", "text/plain"); 89 | $mime .= "MIME-Version: 1.0\n".$this->build_multipart(); 90 | 91 | $this->message_all = $this->message_all . $mime; 92 | return $mime; 93 | } 94 | 95 | function send() { 96 | global $smtp_host, $smtp_port, $text91; 97 | global $smtp_auth; 98 | 99 | $mime = $this->get_mail(false); 100 | 101 | $allrecip = $this->to.",".$this->cc.",".$this->bcc; 102 | str_replace(",,", ",", $allrecip); 103 | $recipients = explode(",", $allrecip); 104 | 105 | if ($smtp_host != "localhost") { 106 | $fp = fsockopen($smtp_host,$smtp_port); 107 | $data = substr(fgets($fp,1024),0,3); 108 | if ($data != "220") { 109 | echo "
 

 

" . $text91 . "

"; 110 | die; 111 | } 112 | fputs($fp,"HELO localhost\r\n"); 113 | 114 | if ($smtp_auth == "yes") { 115 | $user = base64_encode($this->smtp_user); 116 | $pass = base64_encode($this->smtp_pass); 117 | fputs($fp, "AUTH LOGIN\r\n"); 118 | fputs($fp, "$user\r\n"); 119 | fputs($fp, "$pass\r\n"); 120 | } 121 | 122 | $data = fgets($fp,1024); 123 | fputs($fp, "mail from:<" . $this->from . ">\r\n"); 124 | for($i=0; $i<=sizeof($recipients); $i++) { 125 | if ($recipients[$i] != null) { 126 | $data = fgets($fp,1024); 127 | fputs($fp,"rcpt to: <" . $recipients[$i] . ">\r\n"); 128 | } 129 | } 130 | $data = fgets($fp,1024); 131 | fputs($fp,"data" . "\r\n"); 132 | $data = fgets($fp,1024); 133 | fputs($fp, $this->message_all . "\r\n"); 134 | fputs($fp,"\n.\r\n"); 135 | $data = fgets($fp,1024); 136 | fputs($fp,"quit\r\n"); 137 | $data = fgets($fp,1024); 138 | sleep(1); 139 | fclose($fp); 140 | } else { 141 | mail($this->to, $this->subject, "", $mime); 142 | } 143 | } 144 | }; 145 | 146 | ?> 147 | -------------------------------------------------------------------------------- /classes/phpDB.inc: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /classes/userclass.inc: -------------------------------------------------------------------------------- 1 | execute("select user_id from tblUsers order by user_id desc"); 23 | //$dbq->lastrow(); 24 | $this->user_id = $dbq->fields['user_id']; 25 | $dbq->close(); 26 | 27 | return $this->user_id; 28 | } // end function 29 | 30 | // Finds the domain_id for any username in tblUserDomains 31 | function findUserDomainID($username) { 32 | global $db; 33 | 34 | $domain_id = 1; 35 | $dbq = $db->execute("select domain_id from tblUserDomains where username='$username'"); 36 | $domain_id = $dbq->fields['domain_id']; 37 | if (!$domain_id) { 38 | $domain_id = 1; 39 | } 40 | return $domain_id; 41 | } // end function 42 | 43 | 44 | } // end class 45 | 46 | ?> 47 | -------------------------------------------------------------------------------- /contactupdate.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | // security check 22 | $item_id = clean_data($item_id); 23 | $dbq = $db->execute("select user_id from tblAdressbook where item_id=$item_id"); 24 | $auth_user = $dbq->fields['user_id']; 25 | if ($auth_user != $user_id) { 26 | Header("Location: index.php?error_id=1"); 27 | } 28 | $dbq->close(); 29 | 30 | if ($log_id == ""){ 31 | Header("Location: index.php?error_id=1"); 32 | } else { 33 | 34 | $txtnamesurname = clean_data($txtnamesurname); 35 | $txtemail = clean_data($txtemail); 36 | $txtnotes = clean_data($txtnotes); 37 | $txttelephone = clean_data($txttelephone); 38 | 39 | $dbq = $db->execute("update tblAdressbook set real_name='$txtnamesurname',email1 = '$txtemail', notes='$txtnotes',telephone='$txttelephone' where user_id = $user_id and item_id = $item_id"); 40 | 41 | Header("Location: addressbook.php"); 42 | } 43 | 44 | ?> 45 | -------------------------------------------------------------------------------- /createcontact.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | 20 | $dbq->close(); 21 | if ($log_id == ""){ 22 | Header("Location: index.php?error_id=1"); 23 | } else { 24 | 25 | $txtemail = str_replace(";", "", $txtemail); 26 | $abentry = explode(" <", $txtemail); 27 | $txtnamesurname = $abentry[0]; 28 | $txtemail = $abentry[1]; 29 | $txtemail = str_replace(">", "", $txtemail); 30 | if ($txtemail == "") { $txtemail = $txtnamesurname; } 31 | 32 | $txtnamesurname = trim($txtnamesurname); 33 | if ($txtnamesurname == "") { 34 | $txtnamesurname = "-----------"; 35 | } 36 | 37 | $dbq = $db->execute("select item_id from tblAdressbook order by item_id desc"); 38 | $max_item_id = $dbq->fields['item_id']; 39 | $dbq->close(); 40 | $max_item_id++; 41 | 42 | $txtnamesurname = clean_data($txtnamesurname); 43 | $txtemail = clean_data($txtemail); 44 | $txttelephone = clean_data($txttelephone); 45 | 46 | $dbq = $db->execute("insert into tblAdressbook values($max_item_id,$user_id,'$txtnamesurname','$txtemail','','$txttelephone')"); 47 | $dbq->close(); 48 | 49 | if ($rm == 1) { 50 | //$mbox_id = rawurlencode($mbox_id); 51 | Header("Location: readmessage.php?ek=1&mbox_id=$mbox_id&msg_no=$msg_no"); 52 | } else { 53 | Header("Location: addressbook.php"); 54 | } 55 | 56 | } 57 | 58 | ?> 59 | -------------------------------------------------------------------------------- /createfavorites.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | 20 | $dbq->close(); 21 | if ($log_id == ""){ 22 | Header("Location: index.php?error_id=1"); 23 | } else { 24 | 25 | $txttitle = trim($txttitle); 26 | if ($txttitle == "") { 27 | $txttitle = "-----------"; 28 | } 29 | 30 | $dbq = $db->execute("select favorite_id from tblFavorites order by favorite_id desc"); 31 | $max_favorite_id = $dbq->fields['favorite_id']; 32 | $dbq->close(); 33 | $max_favorite_id++; 34 | 35 | $txturl = clean_data($txturl); 36 | $txttitle = clean_data($txttitle); 37 | 38 | $dbq = $db->execute("insert into tblFavorites values($max_favorite_id,$user_id,'$txturl','$txttitle','')"); 39 | Header("Location: favorites.php"); 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /createfolder.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | if ($log_id == ""){ 22 | Header("Location: index.php?error_id=1"); 23 | exit; 24 | } else { 25 | if (trim($newfolder) != ""){ 26 | if(isset($pnspace)) { 27 | $newfolder = $pnspace.$newfolder; 28 | } 29 | if ($default_protocol == "imap") { // protocol = imap 30 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 31 | $newfolder = imap_utf7_encode($newfolder); 32 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,"INBOX"); 33 | $sonuc = imap_createmailbox($email->mbox, "{" . $default_host . "}" . $newfolder); 34 | imap_subscribe($email->mbox, "{" . $default_host . "}" . $newfolder); 35 | 36 | if (!$sonuc) { 37 | Header("Location: folders.php?error_id=4"); 38 | exit; 39 | } 40 | } else { // protocol = pop3 41 | $dbq = $db->execute("select mbox_id from tblMailBoxes order by mbox_id desc"); 42 | $max_mbox_id = $dbq->fields['mbox_id']; 43 | $max_mbox_id++; 44 | $dbq->close(); 45 | 46 | $newfolder = clean_data($newfolder); 47 | $dbq = $db->execute("select mbox_id from tblMailBoxes where user_id = $user_id and mboxname = '$newfolder'"); 48 | $mbox_exists = $dbq->fields['mbox_id']; 49 | if ($mbox_exists == 0) { 50 | $dbq = $db->execute("insert into tblMailBoxes values('$max_mbox_id','$user_id','$newfolder',3)"); 51 | $dbq->close(); 52 | } else { 53 | Header("Location: folders.php?error_id=4"); 54 | exit; 55 | } 56 | } // end if 57 | } else { 58 | Header("Location: folders.php?error_id=5"); 59 | exit; 60 | } 61 | 62 | Header("Location: folders.php"); 63 | } 64 | 65 | 66 | ?> 67 | -------------------------------------------------------------------------------- /createnote.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 20 | $log_id = $dbq->fields['log_id']; 21 | $user_id = $dbq->fields['user_id']; 22 | $username = $dbq->fields['username']; 23 | 24 | $dbq->close(); 25 | if ($log_id == ""){ 26 | Header("Location: index.php?error_id=1"); 27 | } else { 28 | 29 | $dbq = $db->execute("select note_id from tblNotebook order by note_id desc"); 30 | $max_note_id = $dbq->fields['note_id']; 31 | $dbq->close(); 32 | $max_note_id++; 33 | 34 | $tarih = date('Y-m-d'); 35 | 36 | $txttitle = addslashes(clean_data($txttitle)); 37 | $txtnote = addslashes(strip_tbls($txtnote)); 38 | 39 | $dbq = $db->execute("insert into tblNotebook values($max_note_id,$user_id,'$txttitle','$txtnote','$tarih')"); 40 | Header("Location: notebook.php"); 41 | } 42 | 43 | ?> 44 | -------------------------------------------------------------------------------- /deleteattachment.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 15 | $log_id = $dbq->fields['log_id']; 16 | $dbq->close(); 17 | if ($log_id == ""){ 18 | Header("Location: index.php?error_id=1"); 19 | } else { 20 | 21 | // Saving the message body to a temporary file. 22 | $dosyaadi = "msgbody.txt"; 23 | $fp = fopen($attach_directory . $ID . "#####" . "msgbody.txt", "w+"); 24 | if ($fp) { 25 | $sonuc = fputs($fp, $msgbody); 26 | fclose($fp); 27 | } //end if 28 | 29 | // Deleting the actual file. 30 | unlink($attach_directory . $slcsil); 31 | 32 | Header("Location: attachments.php?to=$to&cc=$cc&bcc=$bcc&subject=$subject&attached=1&mbox_id=$mbox_id&post_act=1"); 33 | 34 | } 35 | 36 | ?> 37 | -------------------------------------------------------------------------------- /deletecontact.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | // security check 22 | $item_id = clean_data($item_id); 23 | $dbq = $db->execute("select user_id from tblAdressbook where item_id=$item_id"); 24 | $auth_user = $dbq->fields['user_id']; 25 | if ($auth_user != $user_id) { 26 | Header("Location: index.php?error_id=1"); 27 | } 28 | $dbq->close(); 29 | 30 | if ($log_id == ""){ 31 | Header("Location: index.php?error_id=1"); 32 | } else { 33 | 34 | $dbq = $db->execute("delete from tblAdressbook where item_id = $item_id and user_id = $user_id"); 35 | $dbq->close(); 36 | 37 | Header("Location: addressbook.php"); 38 | } 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /deletefavorites.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | // security check 22 | $favorite_id = clean_data($favorite_id); 23 | $dbq = $db->execute("select user_id from tblFavorites where favorite_id=$favorite_id"); 24 | $auth_user = $dbq->fields['user_id']; 25 | if ($auth_user != $user_id) { 26 | Header("Location: index.php?error_id=1"); 27 | } 28 | $dbq->close(); 29 | 30 | if ($log_id == ""){ 31 | Header("Location: index.php?error_id=1"); 32 | } else { 33 | 34 | $dbq = $db->execute("delete from tblFavorites where favorite_id = $favorite_id and user_id = $user_id"); 35 | $dbq->close(); 36 | 37 | Header("Location: favorites.php"); 38 | } 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /deletefolder.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | $mbox_id = rawurldecode($mbox_id); 22 | $mbox_id = clean_data($mbox_id); 23 | if ($log_id == ""){ 24 | Header("Location: index.php?error_id=1"); 25 | } else { 26 | if ($default_protocol == "imap") { // protocol = imap 27 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 28 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,"INBOX"); 29 | imap_unsubscribe($email->mbox, "{" . $default_host . "}$mbox_id"); 30 | $sonuc = imap_deletemailbox($email->mbox, "{" . $default_host . "}$mbox_id"); 31 | if (!$sonuc) { 32 | Header("Location: folders.php?error_id=6"); 33 | exit; 34 | } 35 | } else { // protocol = pop3 36 | $dbq = $db->execute("select user_id from tblMailBoxes where mbox_id = $mbox_id"); // security check 37 | $auth_user = $dbq->fields['user_id']; 38 | if ($auth_user != $user_id) { 39 | Header("Location: index.php?error_id=1"); 40 | } 41 | 42 | // delete the folder 43 | $dbq = $db->execute("delete from tblMailBoxes where mbox_id = $mbox_id and user_id = $user_id"); 44 | $dbq->close(); 45 | 46 | // delete the attachments and messages 47 | $dbq = $db->execute("select message_id from tblMessages where mbox_id = $mbox_id and user_id = $user_id"); 48 | while (!$dbq->EOF) { 49 | $message_id = $dbq->fields['message_id']; 50 | $dbq2 = $db->execute("select file_actual_name from tblAttachments where message_id = $message_id and user_id = $user_id"); 51 | while (!$dbq2->EOF) { 52 | $act_name = $dbq2->fields['file_actual_name']; 53 | if (file_exists($act_name)) { 54 | unlink($act_name); 55 | } 56 | $dbq2->nextRow(); 57 | } 58 | $dbq2->close(); 59 | $dbq3 = $db->execute("delete from tblAtachments where message_id = $message_id and user_id = $user_id"); 60 | $dbq3->close(); 61 | $dbq->nextRow(); 62 | } 63 | $dbq->close(); 64 | $dbq = $db->execute("delete from tblMessages where mbox_id = $mbox_id and user_id = $user_id"); 65 | $dbq->close(); 66 | } // end if 67 | 68 | Header("Location: folders.php"); 69 | } 70 | 71 | ?> 72 | -------------------------------------------------------------------------------- /deletemessage.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 20 | $log_id = $dbq->fields['log_id']; 21 | $user_id = $dbq->fields['user_id']; 22 | $username = $dbq->fields['username']; 23 | $dbq->close(); 24 | if ($log_id == ""){ 25 | Header("Location: index.php?error_id=1"); 26 | } else { 27 | $mbox_id = rawurldecode($mbox_id); 28 | if ($default_protocol == "imap" || $mbox_id == "INBOX") { 29 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 30 | $email->empty_mailbox(); 31 | $count=count($chk); 32 | 33 | for($i=0; $i<$count; $i++) { 34 | list($chk[$i], $message_size[$i]) = split("[A]", $chk[$i]); 35 | } 36 | 37 | for ($i=0; $i<$count; $i++) { 38 | $msg_no = $chk[$i]; 39 | @imap_delete($email->mbox, $msg_no); 40 | } 41 | @imap_close($email->mbox,CL_EXPUNGE); 42 | } else { 43 | $count=count($chk); 44 | 45 | for($i=0; $i<$count; $i++) { 46 | list($chk[$i], $message_size[$i]) = split("[A]", $chk[$i]); 47 | } 48 | 49 | for ($i=0; $i<$count; $i++) { 50 | $msg_no = $chk[$i]; 51 | $dbq = $db->execute("delete from tblMessages where mbox_id=$mbox_id and user_id = $user_id and message_id = $msg_no"); 52 | $dbq->close(); 53 | 54 | $dbq = $db->execute("select file_actual_name from tblAttachments where message_id = $msg_no"); 55 | $act_name = $dbq->fields['file_actual_name']; 56 | while (!$dbq->EOF) { 57 | if (file_exists($act_name)) { 58 | unlink($act_name); 59 | } 60 | $dbq->nextRow(); 61 | } 62 | $dbq->close(); 63 | 64 | $dbq = $db->execute("delete from tblAttachments where user_id=$user_id and message_id = $msg_no"); 65 | $dbq->close(); 66 | } 67 | } 68 | 69 | Header("Location: mailbox.php?mbox_id=$mbox_id"); 70 | 71 | } 72 | 73 | ?> 74 | -------------------------------------------------------------------------------- /deletenote.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | // security check 22 | $note_id = clean_data($note_id); 23 | $dbq = $db->execute("select user_id from tblNotebook where note_id=$note_id"); 24 | $auth_user = $dbq->fields['user_id']; 25 | if ($auth_user != $user_id) { 26 | Header("Location: index.php?error_id=1"); 27 | } 28 | $dbq->close(); 29 | 30 | if ($log_id == ""){ 31 | Header("Location: index.php?error_id=1"); 32 | } else { 33 | 34 | $dbq = $db->execute("delete from tblNotebook where note_id = $note_id and user_id = $user_id"); 35 | $dbq->close(); 36 | 37 | Header("Location: notebook.php"); 38 | } 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /doc/FAQ/FAQ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/FAQ/FAQ -------------------------------------------------------------------------------- /doc/FAQ/FAQ.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/FAQ/FAQ.doc -------------------------------------------------------------------------------- /doc/FAQ/FAQ.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/FAQ/FAQ.pdf -------------------------------------------------------------------------------- /doc/INSTALL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/INSTALL -------------------------------------------------------------------------------- /doc/THANKS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/THANKS -------------------------------------------------------------------------------- /doc/TODO: -------------------------------------------------------------------------------- 1 | TODO LIST 2 | --------- 3 | * Inline HTML rendering 4 | * More preferences for the user. 5 | * WAP support. A simplified version of Postaci for WAP communications. 6 | * PGP support 7 | * Theme Support 8 | * Administration Console 9 | * Online user adding (account opening) for free webmail services. 10 | * Better adressbook, notebook, bookmark manager. 11 | * Spam protection. 12 | * Interbase , Oracle, Informix support 13 | -------------------------------------------------------------------------------- /doc/UPGRADE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/doc/UPGRADE -------------------------------------------------------------------------------- /doc/WHATSNEW: -------------------------------------------------------------------------------- 1 | WHAT' S NEW 2 | 3 | ************* 4 | VERSION 2.0.0 5 | ************* 6 | 1. Added a spellcheck feature 7 | 2. Added an addressbook window to the sendmail page 8 | 3. Added more options to the userpreference page and also the globals.inc file 9 | 4. Postaci will now calculate the size of messages that are sent 10 | 5. Passwords are no longer be stored in the database 11 | 6. A new function has been added to prevent SQL injection attacks 12 | 7. Added ability to send to multiple users using POP3 13 | 8. Added ability to send using cc and bcc using POP3 14 | 9. Fixed problems adding, renaming, and deleting folders 15 | 10.Fixed problems adding, moving, and deleting messages 16 | 11.Made it so that the message size is stored in the database when you 17 | move messages 18 | 12.Made it easier to customize the colors of Postaci 19 | 20 | ************* 21 | VERSION 1.1.3 22 | ************* 23 | 1. Added Polish and Spanish support 24 | 2. Fixed the infamous attachments bug 25 | 3. Fixed some problems with Courier-IMAP servers 26 | 4. Some minor bugfixes. 27 | 28 | ************* 29 | VERSION 1.1.2 30 | ************* 31 | 1. Added Norwegian and French support 32 | 2. Some more minor bugfixes 33 | 34 | ************* 35 | VERSION 1.1.1 36 | ************* 37 | 1. Fixed a security hole that allowed others to read unauthorized mailboxes. 38 | 2. Some more minor bugfixes 39 | 3. Added FAQ and documented the global.inc file. 40 | 4. Added support for German, Italian, Dutch, Portuguese 41 | 5. It works on Windows machines less troubly. (At least it should) 42 | 6. Added support for Qmail/vpop users. 43 | 44 | ************* 45 | VERSION 1.1.0 46 | ************* 47 | 48 | 1. Database Independency 49 | Postaci 1.1.0 uses an interface class to handle database connections. It is fast and efficient. 50 | As this version it currently supports : 51 | 52 | MySQL 53 | PostgreSQL 54 | Sybase 55 | mSQL 56 | Microsoft SQL 57 | 58 | Interbase, Oracle, Informix support is in the TO DO List. 59 | 60 | 2. Protocol Independency 61 | Postaci 1.1.0 can handle both POP3 and IMAP standarts. If IMAP support is selected during setup 62 | it will use real IMAP folders that is stored at the users' home directory. If POP3 support is 63 | enabled, because POP3 doesn' t provide folder support it will simulate it by using database tables 64 | and store the e-mail in the database, whatever engine it is. 65 | 66 | 3. A frameless, completely new user interface 67 | Postaci 1.1.0 is very much different than Postaci 1.0.x series in the users' view. The user interface 68 | was written from strach. 69 | 70 | 4. Object Oriented Programming 71 | Postaci Webmail' s source code was written from strach to support Object Oriented Programming skills. 72 | 73 | 5. Session Support 74 | Postaci 1.1.0 is programmed to work only with PHP4 because it uses built-in session support from PHP4. 75 | IT WILL NOT WORK WITH PHP3!!!. 76 | 77 | 6. Platform Independeny 78 | Postaci 1.1.0 doesn' t use any native code. So it should work on any architecture and any operating 79 | system which PHP supports. 80 | 81 | 7. Tens of improvements and bug fixes. 82 | Postaci 1.1.0 is a work derived from the feedbacks. Nearly all most wanted feautures are included in this 83 | release. 84 | 85 | 8. Remote SMTP and POP3/IMAP support 86 | Postaci 1.1.0 can fetch and send mail from/through remote servers. You don' t need to set up e-mail, http, 87 | pop3/imap server on the same machine any more.... 88 | 89 | 9. Better support for virtual domains. 90 | As from version 1.0.0, Postaci can handle with as many domain names as you want. 91 | 92 | 10. Better localization support 93 | Version 1.1.0 uses plain text files for localization. It is simpler to translate it to any other language. 94 | 95 | -------------------------------------------------------------------------------- /download_attachment.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 23 | $log_id = $dbq->fields['log_id']; 24 | $username = $dbq->fields['username']; 25 | $user_id = $dbq->fields['user_id']; 26 | $dbq->close(); 27 | 28 | if ($log_id == ""){ 29 | Header("Location: index.php?error_id=1"); 30 | } else { 31 | $real_name = rawurldecode($real_name); 32 | if ($default_protocol == "imap" || $mbox_id == "INBOX") { // real mailbox, IMAP or POP3 33 | $mbox_id = rawurldecode($mbox_id); 34 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 35 | $email->empty_mailbox(); 36 | $body=imap_fetchbody($email->mbox,$msg_no,$part); 37 | if ($encoding==3){ 38 | $body = imap_base64($body); 39 | } 40 | if ($encoding==4){ 41 | $body = imap_qprint($body); 42 | } 43 | 44 | // Find the MIME type from the extension... 45 | $tersname = strrev($real_name); 46 | $dosya_isim = stristr($tersname,"."); 47 | $lenisim = strlen($dosya_isim); 48 | $extension=trim(strtolower(substr($real_name,$lenisim))); 49 | 50 | $mime_type = "application/octet-stream"; 51 | $dbq = $db->execute("select mime_type from tblMIME where mime_ext = '$extension'"); 52 | $mime_type = $dbq->fields['mime_type']; 53 | $dbq->close(); 54 | 55 | Header("Content-type: $mime_type; name=$real_name"); 56 | Header("Content-Disposition: attachment; filename=$real_name"); 57 | echo $body; 58 | } else { // pop3 database simulation 59 | if ($attach_type != 1){ 60 | 61 | $dbq = $db->execute("select user_id from tblMessages where message_id=$msg_no"); 62 | $auth_user = $dbq->fields['user_id']; 63 | $dbq->close(); 64 | if ($auth_user != $user_id) { 65 | Header("Location: index.php?error_id=1"); 66 | } 67 | 68 | $dbq = $db->execute("select file_actual_name from tblAttachments where message_id = $msg_no and user_id = $user_id and attach_id=$attach_id"); 69 | $file_actual_name = $dbq->fields['file_actual_name']; 70 | $dbq->close(); 71 | 72 | // Find the MIME type from the extension... 73 | $tersname = strrev($real_name); 74 | $dosya_isim = stristr($tersname,"."); 75 | $lenisim = strlen($dosya_isim); 76 | $extension=trim(strtolower(substr($real_name,$lenisim))); 77 | 78 | $mime_type = "application/octet-stream"; 79 | $dbq = $db->execute("select mime_type from tblMIME where mime_ext = '$extension'"); 80 | $mime_type = $dbq->fields['mime_type']; 81 | $dbq->close(); 82 | 83 | $fp=fopen($file_actual_name,"r"); 84 | $body = fread($fp, filesize($file_actual_name)); 85 | fclose($fp); 86 | Header("Content-type: $mime_type; name=$real_name"); 87 | Header("Content-Disposition: attachment; filename=$real_name"); 88 | echo $body; 89 | } else { 90 | 91 | $dbq = $db->execute("select user_id from tblMessages where message_id=$msg_no"); // security check 92 | $auth_user = $dbq->fields['user_id']; 93 | $dbq->close(); 94 | if ($auth_user != $user_id) { 95 | Header("Location: index.php?error_id=1"); 96 | } 97 | 98 | $dbq = $db->execute("select msg_body from tblMessages where message_id = $msg_no and user_id = $user_id and mbox_id=$mbox_id"); 99 | $body = $dbq->fields['msg_body']; 100 | $dbq->close(); 101 | $mime_type = "plain/text"; 102 | Header("Content-type: $mime_type; name=$real_name"); 103 | Header("Content-Disposition: attachment; filename=$real_name"); 104 | echo $body; 105 | } 106 | } 107 | } 108 | 109 | ?> 110 | -------------------------------------------------------------------------------- /favoritesupdate.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $user_id = $dbq->fields['user_id']; 18 | $username = $dbq->fields['username']; 19 | $dbq->close(); 20 | 21 | // security check 22 | $dbq = $db->execute("select user_id from tblFavorites where favorite_id=$favorite_id"); 23 | $auth_user = $dbq->fields['user_id']; 24 | if ($auth_user != $user_id) { 25 | Header("Location: index.php?error_id=1"); 26 | } 27 | $dbq->close(); 28 | 29 | if ($log_id == ""){ 30 | Header("Location: index.php?error_id=1"); 31 | } else { 32 | 33 | $txturl = clean_data($txturl); 34 | $txttitle = clean_data($txttitle); 35 | $txtnotes = clean_data($txtnotes); 36 | 37 | $dbq = $db->execute("update tblFavorites set url='$txturl',url_title = '$txttitle',notes='$txtnotes' where user_id = $user_id and favorite_id = $favorite_id"); 38 | $dbq->close(); 39 | 40 | Header("Location: favorites.php"); 41 | } 42 | 43 | ?> 44 | -------------------------------------------------------------------------------- /htaccess: -------------------------------------------------------------------------------- 1 | php_value register_globals on 2 | -------------------------------------------------------------------------------- /images/attach.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/attach.gif -------------------------------------------------------------------------------- /images/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/background.gif -------------------------------------------------------------------------------- /images/block.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/block.gif -------------------------------------------------------------------------------- /images/bt_addressbook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/bt_addressbook.gif -------------------------------------------------------------------------------- /images/bt_addressbook2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/bt_addressbook2.gif -------------------------------------------------------------------------------- /images/bt_email.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/bt_email.gif -------------------------------------------------------------------------------- /images/bt_favorites.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/bt_favorites.gif -------------------------------------------------------------------------------- /images/bt_notebook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/bt_notebook.gif -------------------------------------------------------------------------------- /images/button.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/button.psd -------------------------------------------------------------------------------- /images/company_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/company_logo.jpg -------------------------------------------------------------------------------- /images/company_logo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/company_logo2.jpg -------------------------------------------------------------------------------- /images/company_logo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/company_logo3.jpg -------------------------------------------------------------------------------- /images/delete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/delete.gif -------------------------------------------------------------------------------- /images/deutsch_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/deutsch_version1.gif -------------------------------------------------------------------------------- /images/deutsch_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/deutsch_version2.gif -------------------------------------------------------------------------------- /images/dot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/dot.gif -------------------------------------------------------------------------------- /images/dutch_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/dutch_version1.gif -------------------------------------------------------------------------------- /images/dutch_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/dutch_version2.gif -------------------------------------------------------------------------------- /images/empty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/empty.gif -------------------------------------------------------------------------------- /images/english_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/english_version1.gif -------------------------------------------------------------------------------- /images/english_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/english_version2.gif -------------------------------------------------------------------------------- /images/espanol_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/espanol_version1.gif -------------------------------------------------------------------------------- /images/espanol_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/espanol_version2.gif -------------------------------------------------------------------------------- /images/forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/forward.gif -------------------------------------------------------------------------------- /images/francais_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/francais_version1.gif -------------------------------------------------------------------------------- /images/francais_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/francais_version2.gif -------------------------------------------------------------------------------- /images/italiano_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/italiano_version1.gif -------------------------------------------------------------------------------- /images/italiano_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/italiano_version2.gif -------------------------------------------------------------------------------- /images/line_horizantal_shadow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/line_horizantal_shadow.gif -------------------------------------------------------------------------------- /images/line_tool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/line_tool.gif -------------------------------------------------------------------------------- /images/line_vertical_blue_back.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/line_vertical_blue_back.gif -------------------------------------------------------------------------------- /images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/next.gif -------------------------------------------------------------------------------- /images/norsk_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/norsk_version1.gif -------------------------------------------------------------------------------- /images/norsk_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/norsk_version2.gif -------------------------------------------------------------------------------- /images/polski_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/polski_version1.gif -------------------------------------------------------------------------------- /images/polski_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/polski_version2.gif -------------------------------------------------------------------------------- /images/portugues_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/portugues_version1.gif -------------------------------------------------------------------------------- /images/portugues_version1.gif.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/portugues_version1.gif.tmp -------------------------------------------------------------------------------- /images/portugues_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/portugues_version2.gif -------------------------------------------------------------------------------- /images/postaci_webmail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/postaci_webmail.jpg -------------------------------------------------------------------------------- /images/previous.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/previous.gif -------------------------------------------------------------------------------- /images/print.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/print.gif -------------------------------------------------------------------------------- /images/reply.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/reply.gif -------------------------------------------------------------------------------- /images/save.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/save.gif -------------------------------------------------------------------------------- /images/sponsor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/sponsor.gif -------------------------------------------------------------------------------- /images/turkce_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/turkce_version1.gif -------------------------------------------------------------------------------- /images/turkce_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/turkce_version2.gif -------------------------------------------------------------------------------- /images/turkish_version1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/turkish_version1.gif -------------------------------------------------------------------------------- /images/turkish_version2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/turkish_version2.gif -------------------------------------------------------------------------------- /images/welcome.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome.psd -------------------------------------------------------------------------------- /images/welcome_deutsch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_deutsch.gif -------------------------------------------------------------------------------- /images/welcome_dutch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_dutch.gif -------------------------------------------------------------------------------- /images/welcome_english.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_english.gif -------------------------------------------------------------------------------- /images/welcome_espanol.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_espanol.gif -------------------------------------------------------------------------------- /images/welcome_francais.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_francais.gif -------------------------------------------------------------------------------- /images/welcome_italiano.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_italiano.gif -------------------------------------------------------------------------------- /images/welcome_norsk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_norsk.gif -------------------------------------------------------------------------------- /images/welcome_polski.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_polski.gif -------------------------------------------------------------------------------- /images/welcome_polski.gif.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_polski.gif.tmp -------------------------------------------------------------------------------- /images/welcome_portugues.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_portugues.gif -------------------------------------------------------------------------------- /images/welcome_turkce.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/images/welcome_turkce.gif -------------------------------------------------------------------------------- /import_addressbook.php: -------------------------------------------------------------------------------- 1 | execute("select user_id from tblLoggedUsers where hash = '$ID'"); 15 | $user_id = $dbq->fields['user_id']; 16 | $dbq->close(); 17 | 18 | $uploaddir = "/tmp/postaci/"; 19 | $filename = $uploaddir . $ID; 20 | 21 | if (copy($userfile, $filename)) { 22 | $fp = fopen($filename, "r"); 23 | 24 | // We want to remove all of the possible column headings, if we don't the name of the first record will 25 | // include the last column heading name. 26 | $column_headings = array("First Name", "Last Name", "Middle Name", "Name", "Nickname", "E-mail Address", "Home Street", "Home City", "Home Postal Code", "Home State", "Home Country/Region", "Home Phone", "Home Fax", "Mobile Phone", "Personal Web Page", "Business Street", "Business City", "Business Postal Code", "Business State", "Business Country/Region", "Business Phone", "Business Fax", "Pager", "Company", "Job Title", "Department", "Office Location", "Notes"); 27 | 28 | $addresses = fread($fp, filesize($filename)); 29 | fclose($fp); 30 | $addresses = str_replace($column_headings, "", $addresses); 31 | $list = explode(",", $addresses); // Divide $addresses into an array called $list 32 | 33 | $dbq = $db->execute("select item_id from tblAdressbook order by item_id desc"); 34 | $max_item_id = $dbq->fields['item_id']; 35 | $dbq->close(); 36 | $max_item_id++; 37 | 38 | // When an email address is detectcted, the record just before it will be the name that corresponds to it. 39 | // The name and email address are then written to the database 40 | for($i=0; $i<=sizeof($list); $i++) { 41 | if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $list[$i])) { 42 | $list[$i-1] = clean_data($list[$i-1]); 43 | $list[$i] = clean_data($list[$i]); 44 | $dbq = $db->execute("insert into tblAdressbook values($max_item_id,$user_id,'".$list[$i-1]."','".$list[$i]."','','')"); 45 | $max_item_id ++; 46 | } 47 | } 48 | $dbq->close(); 49 | unlink($filename); 50 | Header("Location: addressbook.php?note=1"); 51 | } else { 52 | Header("Location: addressbook.php?note=2"); 53 | } 54 | ?> 55 | -------------------------------------------------------------------------------- /includes/commonhead.inc: -------------------------------------------------------------------------------- 1 | \n"; 12 | echo "\n"; 13 | echo "$title\n"; 14 | echo "\n"; 15 | echo "\n"; 16 | ?> 17 | -------------------------------------------------------------------------------- /includes/finish_spell.php: -------------------------------------------------------------------------------- 1 | "; 43 | $index= $index+1; 44 | } 45 | 46 | //print "Original text:
"; 47 | //print nl2br($text); 48 | //print "
"; 49 | 50 | foreach ($textarray as $key=>$value) { 51 | $newtext.=$value; 52 | } 53 | } 54 | ?> 55 | -------------------------------------------------------------------------------- /includes/functions.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/includes/functions.inc -------------------------------------------------------------------------------- /includes/global.inc: -------------------------------------------------------------------------------- 1 | 23 | 24 | $database_type = "mysql"; 25 | 26 | // 3. 27 | // Specify the hostname where database is located. It may be an IP number, hostname or dns name 28 | // You should grant usage to the webmail server(IP) and database user the select, insert, delete, 29 | // update permissions in order to install Postaci if the database server is a remote one. 30 | // See INSTALL file for details. If Postaci is on the database server no need to change this. 31 | 32 | $database_host = "localhost"; 33 | 34 | // 4. The database name, username and password. 35 | // YOU REALLY NEED TO CHANGE THESE. 36 | 37 | $database_user = ""; 38 | $database_user_pass = ""; 39 | $database_name = ""; 40 | 41 | // 5. 42 | // You should select which protocol to use. Postaci supports both IMAP and POP3 mailboxes. 43 | // Possible values : imap, pop3 44 | 45 | $default_protocol = "imap"; 46 | 47 | // 6. 48 | // The POP3/IMAP servername, IP or DNS name. If Postaci is on the POP3/IMAP server, no need 49 | // to change this. 50 | 51 | $default_host = "localhost"; 52 | 53 | // 7. 54 | // Default port for IMAP access is 143 and it is 110 for POP3. If yours is different simply 55 | // change this value. If you are not sure leave as default. 56 | 57 | $default_port = "143"; 58 | 59 | // 8. 60 | // SMTP host information. Postaci can use another relay server for sending mail. If $smtp_host is 61 | // left as default value(localhost) things will go slightly faster. If you want to use another SMTP 62 | // server for sending e-mail you can use the IP, hostname or DNS name here. 63 | // If a remote server is defined here, Postaci will try to connect to the server via SMTP port and 64 | // try to deliver the mail. This is work in progress, so please report any success or failure. 65 | // SMTP servers normally reside on port 25. So you normally don' t need to change $smtp port value. 66 | // $smtp_auth - Does your smtp server require authentication? yes/no 67 | // $smtp_imap - If your smtp server does require a login, is it the same 68 | // username and password used for imap or pop3? yes/no 69 | // $smtp_same - If your smtp server does require a login, do you want everyone to use the same 70 | // username and password? yes/no If yes then you must set $smtp_user and $smtp_pass 71 | 72 | $smtp_host = "localhost"; 73 | $smtp_port = "25"; 74 | $smtp_auth = "no"; 75 | $smtp_imap = "no"; 76 | $smtp_same = "no"; 77 | $smtp_user = ''; 78 | $smtp_pass = ''; 79 | 80 | // 9. 81 | // $attach_directory is the place where Postaci uploads the attachments to be sent for temporary 82 | // storage. 83 | // DO NOT FORGET THE TAILING SLASH!!!, YOU REALLY NEED TO CHANGE THIS. 84 | 85 | $attach_directory = "/tmp/postaci/send/"; 86 | 87 | // 10. 88 | // postaci_directory is where the Postaci installation resides on your directory structure. 89 | // This varible is really important. If you do not set it you will get an empty screen. 90 | // DO NOT FORGET THE TAILING SLASH!!! YOU REALLY NEED TO CHANGE THIS 91 | 92 | $postaci_directory = "/val/www/postaci/"; 93 | 94 | // 11. 95 | // Although Cyrus IMAP has some slight differences, Postaci seems to work with all IMAP servers. 96 | // In case you need it set this value to true and please report any incompatibilities. 97 | 98 | $cyrus_imap_server = false; 99 | 100 | // 12. 101 | // If you are using POP3 protocol, you should have a non-web accessable directory for 102 | // storing attachments. This directory' s permissions should be 700 and the owner should be nobody 103 | // (the user that runs the httpd). Although you don' t use POP3 this directory should lead to an 104 | // existing directory. (Ex : /tmp) 105 | // DO NOT FORGET THE TAILING SLASH!!! 106 | 107 | $pop3_attach_dir = "/tmp/postaci/store/"; 108 | 109 | // 13. 110 | // You set the title here. 111 | 112 | $title = "Postaci Webmail"; 113 | 114 | // 14. 115 | // Seperator is the value used for limiting the number of messages to be shown at each page. 116 | // NO NEED TO CHANGE THIS. 117 | 118 | // $seperator = 15; 119 | 120 | // 15. 121 | // Operating system. As from version 1.1.1, Postaci both supports Unix/Linux/BSD and Windows systems. 122 | // You can select you operating system here. 123 | // Possible values : windows, unix 124 | 125 | $operating_system = "unix"; 126 | 127 | // 16. 128 | // This is the error value for PHP configuration. If you think you have found a bug or want to 129 | // contact the author, comment the following line with two slashes and e-mail the error/warning messages to 130 | // "Umut Gokbayrak " 131 | 132 | error_reporting(32); 133 | 134 | // 17. 135 | // Please enter your TEMP directory here. This directory is used for temprarily storing session files. 136 | // Windows port of PHP doesn't handle TEMP directories by itself so Windows users need to specify it here. 137 | // It can be any directory with appropriate permissions. Just uncomment it (delete two slashes) and assing 138 | // the correct value. 139 | // WINDOWS USERS NEED THIS. 140 | 141 | // $temp_directory = "c:\\temp"; 142 | $temp_directory = "/tmp/postaci/"; 143 | 144 | // 18. 145 | // If you want to remove that sponsored by... banner simply change this value to false. 146 | 147 | $show_sponsor = false; 148 | 149 | // 19. 150 | // Qmail users which store accounts and messages in databases require special login format. In order to avoid 151 | // this imcompatibility simply change this value to true. 152 | 153 | $qmail_support = false; 154 | 155 | // 20. 156 | // You can specify a footer text for every message outgoing from the server. 157 | // This field is optinal. If you need a new line in the text, use \n for the purpose. 158 | 159 | $footer_message = ""; 160 | 161 | // 21. 162 | // To cope with courier-imap personal folders 163 | 164 | $courier_imap_support = false; 165 | 166 | // The following only are considered if courier-imap support is on 167 | // If php imap supports NAMESPACE server extension (RFC2342) this 168 | // could be configured automatically. 169 | // DO NOT FORGET THE TRAILING PERIOD 170 | 171 | $personal_namespace = "INBOX."; 172 | 173 | // 22. 174 | // Decide which language selections to show in the main page. 175 | // If any language is set to true a button will appear 176 | // on the intro screen which will let you use Postaci using that language settings. 177 | // Possible values : true and false 178 | 179 | $turkce_support = true; 180 | $english_support = true; 181 | $francais_support = true; 182 | $deutsch_support = true; 183 | $polski_support = true; 184 | $espanol_support = true; 185 | $portugues_support = true; 186 | $dutch_support = true; 187 | $norsk_support = true; 188 | $italiano_support = true; 189 | 190 | // 23. 191 | // Background Color for the top left corner. 192 | // The top and left sides are gif images. You can edit 193 | // those images and then change this color to match them. 194 | 195 | $bgc = "#273C79"; 196 | 197 | // 24. 198 | // This text will appear at the bottom of each page. 199 | 200 | $footer = "Postaci WebMail"; 201 | 202 | // 25. 203 | // These variables change the background colors of the input fields in sendmail.php 204 | // $scolor is the color of the field that is selected 205 | // $nscolor is the color of the fields when they are not selected 206 | 207 | $scolor = "#FFFFFF"; 208 | $nscolor = "#DFE7EE"; 209 | 210 | // 26. 211 | // This variable enables the spellcheck feature. 212 | // true = on and false = off 213 | // To change the dictionary used, just change the $spell_language variable in the 214 | // translation file of the particular language you want to change. 215 | // All of the translation files are located in the lang directory. 216 | 217 | $spellcheck_on = true; 218 | 219 | /**************************************************************/ 220 | /* No Need to change anything below. */ 221 | /**************************************************************/ 222 | 223 | $postaci_version = "2"; 224 | if ($operating_system == "windows") { 225 | session_save_path($temp_directory); 226 | } 227 | 228 | $to_folder = "Sent Items"; 229 | 230 | if (trim($l) != "" && trim($l) != '$lang_choice') { 231 | $lang_choice = $l; 232 | } else { 233 | if ($lang_choice == "") { 234 | $lang_choice = $default_lang; 235 | } 236 | } 237 | 238 | switch ($lang_choice) { 239 | case "portugues": 240 | case "dutch": 241 | case "deutsch": 242 | case "italiano": 243 | case "francais": 244 | case "norsk": 245 | case "turkce": 246 | case "espanol": 247 | case "polski": 248 | case "english": 249 | include("$postaci_directory" . "lang/" . "$lang_choice" . ".inc"); 250 | break; 251 | default: 252 | die("

Invalid language selection

"); 253 | } 254 | 255 | include("$postaci_directory" . "classes/phpDB.inc"); 256 | 257 | $db = new phpDB(); 258 | $db->pconnect("$database_host", "$database_user", "$database_user_pass", "$database_name") or die ("

$text75

"); 259 | ?> 260 | -------------------------------------------------------------------------------- /includes/headinside.inc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 21 | 22 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
            
20 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /includes/javascripts.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/includes/javascripts.inc -------------------------------------------------------------------------------- /includes/spellcheck.php: -------------------------------------------------------------------------------- 1 | "; 29 | $closer= ""; 30 | // 31 | // END OF CONFIGURATION 32 | 33 | 34 | if ($fd=fopen($temptext,"w")) { 35 | $textarray= explode("\n",$text); 36 | fwrite($fd,"!\n"); 37 | foreach($textarray as $key=>$value) { 38 | // adding the carat to each line prevents the use of aspell commands within the text... 39 | fwrite($fd,"^$value\n"); 40 | } 41 | fclose($fd); 42 | 43 | // next create tempdict and temprepl (skipping for now...) 44 | 45 | // next run aspell 46 | $return= shell_exec($aspellcommand); 47 | 48 | // now unlink that tempfile 49 | $ureturn= unlink($temptext); 50 | 51 | //next parse $return and $text line by line, eh? 52 | $returnarray= explode("\n",$return); 53 | $returnlines= count($returnarray); 54 | $textlines= count($textarray); 55 | 56 | //print "text has $textlines lines and return has $returnlines lines."; 57 | $lineindex= -1; 58 | $poscorrect= 0; 59 | $counter= 0; 60 | foreach($returnarray as $key=>$value) { 61 | // if there is a correction here, processes it, else move the $textarray pointer to the next line 62 | if (substr($value,0,1)=="&") { 63 | //print "Line $lineindex correction:".$value."
"; 64 | $correction= explode(" ",$value); 65 | $word= $correction[1]; 66 | $absposition= substr($correction[3],0,-1)-1; 67 | $position= $absposition+$poscorrect; 68 | $niceposition= $lineindex.",".$absposition; 69 | $suggstart= strpos($value,":")+2; 70 | $suggestions= substr($value,$suggstart); 71 | $suggestionarray= explode(", ",$suggestions); 72 | //print "I found $word at $position. Will suggest $suggestions.
"; 73 | 74 | // highlight in text 75 | $beforeword= substr($textarray[$lineindex],0,$position); 76 | $afterword= substr($textarray[$lineindex],$position+strlen($word)); 77 | $textarray[$lineindex]= $beforeword."$opener$word$closer".$afterword; 78 | 79 | // kludge for multiple words in one line ("" adds 7 chars to subsequent positions, for instance) 80 | $poscorrect= $poscorrect+strlen("$opener$closer"); 81 | 82 | // build the correction form 83 | $counter= $counter+1; 84 | $formbody.= " 85 | $word 86 | 87 | 88 | 89 | 99 | 100 | 101 | "; 102 | } 103 | 104 | elseif (substr($value,0,1)=="#") { 105 | //print "Line $lineindex unknown:".$value."
"; 106 | $correction= explode(" ",$value); 107 | $word= $correction[1]; 108 | $absposition= $correction[2] - 1; 109 | $position= $absposition+$poscorrect; 110 | $niceposition= $lineindex.",".$absposition; 111 | $suggestions= "no suggestions"; 112 | $suggestionarray= explode(", ",$suggestions); 113 | //print "I found $word at $position. Will suggest $suggestions.
"; 114 | 115 | // highlight in text 116 | $beforeword= substr($textarray[$lineindex],0,$position); 117 | $afterword= substr($textarray[$lineindex],$position+strlen($word)); 118 | $textarray[$lineindex]= $beforeword."$opener$word$closer".$afterword; 119 | 120 | // kludge for multiple words in one line ("" adds 7 chars to subsequent positions) 121 | $poscorrect= $poscorrect+strlen("$opener$closer"); 122 | 123 | // build the correction form 124 | $counter= $counter+1; 125 | $formbody.= " 126 | $word 127 | 128 | 129 | 130 | 136 | 137 | 138 | "; 139 | } 140 | 141 | else { 142 | //print "Done with line $lineindex, next line...

"; 143 | $poscorrect=0; 144 | $lineindex= $lineindex+1; 145 | } 146 | } 147 | } 148 | print "
$text110
"; 149 | foreach ($textarray as $key=>$value) { 150 | print stripslashes($value)."
"; 151 | } 152 | print "
"; 153 | 154 | $htmltext= htmlentities($text); 155 | if ($formbody=="") { 156 | $formbody= " 
$text115"; 157 | $button = $text114; 158 | } else { $button = $text112; } 159 | print "

$text111

160 |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | $formbody
169 |
"; 170 | if ($button == $text112) { 171 | print " "; 172 | } 173 | print "
"; 174 | 175 | } 176 | 177 | // or if text+correct is specified, make the indicated corrections 178 | elseif (trim($text)!="" && $_POST['submit']=="correct") { 179 | $textarray= explode("\n",$text); 180 | 181 | $index= 1; 182 | $lastlineindex= 0; 183 | $poscorrect= 0; 184 | 185 | // look through list of positions and make corrections 186 | while (isset($_POST["position$index"])) { 187 | $positionarray= explode(",",$_POST["position$index"]); 188 | $lineindex= $positionarray[0]; 189 | $absposition= $positionarray[1]; 190 | 191 | if ($lastlineindex==$lineindex) { 192 | $position= $absposition+$poscorrect; 193 | } 194 | else { 195 | $poscorrect= 0; 196 | $position= $absposition; 197 | } 198 | $lastlineindex= $lineindex; 199 | $correct= $_POST["correct$index"]; 200 | $incorrect= $_POST["incorrect$index"]; 201 | //print "Found correction at $lineindex,$absposition. Replacing "; 202 | 203 | $before= substr($textarray[$lineindex],0,$position); 204 | $after= substr($textarray[$lineindex],$position+strlen($incorrect)); 205 | $textarray[$lineindex]= $before.$correct.$after; 206 | 207 | $poscorrect= (strlen($correct)-strlen($incorrect))+$poscorrect; 208 | //print "Position correction is now $poscorrect.
"; 209 | $index= $index+1; 210 | } 211 | 212 | foreach ($textarray as $key=>$value) { 213 | $newtext.=$value; 214 | } 215 | print " 216 |
217 |

Your Corrected Text:


218 |
219 | | Clear/Restart | Show Source 220 |
"; 221 | } 222 | ?> 223 | -------------------------------------------------------------------------------- /includes/stylesheets.inc: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
ver :  <? echo $postaci_version; ?>
37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 47 | 114 | 181 | 182 |

48 | 49 | 50 | 84 | 85 | 86 | 87 | 88 | 89 | $text78\n"; 92 | } else { 93 | echo "\n"; 94 | } 95 | ?> 96 | 97 | 98 | 111 | 112 |
51 |
\n"; 54 | } 55 | if ($english_support) { 56 | echo "
\n"; 57 | } 58 | if ($dutch_support) { 59 | echo "
\n"; 60 | } 61 | if ($portugues_support) { 62 | echo "
\n"; 63 | } 64 | if ($italiano_support) { 65 | echo "
\n"; 66 | } 67 | if ($deutsch_support) { 68 | echo "
\n"; 69 | } 70 | if ($francais_support) { 71 | echo "
\n"; 72 | } 73 | if ($norsk_support) { 74 | echo "
\n"; 75 | } 76 | if ($polski_support) { 77 | echo "
\n"; 78 | } 79 | if ($espanol_support) { 80 | echo "
\n"; 81 | } 82 | ?> 83 |
 
 
99 |
100 | 101 | 102 | \n"; 105 | } 106 | ?> 107 | 108 |
109 |
110 |
113 |
115 | 116 | 117 | 176 | 178 | 179 |
118 |

 

119 |
120 |
121 |
122 | " width="393" height="111" alt="">
123 | $text5
"; 127 | break; 128 | case 2: 129 | echo "$text9
"; 130 | break; 131 | case 3: 132 | echo "$text89
"; 133 | break; 134 | default: 135 | echo " 
"; 136 | } 137 | ?> 138 | 139 | 140 | 141 | 144 | 145 | 146 | 147 | 148 | 151 | 152 | 153 | 154 | 155 | 158 | 159 | 160 | 163 | 164 | 165 | 166 | 167 | 170 | 171 |
142 |
143 |
: 149 | 150 |
: 156 | 157 |
161 |
162 |
   168 | "> 169 |
172 |
173 |

 

174 |

 

175 |
177 |
180 |
183 | 184 | 185 | -------------------------------------------------------------------------------- /lang/deutsch.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/deutsch.inc -------------------------------------------------------------------------------- /lang/dutch.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/dutch.inc -------------------------------------------------------------------------------- /lang/english.inc: -------------------------------------------------------------------------------- 1 | gnu.org"; 104 | $text85 = "Delete Message"; 105 | $text86 = "Add to addressbook"; 106 | $text87 = "Add Sender To Spam List"; 107 | $text88 = "Message body empty"; 108 | $text89 = "The mailbox you try to access does not exist. Please try logging in again, if the problem exists contact your system administrator."; 109 | $text90 = "You have exceeded 2 MB file quota or an error has occured."; 110 | $text91 = "Problem with the SMTP host. Please contact the system administrator."; 111 | $text92 = "Error : There exists a folder with the same name or mailbox not empty."; 112 | $text93 = "Error : Folder name cannot be empty!!!"; 113 | $text94 = "Error : Folder is not empty."; 114 | $text95 = "Error : A folder with the same name exists."; 115 | $text96 = "User succesfully added to the adressbook."; 116 | $text97 = "Spammer e-mail"; 117 | $text98 = "Date added to list"; 118 | $text99 = "Nobody in the list"; 119 | $text100 = "Your Name and Surname"; 120 | $text101 = "Your Signature"; 121 | $text102 = "Invalid email address. Try Again."; 122 | $text103 = "Clean Email"; 123 | $text104 = "Display"; 124 | $text105 = "emails per page."; 125 | $text106 = "Click on an address to add to the selected field."; 126 | $text107 = "Enable"; 127 | $text108 = "There isn't anything to check."; 128 | $text109 = "Spell Check"; 129 | $text110 = "Original Text (potential errors in bold):"; 130 | $text111 = "Corrections:"; 131 | $text112 = "Correct"; 132 | $text113 = "Reset"; 133 | $text114 = "Continue"; 134 | $text115 = "No errors."; 135 | $text116 = "Import Outlook Express Address Book (Comma Separated Values Format)"; 136 | $text117 = "Address Book Import Was Successful!"; 137 | $text118 = "Address Book Import Was Not Successful!"; 138 | $text119 = "Instructions"; 139 | $text120 = "Import"; 140 | 141 | ?> 142 | -------------------------------------------------------------------------------- /lang/espanol.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/espanol.inc -------------------------------------------------------------------------------- /lang/francais.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/francais.inc -------------------------------------------------------------------------------- /lang/italiano.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/italiano.inc -------------------------------------------------------------------------------- /lang/norsk.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/norsk.inc -------------------------------------------------------------------------------- /lang/polski.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/polski.inc -------------------------------------------------------------------------------- /lang/portugues.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/portugues.inc -------------------------------------------------------------------------------- /lang/turkce.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/lang/turkce.inc -------------------------------------------------------------------------------- /message_move.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/message_move.php -------------------------------------------------------------------------------- /notebook.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | 20 | Header("Location: index.php?error_id=1"); 21 | } else { 22 | 23 | function mychop($thistring,$length) { 24 | $result=""; 25 | $mystring=trim($thistring); 26 | if (strlen($mystring)>$length) { 27 | $result=substr($mystring,0,$length); 28 | $result = "$result..."; 29 | }else { 30 | $result=$mystring; 31 | } 32 | 33 | return($result); 34 | } 35 | 36 | $mbox_id = rawurldecode($mbox_id); 37 | 38 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 39 | 40 | // Check to see if the mbox_id is a valid one. 41 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 42 | $username = $dbq->fields['username']; 43 | $user_id = $dbq->fields['user_id']; 44 | $dbq->close(); 45 | 46 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 47 | 48 | include ("$postaci_directory" . "includes/commonhead.inc"); 49 | include ("$postaci_directory" . "includes/stylesheets.inc"); 50 | include ("$postaci_directory" . "includes/javascripts.inc"); 51 | include ("$postaci_directory" . "includes/functions.inc"); 52 | 53 | ?> 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
ver :  <? echo $postaci_version; ?>
64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 | 72 | 73 | 74 | 162 | 266 | 267 | 268 | 269 | 270 | 275 | 276 | 277 |

75 | 76 | 77 | 80 | 81 | 82 | 85 | 86 | 87 | 90 | 91 | 92 | 125 | 126 | 127 | 130 | 131 | 132 | 135 | 136 | 137 | $text78\n"; 140 | } else { 141 | echo "\n"; 142 | } 143 | ?> 144 | 145 | 146 | 159 | 160 |
78 | 79 |
83 | 84 |
88 | 89 |
93 | 94 | 95 | 98 | 122 | 123 |
96 | 97 | 99 | INBOX
"; 102 | } 103 | $folders = $email->getMailboxes(); 104 | $folder_names = array(); 105 | $folder_counter=-1; 106 | while (list($key,$val) = each($folders["name"])) { 107 | $folder_counter++; 108 | $folder_names[$folder_counter] = $val; 109 | } 110 | $ids = array(); 111 | $folder_counter=-1; 112 | while (list($key,$val) = each($folders["id"])) { 113 | $folder_counter++; 114 | $ids[$folder_counter] = $val; 115 | } 116 | 117 | for($i=0;$i$folder_names[$i]
"; 119 | } 120 | ?> 121 |
124 |
128 | 129 |
133 | 134 |
 
147 |
148 | 149 | 150 | \n"; 153 | } 154 | ?> 155 | 156 |
157 |
158 |
161 |
163 | 164 | 165 | 166 | 167 | 170 | \n"; 184 | echo " \n"; 185 | echo " \n"; 186 | echo " \n"; 187 | echo " \n"; 188 | 189 | $dbq = $db->execute("select note_id from tblNotebook where user_id = $user_id"); 190 | $notecount = $dbq->getNumOfRows(); 191 | $dbq->close(); 192 | 193 | 194 | if ($notecount == 0) { 195 | echo " \n"; 196 | echo " \n"; 197 | echo " \n"; 198 | } else { 199 | $dbq = $db->execute("select * from tblNotebook where user_id = $user_id order by note_id desc"); 200 | while (!$dbq->EOF) { 201 | $note_id = $dbq->fields['note_id']; 202 | $notetitle = stripslashes($dbq->fields['notetitle']); 203 | $note_date = $dbq->fields['note_date']; 204 | 205 | echo " \n"; 206 | echo " \n"; 207 | echo " \n"; 208 | echo " \n"; 209 | echo " \n"; 210 | 211 | $dbq->nextRow(); 212 | } 213 | $dbq->close(); 214 | } 215 | 216 | echo "
168 |

169 |
171 |
 
172 | 173 | 174 | 177 | 178 | 179 |
 
 
180 | 181 | \n"; 183 | echo "
$text56$text14 
 
$text58

$notetitle$note_date$text57
\n"; 217 | ?> 218 | 219 |
220 | 221 | 222 | 260 | 261 |
223 | 224 | 225 | 226 | 227 | 228 | 257 | 258 |
229 | 230 | 231 | 232 | 235 | 238 | 239 | 240 | 241 | 244 | 247 | 248 | 249 | 250 | 253 | 254 | 255 |
233 |
:
234 |
236 | 237 |
  242 |
243 |
245 | 246 |
  251 |
252 |
256 |
259 |
262 |
263 | 264 |

 

265 |
 
  271 |
272 |
273 |

274 |

 
278 | 279 | 280 | 281 | 282 | 283 | 284 | 287 | -------------------------------------------------------------------------------- /notebookdetails.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | 20 | Header("Location: index.php?error_id=1"); 21 | } else { 22 | 23 | function mychop($thistring,$length) { 24 | $result=""; 25 | $mystring=trim($thistring); 26 | if (strlen($mystring)>$length) { 27 | $result=substr($mystring,0,$length); 28 | $result = "$result..."; 29 | }else { 30 | $result=$mystring; 31 | } 32 | 33 | return($result); 34 | } 35 | 36 | $mbox_id = rawurldecode($mbox_id); 37 | 38 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 39 | 40 | // Check to see if the mbox_id is a valid one. 41 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 42 | $username = $dbq->fields['username']; 43 | $user_id = $dbq->fields['user_id']; 44 | $dbq->close(); 45 | 46 | // security check 47 | $note_id = clean_data($note_id); 48 | $dbq = $db->execute("select user_id from tblNotebook where note_id=$note_id"); 49 | $auth_user = $dbq->fields['user_id']; 50 | if ($auth_user != $user_id) { 51 | Header("Location: index.php?error_id=1"); 52 | } 53 | $dbq->close(); 54 | 55 | 56 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 57 | 58 | include ("$postaci_directory" . "includes/commonhead.inc"); 59 | include ("$postaci_directory" . "includes/stylesheets.inc"); 60 | include ("$postaci_directory" . "includes/javascripts.inc"); 61 | 62 | ?> 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
ver :  <? echo $postaci_version; ?>
73 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | 171 | 264 | 265 |

84 | 85 | 86 | 89 | 90 | 91 | 94 | 95 | 96 | 99 | 100 | 101 | 134 | 135 | 136 | 139 | 140 | 141 | 144 | 145 | 146 | $text78\n"; 149 | } else { 150 | echo "\n"; 151 | } 152 | ?> 153 | 154 | 155 | 168 | 169 |
87 | 88 |
92 | 93 |
97 | 98 |
102 | 103 | 104 | 107 | 131 | 132 |
105 | 106 | 108 | INBOX
"; 111 | } 112 | $folders = $email->getMailboxes(); 113 | $folder_names = array(); 114 | $folder_counter=-1; 115 | while (list($key,$val) = each($folders["name"])) { 116 | $folder_counter++; 117 | $folder_names[$folder_counter] = $val; 118 | } 119 | $ids = array(); 120 | $folder_counter=-1; 121 | while (list($key,$val) = each($folders["id"])) { 122 | $folder_counter++; 123 | $ids[$folder_counter] = $val; 124 | } 125 | 126 | for($i=0;$i$folder_names[$i]
"; 128 | } 129 | ?> 130 |
133 |
137 | 138 |
142 | 143 |
 
156 |
157 | 158 | 159 | \n"; 162 | } 163 | ?> 164 | 165 |
166 |
167 |
170 |
172 | 173 | 174 | 175 | 176 | 179 | 251 | 252 | 253 | 254 | 255 | 260 | 261 | 262 |
177 |

178 |
180 |
 
181 | 182 | 183 | 186 | 187 | 188 |
 
 

189 | 190 | execute("select note_id from tblNotebook where user_id = $user_id"); 192 | $notecount = $dbq->getNumOfRows(); 193 | $dbq->close(); 194 | 195 | $dbq = $db->execute("select * from tblNotebook where user_id = $user_id and note_id = $note_id"); 196 | $note_id = $dbq->fields['note_id']; 197 | $notetitle = stripslashes($dbq->fields['notetitle']); 198 | $notes = stripslashes($dbq->fields['notes']); 199 | ?> 200 | 201 | 202 |  



203 |
204 |
205 | 206 | 207 | 245 | 246 |
208 | 209 | 210 | 211 | 212 | 213 | 242 | 243 |
214 | 215 | 216 | 217 | 220 | 223 | 224 | 225 | 226 | 229 | 232 | 233 | 234 | 235 | 238 | 239 | 240 |
218 |
:
219 |
221 | 222 |
  227 |
228 |
230 | 231 |
  236 |
237 |
241 |
244 |
247 |
248 | 249 |

 

250 |
 
  256 |
257 |
258 |

259 |

 
263 |
266 | 267 | 268 | 269 | 272 | -------------------------------------------------------------------------------- /notebookupdate.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 17 | $log_id = $dbq->fields['log_id']; 18 | $user_id = $dbq->fields['user_id']; 19 | $username = $dbq->fields['username']; 20 | $dbq->close(); 21 | 22 | // security check 23 | $note_id = clean_data($note_id); 24 | $txttitle = addslashes(clean_data($txttitle)); 25 | $txtnote = addslashes(strip_tbls($txtnote)); 26 | 27 | $dbq = $db->execute("select user_id from tblNotebook where note_id=$note_id"); 28 | $auth_user = $dbq->fields['user_id']; 29 | if ($auth_user != $user_id) { 30 | Header("Location: index.php?error_id=1"); 31 | } 32 | $dbq->close(); 33 | 34 | 35 | if ($log_id == ""){ 36 | Header("Location: index.php?error_id=1"); 37 | } else { 38 | $dbq = $db->execute("update tblNotebook set notetitle='$txttitle',notes = '$txtnote' where user_id = $user_id and note_id = $note_id"); 39 | $dbq->close(); 40 | 41 | Header("Location: notebook.php"); 42 | } 43 | 44 | ?> 45 | -------------------------------------------------------------------------------- /postmail.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | Header("Location: index.php?error_id=1"); 20 | } else { 21 | include ("$postaci_directory" . "classes/mime_mail.inc"); 22 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 23 | include ("$postaci_directory" . "includes/functions.inc"); 24 | 25 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 26 | $username = $dbq->fields['username']; 27 | $user_id = $dbq->fields['user_id']; 28 | $dbq->close(); 29 | 30 | $msgbody = $msgbody . $footer_message; 31 | $mailadress = getMailAdress($user_id); 32 | $mail = new mime_mail; 33 | $mail->from = $mailadress; 34 | $mail->to = clean_data($to); 35 | $mail->cc = clean_data($cc); 36 | $mail->bcc = clean_data($bcc); 37 | $mail->subject = clean_data(stripslashes($subject)); 38 | $mail->body = clean_data(stripslashes($msgbody)); 39 | 40 | if ($smtp_auth == "yes") { 41 | if ($smtp_imap == "yes") { 42 | $mail->smtp_user = $username; 43 | $mail->smtp_pass = $password; 44 | } else if ($smtp_same == "yes") { 45 | $mail->smtp_user = $smtp_user; 46 | $mail->smtp_pass = $smtp_pass; 47 | } else { 48 | $dbq = $db->execute("select rsrv_char2,rsrv_char3 from tblUsers where user_id=$user_id"); 49 | $mail->smtp_user = $dbq->fields['rsrv_char2']; 50 | $mail->smtp_pass = $dbq->fields['rsrv_char3']; 51 | $dbq->close(); 52 | } 53 | } 54 | 55 | $handle=opendir($attach_directory); 56 | while ($file = readdir($handle)) { 57 | $idvar = strstr($file,$ID); 58 | if ($idvar) { 59 | $attachedfile = strstr($file,"######"); 60 | $attach_name = substr($attachedfile,6); 61 | 62 | // Find the MIME type from th extension... 63 | $tersname = strrev($attach_name); 64 | $dosya_isim = stristr($tersname,"."); 65 | $lenisim = strlen($dosya_isim); 66 | $extension=trim(strtolower(substr($attach_name,$lenisim))); 67 | 68 | $mime_type = "application/octet-stream"; 69 | $dbq = $db->execute("select mime_type from tblMIME where mime_ext = '$extension'"); 70 | $mime_type = $dbq->fields['mime_type']; 71 | $dbq->close(); 72 | 73 | // adding the attachments. 74 | $fd = fopen($attach_directory . $file, "r"); 75 | $data = fread($fd, filesize($attach_directory . $file)); 76 | fclose($fd); 77 | 78 | $size = $size + filesize($attach_directory . $file); 79 | $size = round(($size/1024)); 80 | $mail->add_attachment($data, $attach_name, $mime_type); 81 | } 82 | } 83 | 84 | closedir($handle); 85 | 86 | // send it right now!!!! 87 | $remote_ip = $REMOTE_ADDR; 88 | $mail->send(); 89 | 90 | if ($default_protocol == "imap") { 91 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,"Sent Items"); 92 | 93 | imap_append($email->mbox, "{" . $default_host . "}Sent Items", $mail->message_all); 94 | $handle=opendir($attach_directory); 95 | while ($file = readdir($handle)) { 96 | $idvar = strstr($file,$ID); 97 | if ($idvar) { 98 | unlink($attach_directory . $file); 99 | } 100 | } 101 | } else { 102 | $dbq = $db->execute("select message_id from tblMessages order by message_id desc"); 103 | $max_msg_id = $dbq->fields['message_id']; 104 | $dbq->close(); 105 | $msg_id = $max_msg_id + 1; 106 | 107 | $dbq = $db->execute("select mbox_id from tblMailBoxes where user_id = $user_id and mbox_type=1"); 108 | $mailbox = $dbq->fields['mbox_id']; 109 | $dbq->close(); 110 | 111 | $size = $size + ((8 * (60 + strlen($mail->from) + strlen($user_id) + strlen($mail->to) + strlen($mail->cc) + strlen($cur_date) + strlen($subject) + strlen($mail->body))) / 1024); 112 | $size = round($size)."K"; 113 | $cur_date = date('Y M d - H:i'); 114 | $dbq = $db->execute("insert into tblMessages values($msg_id,$mailbox,$user_id,'$mail->from','$mail->to','$mail->cc','','$cur_date','$mail->subject','$size','$mail->body')"); 115 | $dbq->close(); 116 | 117 | $handle=opendir($attach_directory); 118 | while ($file = readdir($handle)) { 119 | $idvar = strstr($file,$ID); 120 | if ($idvar) { 121 | $attachedfile = strstr($file,"######"); 122 | $attach_name = substr($attachedfile,6); 123 | 124 | // Find the MIME type from the extension... 125 | $tersname = strrev($attach_name); 126 | $dosya_isim = stristr($tersname,"."); 127 | $lenisim = strlen($dosya_isim); 128 | $extension=trim(strtolower(substr($attach_name,$lenisim))); 129 | 130 | $mime_type = "application/octet-stream"; 131 | $dbq = $db->execute("select mime_type from tblMIME where mime_ext = '$extension'"); 132 | $mime_type = $dbq->fields['mime_type']; 133 | $dbq->close(); 134 | 135 | mt_srand((double)microtime()*10000); 136 | $id_name = md5(mt_rand(1,6000)); 137 | $id_name=ereg_replace("/","X",$id_name); 138 | 139 | $file_new_name = $id_name . "######" . $attach_name; 140 | copy($attach_directory . $file , $pop3_attach_dir . $file_new_name); 141 | unlink($attach_directory . $file); 142 | $attach_no++; 143 | 144 | $dbq = $db->execute("select attach_id from tblAttachments order by attach_id desc"); 145 | $max_attach_id = $dbq->fields['attach_id']; 146 | $dbq->close(); 147 | $attach_id = $max_attach_id + 1; 148 | $actual_name = $pop3_attach_dir . $file_new_name; 149 | $dbq = $db->execute("insert into tblAttachments values($attach_id,$msg_id,$user_id,'$mime_type','$attach_name','$actual_name')"); 150 | $dbq->close(); 151 | } // end if 152 | } // end while 153 | } // end if 154 | 155 | Header("Location: mailbox.php?mbox_id=INBOX"); 156 | } 157 | 158 | ?> 159 | -------------------------------------------------------------------------------- /queries/UPGRADE/upgrade-mysql-1.1.0-1.1.3.sql: -------------------------------------------------------------------------------- 1 | alter table tblUsers add rsrv_int1 int; 2 | alter table tblUsers add rsrv_int2 int, 3 | alter table tblUsers add rsrv_int3 int; 4 | alter table tblUsers add rsrv_int4 int; 5 | alter table tblUsers add rsrv_int5 int; 6 | alter table tblUsers add rsrv_int6 int; 7 | alter table tblUsers add rsrv_char1 varchar(255); 8 | alter table tblUsers add rsrv_char2 varchar(255); 9 | alter table tblUsers add rsrv_char3 varchar(255); 10 | alter table tblUsers add rsrv_char4 varchar(255); 11 | alter table tblUsers add rsrv_char5 varchar(255); 12 | alter table tblUsers add rsrv_char6 varchar(255); 13 | alter table tblUsers add rsrv_text1 text; 14 | alter table tblUsers add rsrv_text2 text; 15 | alter table tblUsers add rsrv_text3 text; 16 | alter table tblUsers add rsrv_text4 text; 17 | alter table tblUsers add rsrv_text5 text; 18 | alter table tblUsers add rsrv_text6 text; 19 | 20 | alter table tblLoggedUsers add rsrv_int1 int; 21 | alter table tblLoggedUsers add rsrv_int2 int; 22 | alter table tblLoggedUsers add rsrv_char1 varchar(255); 23 | alter table tblLoggedUsers add rsrv_char2 varchar(255); 24 | 25 | alter table tblUsers change column password password varchar(100); 26 | alter table tblUsers change column username username varchar(100); 27 | 28 | alter table tblUserDomains change column username username varchar(100); 29 | alter table tblMailBoxes change column mboxname mboxname varchar(100); 30 | -------------------------------------------------------------------------------- /queries/UPGRADE/upgrade-mysql-1.1.1-1.1.3.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table tblUserDomains change column username username varchar(100); 3 | alter table tblMailBoxes change column mboxname mboxname varchar(100); 4 | -------------------------------------------------------------------------------- /queries/postaci-mssql-1.1.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE tblSpamList ( 2 | item_id int NOT NULL IDENTITY CONSTRAINT im_id PRIMARY KEY, 3 | user_id int NOT NULL, 4 | email varchar(50), 5 | spam_date datetime, 6 | ); 7 | 8 | CREATE TABLE tblAdressbook ( 9 | item_id int NOT NULL IDENTITY CONSTRAINT im_id PRIMARY KEY, 10 | user_id int NOT NULL, 11 | real_name varchar(100) DEFAULT '----', 12 | email1 varchar(50), 13 | notes varchar(255), 14 | telephone varchar(15), 15 | ); 16 | 17 | CREATE TABLE tblFavorites ( 18 | favorite_id int NOT NULL IDENTITY CONSTRAINT fvt_id PRIMARY KEY, 19 | user_id int unsigned DEFAULT '0' NOT NULL, 20 | url text, 21 | url_title varchar(255) DEFAULT '----' NOT NULL, 22 | notes varchar(255), 23 | ); 24 | 25 | CREATE TABLE tblNotebook ( 26 | note_id int NOT NULL IDENTITY CONSTRAINT nte_id PRIMARY KEY, 27 | user_id int unsigned DEFAULT '0' NOT NULL, 28 | notetitle varchar(255) DEFAULT '----' NOT NULL, 29 | notes text, 30 | note_date varchar(20) DEFAULT '' NOT NULL, 31 | ); 32 | 33 | create table tblUsers ( 34 | user_id int NOT NULL IDENTITY CONSTRAINT usr_id PRIMARY KEY, 35 | username varchar(100) NOT NULL, 36 | password varchar(100) NOT NULL, 37 | real_name varchar(100), 38 | domain_id int NOT NULL, 39 | last_visit datetime NOT NULL, 40 | last_ip varchar(15), 41 | pop3_count int, 42 | imap_count int, 43 | signature text, 44 | rsrv_int1 int, 45 | rsrv_int2 int, 46 | rsrv_int3 int, 47 | rsrv_int4 int, 48 | rsrv_int5 int, 49 | rsrv_int6 int, 50 | rsrv_char1 varchar(255), 51 | rsrv_char2 varchar(255), 52 | rsrv_char3 varchar(255), 53 | rsrv_char4 varchar(255), 54 | rsrv_char5 varchar(255), 55 | rsrv_char6 varchar(255), 56 | rsrv_text1 text, 57 | rsrv_text2 text, 58 | rsrv_text3 text, 59 | rsrv_text4 text, 60 | rsrv_text5 text, 61 | rsrv_text6 text, 62 | ); 63 | 64 | create table tblUserDomains ( 65 | username varchar(100) NOT NULL CONSTRAINT usrname PRIMARY KEY, 66 | domain_id int NOT NULL, 67 | ); 68 | 69 | create table tblLoggedUsers ( 70 | log_id int NOT NULL IDENTITY CONSTRAINT lg_id PRIMARY KEY, 71 | username varchar(100) NOT NULL, 72 | password varchar(100) NOT NULL, 73 | hash varchar(255) NOT NULL, 74 | ip varchar(15), 75 | connect_date datetime NOT NULL, 76 | connect_time varchar(5) NOT NULL, 77 | user_id int NOT NULL 78 | rsrv_int1 int, 79 | rsrv_int2 int, 80 | rsrv_char1 varchar(255), 81 | rsrv_char2 varchar(255), 82 | ); 83 | 84 | CREATE TABLE tblDomains ( 85 | domain_id int NOT NULL IDENTITY CONSTRAINT dm_id PRIMARY KEY, 86 | domain varchar(125) NOT NULL, 87 | ); 88 | 89 | create table tblMailBoxes ( 90 | mbox_id int NOT NULL IDENTITY CONSTRAINT mb_id PRIMARY KEY, 91 | user_id int NOT NULL, 92 | mboxname varchar(15) NOT NULL, 93 | mbox_type int DEFAULT '3' NOT NULL, 94 | ); 95 | 96 | create table tblMessages ( 97 | message_id int NOT NULL IDENTITY CONSTRAINT msg_id PRIMARY KEY, 98 | mbox_id int not null, 99 | user_id int not null, 100 | header_from varchar(255), 101 | header_to varchar(255), 102 | header_cc varchar(255), 103 | header_replyto varchar(255), 104 | header_date varchar(100), 105 | header_subject varchar(255), 106 | header_size varchar(40), 107 | msg_body text, 108 | ); 109 | 110 | create table tblAttachments ( 111 | attach_id int NOT NULL IDENTITY CONSTRAINT att_id PRIMARY KEY, 112 | message_id int not null, 113 | user_id int NOT NULL, 114 | file_type varchar(50), 115 | file_name varchar(255), 116 | file_actual_name varchar(255), 117 | ); 118 | 119 | create table tblMIME ( 120 | mime_type varchar(100) not null, 121 | mime_ext varchar(10) not null, 122 | ); 123 | 124 | insert into tblMIME values('application/mac-binhex40','hqx'); 125 | insert into tblMIME values('application/mac-compactpro','cpt'); 126 | insert into tblMIME values('application/msword','doc'); 127 | insert into tblMIME values('application/octet-stream','bin'); 128 | insert into tblMIME values('application/octet-stream','dms'); 129 | insert into tblMIME values('application/octet-stream','lha'); 130 | insert into tblMIME values('application/octet-stream','lzh'); 131 | insert into tblMIME values('application/octet-stream','exe'); 132 | insert into tblMIME values('application/octet-stream','class'); 133 | insert into tblMIME values('application/oda','oda'); 134 | insert into tblMIME values('application/pdf','pdf'); 135 | insert into tblMIME values('application/pgp-encrypted','pgp'); 136 | insert into tblMIME values('application/pgp-keys','pkr'); 137 | insert into tblMIME values('application/postscript','ai'); 138 | insert into tblMIME values('application/postscript','eps'); 139 | insert into tblMIME values('application/postscript','ps'); 140 | insert into tblMIME values('application/rtf','rtf'); 141 | insert into tblMIME values('application/smil','smi'); 142 | insert into tblMIME values('application/smil','smil'); 143 | insert into tblMIME values('application/vnd.ms-excel','xls'); 144 | insert into tblMIME values('application/vnd.ms-powerpoint','ppt'); 145 | insert into tblMIME values('application/x-bcpio','bcpio'); 146 | insert into tblMIME values('application/x-cdlink','vcd'); 147 | insert into tblMIME values('application/x-chess-pgn','pgn'); 148 | insert into tblMIME values('application/x-compress','Z'); 149 | insert into tblMIME values('application/x-cpio','cpio'); 150 | insert into tblMIME values('application/x-csh','csh'); 151 | insert into tblMIME values('application/x-director','dcr'); 152 | insert into tblMIME values('application/x-director','dir'); 153 | insert into tblMIME values('application/x-director','dxr'); 154 | insert into tblMIME values('application/x-dvi','dvi'); 155 | insert into tblMIME values('application/x-futuresplash','spl'); 156 | insert into tblMIME values('application/x-gtar','gtar'); 157 | insert into tblMIME values('application/x-gzip','gz'); 158 | insert into tblMIME values('application/x-gzip','tgz'); 159 | insert into tblMIME values('application/x-hdf','hdf'); 160 | insert into tblMIME values('application/x-javascript','js'); 161 | insert into tblMIME values('application/x-latex','latex'); 162 | insert into tblMIME values('application/x-netcdf','nc'); 163 | insert into tblMIME values('application/x-netcdf','cdf'); 164 | insert into tblMIME values('application/x-sh','sh'); 165 | insert into tblMIME values('application/x-shar','shar'); 166 | insert into tblMIME values('application/x-shockwave-flash','swf'); 167 | insert into tblMIME values('application/x-stuffit','sit'); 168 | insert into tblMIME values('application/x-sv4cpio','sv4cpio'); 169 | insert into tblMIME values('application/x-sv4crc','sv4crc'); 170 | insert into tblMIME values('application/x-tar','tar'); 171 | insert into tblMIME values('application/x-tcl','tcl'); 172 | insert into tblMIME values('application/x-tex','tex'); 173 | insert into tblMIME values('application/x-texinfo','texinfo'); 174 | insert into tblMIME values('application/x-texinfo','texi'); 175 | insert into tblMIME values('application/x-troff','t'); 176 | insert into tblMIME values('application/x-troff','tr'); 177 | insert into tblMIME values('application/x-troff','troff'); 178 | insert into tblMIME values('application/x-troff-man','man'); 179 | insert into tblMIME values('application/x-troff-me','me'); 180 | insert into tblMIME values('application/x-troff-ms','ms'); 181 | insert into tblMIME values('application/x-ustar','ustar'); 182 | insert into tblMIME values('application/x-wais-source','src'); 183 | insert into tblMIME values('application/zip','zip'); 184 | insert into tblMIME values('audio/basic','au'); 185 | insert into tblMIME values('audio/basic','snd'); 186 | insert into tblMIME values('audio/midi','mid'); 187 | insert into tblMIME values('audio/midi','midi'); 188 | insert into tblMIME values('audio/midi','kar'); 189 | insert into tblMIME values('audio/mpeg','mpga'); 190 | insert into tblMIME values('audio/mpeg','mp2'); 191 | insert into tblMIME values('audio/mpeg','mp3'); 192 | insert into tblMIME values('audio/x-aiff','aif'); 193 | insert into tblMIME values('audio/x-aiff','aiff'); 194 | insert into tblMIME values('audio/x-aiff','aifc'); 195 | insert into tblMIME values('audio/x-pn-realaudio','ram'); 196 | insert into tblMIME values('audio/x-pn-realaudio','rm'); 197 | insert into tblMIME values('audio/x-pn-realaudio-plugin','rpm'); 198 | insert into tblMIME values('audio/x-realaudio','ra'); 199 | insert into tblMIME values('audio/x-wav','wav'); 200 | insert into tblMIME values('chemical/x-pdb','pdb'); 201 | insert into tblMIME values('chemical/x-pdb','xyz'); 202 | insert into tblMIME values('image/bmp','bmp'); 203 | insert into tblMIME values('image/gif','gif'); 204 | insert into tblMIME values('image/ief','ief'); 205 | insert into tblMIME values('image/jpeg','jpeg'); 206 | insert into tblMIME values('image/jpeg','jpg'); 207 | insert into tblMIME values('image/jpeg','jpe'); 208 | insert into tblMIME values('image/png','png'); 209 | insert into tblMIME values('image/tiff','tiff'); 210 | insert into tblMIME values('image/tiff','tif'); 211 | insert into tblMIME values('image/x-cmu-raster','ras'); 212 | insert into tblMIME values('image/x-portable-anymap','pnm'); 213 | insert into tblMIME values('image/x-portable-bitmap','pbm'); 214 | insert into tblMIME values('image/x-portable-graymap','pgm'); 215 | insert into tblMIME values('image/x-portable-pixmap','ppm'); 216 | insert into tblMIME values('image/x-rgb','rgb'); 217 | insert into tblMIME values('image/x-xbitmap','xbm'); 218 | insert into tblMIME values('image/x-xpixmap','xwd'); 219 | insert into tblMIME values('model/iges','igs'); 220 | insert into tblMIME values('model/iges','iges'); 221 | insert into tblMIME values('model/mesh','msh'); 222 | insert into tblMIME values('model/mesh','mesh'); 223 | insert into tblMIME values('model/mesh','silo'); 224 | insert into tblMIME values('model/vrml','wrl'); 225 | insert into tblMIME values('model/vrml','vrml'); 226 | insert into tblMIME values('text/css','css'); 227 | insert into tblMIME values('text/html','html'); 228 | insert into tblMIME values('text/html','htm'); 229 | insert into tblMIME values('text/plain','asc'); 230 | insert into tblMIME values('text/plain','txt'); 231 | insert into tblMIME values('text/richtext','rtx'); 232 | insert into tblMIME values('text/sgml','sgml'); 233 | insert into tblMIME values('text/sgml','sgm'); 234 | insert into tblMIME values('text/tab-separated-values','tsv'); 235 | insert into tblMIME values('text/x-setext','etx'); 236 | insert into tblMIME values('text/xml','xml'); 237 | insert into tblMIME values('video/mpeg','mpeg'); 238 | insert into tblMIME values('video/mpeg','mpg'); 239 | insert into tblMIME values('video/mpeg','mpe'); 240 | insert into tblMIME values('video/quicktime','qt'); 241 | insert into tblMIME values('video/quicktime','mov'); 242 | insert into tblMIME values('video/x-msvideo','avi'); 243 | insert into tblMIME values('video/x-sgi-movie','movie'); 244 | insert into tblMIME values('x-conference/x-cooltalk','ice'); 245 | 246 | -------------------------------------------------------------------------------- /queries/postaci-mysql-1.1.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE tblSpamList ( 2 | item_id bigint(20) unsigned not null auto_increment, 3 | user_id bigint(20) unsigned not null, 4 | email varchar(50), 5 | spam_date date, 6 | PRIMARY KEY (item_id) 7 | ); 8 | 9 | CREATE TABLE tblAdressbook ( 10 | item_id bigint(20) unsigned NOT NULL auto_increment, 11 | user_id bigint(20) unsigned NOT NULL, 12 | real_name varchar(100) DEFAULT '----', 13 | email1 varchar(50), 14 | notes varchar(255), 15 | telephone varchar(15), 16 | PRIMARY KEY (item_id) 17 | ); 18 | 19 | CREATE TABLE tblFavorites ( 20 | favorite_id bigint(20) unsigned NOT NULL auto_increment, 21 | user_id bigint(20) unsigned NOT NULL, 22 | url text, 23 | url_title varchar(255) DEFAULT '----' NOT NULL, 24 | notes varchar(255), 25 | PRIMARY KEY (favorite_id) 26 | ); 27 | 28 | CREATE TABLE tblNotebook ( 29 | note_id bigint(20) unsigned NOT NULL auto_increment, 30 | user_id bigint(20) unsigned NOT NULL, 31 | notetitle varchar(255) DEFAULT '----' NOT NULL, 32 | notes blob, 33 | note_date varchar(20) DEFAULT '' NOT NULL, 34 | PRIMARY KEY (note_id) 35 | ); 36 | 37 | create table tblUsers ( 38 | user_id bigint unsigned NOT NULL auto_increment, 39 | username varchar(100) NOT NULL, 40 | password varchar(100) NOT NULL, 41 | real_name varchar(100), 42 | domain_id int NOT NULL, 43 | last_visit date NOT NULL, 44 | last_ip varchar(15), 45 | pop3_count bigint, 46 | imap_count bigint, 47 | signature text, 48 | rsrv_int1 int, 49 | rsrv_int2 int, 50 | rsrv_int3 int, 51 | rsrv_int4 int, 52 | rsrv_int5 int, 53 | rsrv_int6 int, 54 | rsrv_char1 varchar(255), 55 | rsrv_char2 varchar(255), 56 | rsrv_char3 varchar(255), 57 | rsrv_char4 varchar(255), 58 | rsrv_char5 varchar(255), 59 | rsrv_char6 varchar(255), 60 | rsrv_text1 text, 61 | rsrv_text2 text, 62 | rsrv_text3 text, 63 | rsrv_text4 text, 64 | rsrv_text5 text, 65 | rsrv_text6 text, 66 | PRIMARY KEY (user_id) 67 | ); 68 | 69 | create table tblUserDomains ( 70 | username varchar(100) NOT NULL, 71 | domain_id int NOT NULL, 72 | PRIMARY KEY (username) 73 | ); 74 | 75 | create table tblLoggedUsers ( 76 | log_id bigint unsigned NOT NULL auto_increment, 77 | username varchar(100) NOT NULL, 78 | password varchar(100) NOT NULL, 79 | hash varchar(255) NOT NULL, 80 | ip varchar(15), 81 | connect_date date NOT NULL, 82 | connect_time varchar(5) NOT NULL, 83 | user_id bigint unsigned NOT NULL, 84 | rsrv_int1 int, 85 | rsrv_int2 int, 86 | rsrv_char1 varchar(255), 87 | rsrv_char2 varchar(255), 88 | PRIMARY KEY (log_id) 89 | ); 90 | 91 | CREATE TABLE tblDomains ( 92 | domain_id int unsigned NOT NULL auto_increment, 93 | domain varchar(125) NOT NULL, 94 | PRIMARY KEY (domain_id) 95 | ); 96 | 97 | create table tblMailBoxes ( 98 | mbox_id bigint unsigned NOT NULL auto_increment, 99 | user_id bigint unsigned NOT NULL, 100 | mboxname varchar(15) NOT NULL, 101 | mbox_type int DEFAULT '3' NOT NULL, 102 | PRIMARY KEY (mbox_id) 103 | ); 104 | 105 | create table tblMessages ( 106 | message_id bigint unsigned NOT NULL auto_increment, 107 | mbox_id bigint not null, 108 | user_id bigint not null, 109 | header_from varchar(255), 110 | header_to varchar(255), 111 | header_cc varchar(255), 112 | header_replyto varchar(255), 113 | header_date varchar(100), 114 | header_subject varchar(255), 115 | header_size varchar(40), 116 | msg_body blob, 117 | PRIMARY KEY (message_id) 118 | ); 119 | 120 | create table tblAttachments ( 121 | attach_id bigint unsigned NOT NULL auto_increment, 122 | message_id bigint not null, 123 | user_id bigint NOT NULL, 124 | file_type varchar(50), 125 | file_name varchar(255), 126 | file_actual_name varchar(255), 127 | PRIMARY KEY (attach_id) 128 | ); 129 | 130 | create table tblMIME ( 131 | mime_type varchar(100) not null, 132 | mime_ext varchar(10) not null 133 | ); 134 | 135 | insert into tblMIME values('application/mac-binhex40','hqx'); 136 | insert into tblMIME values('application/mac-compactpro','cpt'); 137 | insert into tblMIME values('application/msword','doc'); 138 | insert into tblMIME values('application/octet-stream','bin'); 139 | insert into tblMIME values('application/octet-stream','dms'); 140 | insert into tblMIME values('application/octet-stream','lha'); 141 | insert into tblMIME values('application/octet-stream','lzh'); 142 | insert into tblMIME values('application/octet-stream','exe'); 143 | insert into tblMIME values('application/octet-stream','class'); 144 | insert into tblMIME values('application/oda','oda'); 145 | insert into tblMIME values('application/pdf','pdf'); 146 | insert into tblMIME values('application/pgp-encrypted','pgp'); 147 | insert into tblMIME values('application/pgp-keys','pkr'); 148 | insert into tblMIME values('application/postscript','ai'); 149 | insert into tblMIME values('application/postscript','eps'); 150 | insert into tblMIME values('application/postscript','ps'); 151 | insert into tblMIME values('application/rtf','rtf'); 152 | insert into tblMIME values('application/smil','smi'); 153 | insert into tblMIME values('application/smil','smil'); 154 | insert into tblMIME values('application/vnd.ms-excel','xls'); 155 | insert into tblMIME values('application/vnd.ms-powerpoint','ppt'); 156 | insert into tblMIME values('application/x-bcpio','bcpio'); 157 | insert into tblMIME values('application/x-cdlink','vcd'); 158 | insert into tblMIME values('application/x-chess-pgn','pgn'); 159 | insert into tblMIME values('application/x-compress','Z'); 160 | insert into tblMIME values('application/x-cpio','cpio'); 161 | insert into tblMIME values('application/x-csh','csh'); 162 | insert into tblMIME values('application/x-director','dcr'); 163 | insert into tblMIME values('application/x-director','dir'); 164 | insert into tblMIME values('application/x-director','dxr'); 165 | insert into tblMIME values('application/x-dvi','dvi'); 166 | insert into tblMIME values('application/x-futuresplash','spl'); 167 | insert into tblMIME values('application/x-gtar','gtar'); 168 | insert into tblMIME values('application/x-gzip','gz'); 169 | insert into tblMIME values('application/x-gzip','tgz'); 170 | insert into tblMIME values('application/x-hdf','hdf'); 171 | insert into tblMIME values('application/x-javascript','js'); 172 | insert into tblMIME values('application/x-latex','latex'); 173 | insert into tblMIME values('application/x-netcdf','nc'); 174 | insert into tblMIME values('application/x-netcdf','cdf'); 175 | insert into tblMIME values('application/x-sh','sh'); 176 | insert into tblMIME values('application/x-shar','shar'); 177 | insert into tblMIME values('application/x-shockwave-flash','swf'); 178 | insert into tblMIME values('application/x-stuffit','sit'); 179 | insert into tblMIME values('application/x-sv4cpio','sv4cpio'); 180 | insert into tblMIME values('application/x-sv4crc','sv4crc'); 181 | insert into tblMIME values('application/x-tar','tar'); 182 | insert into tblMIME values('application/x-tcl','tcl'); 183 | insert into tblMIME values('application/x-tex','tex'); 184 | insert into tblMIME values('application/x-texinfo','texinfo'); 185 | insert into tblMIME values('application/x-texinfo','texi'); 186 | insert into tblMIME values('application/x-troff','t'); 187 | insert into tblMIME values('application/x-troff','tr'); 188 | insert into tblMIME values('application/x-troff','troff'); 189 | insert into tblMIME values('application/x-troff-man','man'); 190 | insert into tblMIME values('application/x-troff-me','me'); 191 | insert into tblMIME values('application/x-troff-ms','ms'); 192 | insert into tblMIME values('application/x-ustar','ustar'); 193 | insert into tblMIME values('application/x-wais-source','src'); 194 | insert into tblMIME values('application/zip','zip'); 195 | insert into tblMIME values('audio/basic','au'); 196 | insert into tblMIME values('audio/basic','snd'); 197 | insert into tblMIME values('audio/midi','mid'); 198 | insert into tblMIME values('audio/midi','midi'); 199 | insert into tblMIME values('audio/midi','kar'); 200 | insert into tblMIME values('audio/mpeg','mpga'); 201 | insert into tblMIME values('audio/mpeg','mp2'); 202 | insert into tblMIME values('audio/mpeg','mp3'); 203 | insert into tblMIME values('audio/x-aiff','aif'); 204 | insert into tblMIME values('audio/x-aiff','aiff'); 205 | insert into tblMIME values('audio/x-aiff','aifc'); 206 | insert into tblMIME values('audio/x-pn-realaudio','ram'); 207 | insert into tblMIME values('audio/x-pn-realaudio','rm'); 208 | insert into tblMIME values('audio/x-pn-realaudio-plugin','rpm'); 209 | insert into tblMIME values('audio/x-realaudio','ra'); 210 | insert into tblMIME values('audio/x-wav','wav'); 211 | insert into tblMIME values('chemical/x-pdb','pdb'); 212 | insert into tblMIME values('chemical/x-pdb','xyz'); 213 | insert into tblMIME values('image/bmp','bmp'); 214 | insert into tblMIME values('image/gif','gif'); 215 | insert into tblMIME values('image/ief','ief'); 216 | insert into tblMIME values('image/jpeg','jpeg'); 217 | insert into tblMIME values('image/jpeg','jpg'); 218 | insert into tblMIME values('image/jpeg','jpe'); 219 | insert into tblMIME values('image/png','png'); 220 | insert into tblMIME values('image/tiff','tiff'); 221 | insert into tblMIME values('image/tiff','tif'); 222 | insert into tblMIME values('image/x-cmu-raster','ras'); 223 | insert into tblMIME values('image/x-portable-anymap','pnm'); 224 | insert into tblMIME values('image/x-portable-bitmap','pbm'); 225 | insert into tblMIME values('image/x-portable-graymap','pgm'); 226 | insert into tblMIME values('image/x-portable-pixmap','ppm'); 227 | insert into tblMIME values('image/x-rgb','rgb'); 228 | insert into tblMIME values('image/x-xbitmap','xbm'); 229 | insert into tblMIME values('image/x-xpixmap','xwd'); 230 | insert into tblMIME values('model/iges','igs'); 231 | insert into tblMIME values('model/iges','iges'); 232 | insert into tblMIME values('model/mesh','msh'); 233 | insert into tblMIME values('model/mesh','mesh'); 234 | insert into tblMIME values('model/mesh','silo'); 235 | insert into tblMIME values('model/vrml','wrl'); 236 | insert into tblMIME values('model/vrml','vrml'); 237 | insert into tblMIME values('text/css','css'); 238 | insert into tblMIME values('text/html','html'); 239 | insert into tblMIME values('text/html','htm'); 240 | insert into tblMIME values('text/plain','asc'); 241 | insert into tblMIME values('text/plain','txt'); 242 | insert into tblMIME values('text/richtext','rtx'); 243 | insert into tblMIME values('text/sgml','sgml'); 244 | insert into tblMIME values('text/sgml','sgm'); 245 | insert into tblMIME values('text/tab-separated-values','tsv'); 246 | insert into tblMIME values('text/x-setext','etx'); 247 | insert into tblMIME values('text/xml','xml'); 248 | insert into tblMIME values('video/mpeg','mpeg'); 249 | insert into tblMIME values('video/mpeg','mpg'); 250 | insert into tblMIME values('video/mpeg','mpe'); 251 | insert into tblMIME values('video/quicktime','qt'); 252 | insert into tblMIME values('video/quicktime','mov'); 253 | insert into tblMIME values('video/x-msvideo','avi'); 254 | insert into tblMIME values('video/x-sgi-movie','movie'); 255 | insert into tblMIME values('x-conference/x-cooltalk','ice'); 256 | -------------------------------------------------------------------------------- /queries/postaci-pgsql-1.1.sql: -------------------------------------------------------------------------------- 1 | create sequence tblSpamList_seq start 1; 2 | CREATE TABLE tblSpamList ( 3 | item_id int4 default nextval('tblAdressbook_seq') unique NOT NULL, 4 | user_id int4 not null, 5 | email character varying(50), 6 | spam_date date, 7 | PRIMARY KEY (item_id) 8 | ); 9 | create unique index tblSpamList_index on tblSpamList using btree("item_id" "int4_ops"); 10 | 11 | create sequence tblAdressbook_seq start 1; 12 | CREATE TABLE tblAdressbook ( 13 | item_id int4 default nextval('tblAdressbook_seq') unique NOT NULL, 14 | user_id int4 DEFAULT '0' NOT NULL, 15 | real_name character varying(100) DEFAULT '----', 16 | email1 character varying(50), 17 | notes character varying(255), 18 | telephone character varying(15), 19 | PRIMARY KEY (item_id) 20 | ); 21 | create unique index tblAdressbook_index on tblAdressbook using btree("item_id" "int4_ops"); 22 | 23 | create sequence tblFavorites_seq start 1; 24 | CREATE TABLE tblFavorites ( 25 | favorite_id int4 default nextval('tblFavorites_seq') unique NOT NULL, 26 | user_id int4 DEFAULT '0' NOT NULL, 27 | url text, 28 | url_title character varying(255) DEFAULT '----' NOT NULL, 29 | notes character varying(255), 30 | PRIMARY KEY (favorite_id) 31 | ); 32 | create unique index tblFavorites_index on tblFavorites using btree("favorite_id" "int4_ops"); 33 | 34 | create sequence tblNotebook_seq start 1; 35 | CREATE TABLE tblNotebook ( 36 | note_id int4 default nextval('tblNotebook_seq') unique NOT NULL, 37 | user_id int4 DEFAULT '0' NOT NULL, 38 | notetitle character varying(255) DEFAULT '----' NOT NULL, 39 | notes character varying(255), 40 | note_date character varying(20) DEFAULT '' NOT NULL, 41 | PRIMARY KEY (note_id) 42 | ); 43 | create unique index tblNotebook_index on tblNotebook using btree("note_id" "int4_ops"); 44 | 45 | create sequence tblUsers_seq start 1; 46 | create table tblUsers ( 47 | user_id int4 default nextval('tblUsers_seq') unique NOT NULL, 48 | username character varying(100) NOT NULL, 49 | password character varying(20) NOT NULL, 50 | real_name character varying(100), 51 | domain_id int2 DEFAULT 1 NOT NULL, 52 | last_visit date NOT NULL, 53 | last_ip character varying(15), 54 | pop3_count int4, 55 | imap_count int4, 56 | signature text, 57 | rsrv_int1 int2, 58 | rsrv_int2 int2, 59 | rsrv_int3 int2, 60 | rsrv_int4 int2, 61 | rsrv_int5 int2, 62 | rsrv_int6 int2, 63 | rsrv_char1 character varying(255), 64 | rsrv_char2 character varying(255), 65 | rsrv_char3 character varying(255), 66 | rsrv_char4 character varying(255), 67 | rsrv_char5 character varying(255), 68 | rsrv_char6 character varying(255), 69 | rsrv_text1 text, 70 | rsrv_text2 text, 71 | rsrv_text3 text, 72 | rsrv_text4 text, 73 | rsrv_text5 text, 74 | rsrv_text6 text, 75 | PRIMARY KEY (user_id) 76 | ); 77 | create unique index tblUsers_index on tblUsers using btree("user_id" "int4_ops"); 78 | 79 | create table tblUserDomains ( 80 | username character varying(100) NOT NULL, 81 | domain_id int2 NOT NULL, 82 | PRIMARY KEY (username) 83 | ); 84 | 85 | create sequence tblLoggedUsers_seq start 1; 86 | create table tblLoggedUsers ( 87 | log_id int4 default nextval('tblLoggedUsers_seq') unique NOT NULL, 88 | username character varying(100) NOT NULL, 89 | password character varying(20) NOT NULL, 90 | hash character varying(255) NOT NULL, 91 | ip character varying(15), 92 | connect_date date NOT NULL, 93 | connect_time character varying(5) NOT NULL, 94 | user_id int4 NOT NULL, 95 | rsrv_int1 int2, 96 | rsrv_int2 int2, 97 | rsrv_char1 character varying(255), 98 | rsrv_char2 character varying(255), 99 | PRIMARY KEY (log_id) 100 | ); 101 | create unique index tblLoggedUsers_index on tblLoggedUsers using btree("log_id" "int4_ops"); 102 | 103 | create sequence tblDomains_seq start 1; 104 | CREATE TABLE tblDomains ( 105 | domain_id int2 default nextval('tblDomains_seq') unique NOT NULL, 106 | domain character varying(125) NOT NULL, 107 | PRIMARY KEY (domain_id) 108 | ); 109 | create unique index tblDomains_index on tblDomains using btree("domain_id" "int2_ops"); 110 | 111 | create sequence tblMailBoxes_seq start 1; 112 | create table tblMailBoxes ( 113 | mbox_id int4 default nextval('tblMailBoxes_seq') unique NOT NULL, 114 | user_id int4 NOT NULL, 115 | mboxname character varying(15) NOT NULL, 116 | mbox_type int2 DEFAULT 3 NOT NULL, 117 | PRIMARY KEY (mbox_id) 118 | ); 119 | create unique index tblMailBoxes_index on tblMailBoxes using btree("mbox_id" "int4_ops"); 120 | 121 | create sequence tblMessages_seq start 1; 122 | create table tblMessages ( 123 | message_id int4 default nextval('tblMessages_seq') unique not null, 124 | mbox_id int4 not null, 125 | user_id int4 not null, 126 | header_from character varying(255), 127 | header_to character varying(255), 128 | header_cc character varying(255), 129 | header_replyto character varying(255), 130 | header_date character varying(100), 131 | header_subject character varying(255), 132 | header_size character varying(40), 133 | msg_body text, 134 | PRIMARY KEY (message_id) 135 | ); 136 | create unique index tblMessages_index on tblMessages using btree("message_id" "int4_ops"); 137 | 138 | create sequence tblAttachments_seq start 1; 139 | create table tblAttachments ( 140 | attach_id int4 default nextval('tblAttachments_seq') unique not null, 141 | message_id int4 not null, 142 | user_id int4 NOT NULL, 143 | file_type character varying(50), 144 | file_name character varying(255), 145 | file_actual_name character varying(255), 146 | PRIMARY KEY (attach_id) 147 | ); 148 | create unique index tblAttachments_index on tblAttachments using btree("attach_id" "int4_ops"); 149 | 150 | create table tblMIME ( 151 | mime_type character varying(100) not null, 152 | mime_ext character varying(10) not null 153 | ); 154 | create index tblMIME_index on tblMIME("mime_ext"); 155 | 156 | insert into tblMIME values('application/mac-binhex40','hqx'); 157 | insert into tblMIME values('application/mac-compactpro','cpt'); 158 | insert into tblMIME values('application/msword','doc'); 159 | insert into tblMIME values('application/octet-stream','bin'); 160 | insert into tblMIME values('application/octet-stream','dms'); 161 | insert into tblMIME values('application/octet-stream','lha'); 162 | insert into tblMIME values('application/octet-stream','lzh'); 163 | insert into tblMIME values('application/octet-stream','exe'); 164 | insert into tblMIME values('application/octet-stream','class'); 165 | insert into tblMIME values('application/oda','oda'); 166 | insert into tblMIME values('application/pdf','pdf'); 167 | insert into tblMIME values('application/pgp-encrypted','pgp'); 168 | insert into tblMIME values('application/pgp-keys','pkr'); 169 | insert into tblMIME values('application/postscript','ai'); 170 | insert into tblMIME values('application/postscript','eps'); 171 | insert into tblMIME values('application/postscript','ps'); 172 | insert into tblMIME values('application/rtf','rtf'); 173 | insert into tblMIME values('application/smil','smi'); 174 | insert into tblMIME values('application/smil','smil'); 175 | insert into tblMIME values('application/vnd.ms-excel','xls'); 176 | insert into tblMIME values('application/vnd.ms-powerpoint','ppt'); 177 | insert into tblMIME values('application/x-bcpio','bcpio'); 178 | insert into tblMIME values('application/x-cdlink','vcd'); 179 | insert into tblMIME values('application/x-chess-pgn','pgn'); 180 | insert into tblMIME values('application/x-compress','Z'); 181 | insert into tblMIME values('application/x-cpio','cpio'); 182 | insert into tblMIME values('application/x-csh','csh'); 183 | insert into tblMIME values('application/x-director','dcr'); 184 | insert into tblMIME values('application/x-director','dir'); 185 | insert into tblMIME values('application/x-director','dxr'); 186 | insert into tblMIME values('application/x-dvi','dvi'); 187 | insert into tblMIME values('application/x-futuresplash','spl'); 188 | insert into tblMIME values('application/x-gtar','gtar'); 189 | insert into tblMIME values('application/x-gzip','gz'); 190 | insert into tblMIME values('application/x-gzip','tgz'); 191 | insert into tblMIME values('application/x-hdf','hdf'); 192 | insert into tblMIME values('application/x-javascript','js'); 193 | insert into tblMIME values('application/x-latex','latex'); 194 | insert into tblMIME values('application/x-netcdf','nc'); 195 | insert into tblMIME values('application/x-netcdf','cdf'); 196 | insert into tblMIME values('application/x-sh','sh'); 197 | insert into tblMIME values('application/x-shar','shar'); 198 | insert into tblMIME values('application/x-shockwave-flash','swf'); 199 | insert into tblMIME values('application/x-stuffit','sit'); 200 | insert into tblMIME values('application/x-sv4cpio','sv4cpio'); 201 | insert into tblMIME values('application/x-sv4crc','sv4crc'); 202 | insert into tblMIME values('application/x-tar','tar'); 203 | insert into tblMIME values('application/x-tcl','tcl'); 204 | insert into tblMIME values('application/x-tex','tex'); 205 | insert into tblMIME values('application/x-texinfo','texinfo'); 206 | insert into tblMIME values('application/x-texinfo','texi'); 207 | insert into tblMIME values('application/x-troff','t'); 208 | insert into tblMIME values('application/x-troff','tr'); 209 | insert into tblMIME values('application/x-troff','troff'); 210 | insert into tblMIME values('application/x-troff-man','man'); 211 | insert into tblMIME values('application/x-troff-me','me'); 212 | insert into tblMIME values('application/x-troff-ms','ms'); 213 | insert into tblMIME values('application/x-ustar','ustar'); 214 | insert into tblMIME values('application/x-wais-source','src'); 215 | insert into tblMIME values('application/zip','zip'); 216 | insert into tblMIME values('audio/basic','au'); 217 | insert into tblMIME values('audio/basic','snd'); 218 | insert into tblMIME values('audio/midi','mid'); 219 | insert into tblMIME values('audio/midi','midi'); 220 | insert into tblMIME values('audio/midi','kar'); 221 | insert into tblMIME values('audio/mpeg','mpga'); 222 | insert into tblMIME values('audio/mpeg','mp2'); 223 | insert into tblMIME values('audio/mpeg','mp3'); 224 | insert into tblMIME values('audio/x-aiff','aif'); 225 | insert into tblMIME values('audio/x-aiff','aiff'); 226 | insert into tblMIME values('audio/x-aiff','aifc'); 227 | insert into tblMIME values('audio/x-pn-realaudio','ram'); 228 | insert into tblMIME values('audio/x-pn-realaudio','rm'); 229 | insert into tblMIME values('audio/x-pn-realaudio-plugin','rpm'); 230 | insert into tblMIME values('audio/x-realaudio','ra'); 231 | insert into tblMIME values('audio/x-wav','wav'); 232 | insert into tblMIME values('chemical/x-pdb','pdb'); 233 | insert into tblMIME values('chemical/x-pdb','xyz'); 234 | insert into tblMIME values('image/bmp','bmp'); 235 | insert into tblMIME values('image/gif','gif'); 236 | insert into tblMIME values('image/ief','ief'); 237 | insert into tblMIME values('image/jpeg','jpeg'); 238 | insert into tblMIME values('image/jpeg','jpg'); 239 | insert into tblMIME values('image/jpeg','jpe'); 240 | insert into tblMIME values('image/png','png'); 241 | insert into tblMIME values('image/tiff','tiff'); 242 | insert into tblMIME values('image/tiff','tif'); 243 | insert into tblMIME values('image/x-cmu-raster','ras'); 244 | insert into tblMIME values('image/x-portable-anymap','pnm'); 245 | insert into tblMIME values('image/x-portable-bitmap','pbm'); 246 | insert into tblMIME values('image/x-portable-graymap','pgm'); 247 | insert into tblMIME values('image/x-portable-pixmap','ppm'); 248 | insert into tblMIME values('image/x-rgb','rgb'); 249 | insert into tblMIME values('image/x-xbitmap','xbm'); 250 | insert into tblMIME values('image/x-xpixmap','xwd'); 251 | insert into tblMIME values('model/iges','igs'); 252 | insert into tblMIME values('model/iges','iges'); 253 | insert into tblMIME values('model/mesh','msh'); 254 | insert into tblMIME values('model/mesh','mesh'); 255 | insert into tblMIME values('model/mesh','silo'); 256 | insert into tblMIME values('model/vrml','wrl'); 257 | insert into tblMIME values('model/vrml','vrml'); 258 | insert into tblMIME values('text/css','css'); 259 | insert into tblMIME values('text/html','html'); 260 | insert into tblMIME values('text/html','htm'); 261 | insert into tblMIME values('text/plain','asc'); 262 | insert into tblMIME values('text/plain','txt'); 263 | insert into tblMIME values('text/richtext','rtx'); 264 | insert into tblMIME values('text/sgml','sgml'); 265 | insert into tblMIME values('text/sgml','sgm'); 266 | insert into tblMIME values('text/tab-separated-values','tsv'); 267 | insert into tblMIME values('text/x-setext','etx'); 268 | insert into tblMIME values('text/xml','xml'); 269 | insert into tblMIME values('video/mpeg','mpeg'); 270 | insert into tblMIME values('video/mpeg','mpg'); 271 | insert into tblMIME values('video/mpeg','mpe'); 272 | insert into tblMIME values('video/quicktime','qt'); 273 | insert into tblMIME values('video/quicktime','mov'); 274 | insert into tblMIME values('video/x-msvideo','avi'); 275 | insert into tblMIME values('video/x-sgi-movie','movie'); 276 | insert into tblMIME values('x-conference/x-cooltalk','ice'); 277 | -------------------------------------------------------------------------------- /queries/tblDomains.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/queries/tblDomains.sql -------------------------------------------------------------------------------- /readmessage.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/readmessage.php -------------------------------------------------------------------------------- /renamefolder.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | 20 | Header("Location: index.php?error_id=1"); 21 | } else { 22 | 23 | function mychop($thistring,$length) { 24 | $result=""; 25 | $mystring=trim($thistring); 26 | if (strlen($mystring)>$length) { 27 | $result=substr($mystring,0,$length); 28 | $result = "$result..."; 29 | }else { 30 | $result=$mystring; 31 | } 32 | 33 | return($result); 34 | } 35 | 36 | $mbox_id = rawurldecode($mbox_id); 37 | 38 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 39 | 40 | // Check to see if the mbox_id is a valid one. 41 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 42 | $username = $dbq->fields['username']; 43 | $user_id = $dbq->fields['user_id']; 44 | $dbq->close(); 45 | 46 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 47 | 48 | $email->mbox_exists($mbox_id); 49 | include ("$postaci_directory" . "includes/commonhead.inc"); 50 | include ("$postaci_directory" . "includes/stylesheets.inc"); 51 | include ("$postaci_directory" . "includes/javascripts.inc"); 52 | include ("$postaci_directory" . "includes/functions.inc"); 53 | 54 | ?> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
ver :  <? echo $postaci_version; ?>
65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 | 73 | 74 | 75 | 163 | 229 | 230 |

76 | 77 | 78 | 81 | 82 | 83 | 86 | 87 | 88 | 91 | 92 | 93 | 126 | 127 | 128 | 131 | 132 | 133 | 136 | 137 | 138 | $text78\n"; 141 | } else { 142 | echo "\n"; 143 | } 144 | ?> 145 | 146 | 147 | 160 | 161 |
79 | 80 |
84 | 85 |
89 | 90 |
94 | 95 | 96 | 99 | 123 | 124 |
97 | 98 | 100 | INBOX
"; 103 | } 104 | $folders = $email->getMailboxes(); 105 | $folder_names = array(); 106 | $folder_counter=-1; 107 | while (list($key,$val) = each($folders["name"])) { 108 | $folder_counter++; 109 | $folder_names[$folder_counter] = $val; 110 | } 111 | $ids = array(); 112 | $folder_counter=-1; 113 | while (list($key,$val) = each($folders["id"])) { 114 | $folder_counter++; 115 | $ids[$folder_counter] = $val; 116 | } 117 | 118 | for($i=0;$i$folder_names[$i]
"; 120 | } 121 | ?> 122 |
125 |
129 | 130 |
134 | 135 |
 
148 |
149 | 150 | 151 | \n"; 154 | } 155 | ?> 156 | 157 |
158 |
159 |
162 |
164 | 165 | 166 | 167 | 168 | 171 | 216 | 217 | 218 | 219 | 220 | 225 | 226 | 227 |
169 |

170 |
172 |
 
173 | 174 | 175 | protocol == "pop3") { 178 | if (trim(strtoupper($mbox_id)) != "INBOX") { 179 | $current_folder = getFolderName($mbox_id); 180 | } else { 181 | $current_folder = $mbox_id; 182 | } 183 | } else { 184 | $current_folder = $mbox_id; 185 | } 186 | ?> 187 | 188 | 189 |
 
 

190 | 191 |

\n"; 193 | echo " \n"; 194 | 195 | if ($default_protocol == "pop3") { 196 | $folder_name = getFolderName($mbox_id); 197 | } else { 198 | $folder_name = $mbox_id; 199 | } 200 | echo " $text55 \n"; 201 | 202 | if($courier_imap_support && strstr($folder_name,$personal_namespace)) { 203 | echo ''; 206 | $folder_name = substr($folder_name, strlen($personal_namespace)); 207 | } 208 | 209 | echo " \n"; 210 | echo " \n"; 211 | echo "
\n"; 212 | ?> 213 | 214 |

 

215 |
 
  221 |
222 |
223 |

224 |

 
228 |
231 | 232 | 233 | 234 | 237 | -------------------------------------------------------------------------------- /renamefolder_action.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 20 | $log_id = $dbq->fields['log_id']; 21 | $user_id = $dbq->fields['user_id']; 22 | $username = $dbq->fields['username']; 23 | $rmbox_id = $mbox_id; 24 | 25 | $dbq->close(); 26 | if ($log_id == ""){ 27 | Header("Location: index.php?error_id=1"); 28 | } else { 29 | if(isset($pnspace)) { 30 | $newfoldername = $pnspace.$newfoldername; 31 | } 32 | if ($default_protocol == "imap") { // protocol = imap 33 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 34 | $newfoldername = imap_utf7_encode($newfoldername); 35 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,"INBOX"); 36 | 37 | imap_unsubscribe($email->mbox, "{" . $default_host . "}$mbox_id"); 38 | $sonuc = imap_renamemailbox($email->mbox, "{" . $default_host . ":" . $default_port . "}$mbox_id","{".$default_host. ":" . $default_port . "}$newfoldername"); 39 | 40 | imap_subscribe($email->mbox, "{" . $default_host . "}$newfoldername"); 41 | if (!$sonuc) { 42 | Header("Location: folders.php?error_id=7"); 43 | exit; 44 | } 45 | } else { 46 | $dbq = $db->execute("select user_id from tblMailBoxes where mbox_id = $mbox_id"); // security check 47 | $auth_user = $dbq->fields['user_id']; 48 | if ($auth_user != $user_id) { 49 | Header("Location: index.php?error_id=1"); 50 | } 51 | 52 | $dbq = $db->execute("select mbox_id from tblMailBoxes where mboxname = '$newfoldername'"); 53 | $mbox_id = $dbq->fields['mbox_id']; 54 | if ($mbox_id != 0) { 55 | Header("Location: folders.php?error_id=7"); 56 | exit; 57 | } 58 | 59 | $dbq = $db->execute("update tblMailBoxes set mboxname = '$newfoldername' where mbox_id = $rmbox_id and user_id = $user_id"); 60 | $dbq->close(); 61 | } 62 | 63 | Header("Location: folders.php"); 64 | } 65 | 66 | ?> 67 | -------------------------------------------------------------------------------- /save_preferences.php: -------------------------------------------------------------------------------- 1 | execute("select log_id,user_id,username from tblLoggedUsers where hash = '$ID'"); 17 | $log_id = $dbq->fields['log_id']; 18 | $user_id = $dbq->fields['user_id']; 19 | $username = $dbq->fields['username']; 20 | $dbq->close(); 21 | 22 | if ($log_id == ""){ 23 | Header("Location: index.php?error_id=1"); 24 | } else { 25 | 26 | if ($emailspp > 100) { 27 | $emailspp = 100; 28 | } 29 | 30 | if ($emailspp < 15 || !is_numeric($emailspp)) { 31 | $emailspp = 15; 32 | } 33 | 34 | $txtreal_name = clean_data($txtreal_name); 35 | $txtsignature = clean_data($txtsignature); 36 | $txtemail = clean_data($txtemail); 37 | $emailspp = clean_data($emailspp); 38 | $txtsmtp_user = clean_data($txtsmtp_user); 39 | $txtsmtp_pass = clean_data($txtsmtp_pass); 40 | 41 | $dbq = $db->execute("update tblUsers set real_name='$txtreal_name', signature='$txtsignature', rsrv_int1='$emailspp', rsrv_char1='$txtemail',rsrv_char2='$txtsmtp_user',rsrv_char3='$txtsmtp_pass' where user_id = $user_id"); 42 | $dbq->close(); 43 | 44 | Header("Location: mailbox.php?mbox_id=INBOX"); 45 | } 46 | 47 | ?> 48 | -------------------------------------------------------------------------------- /sendmail.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Postaci-Webmail/Postaci/fff83d022087280e6fdad404f3289ce95838331d/sendmail.php -------------------------------------------------------------------------------- /spellcheck.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 15 | $log_id = $dbq->fields['log_id']; 16 | $dbq->close(); 17 | if ($log_id == ""){ 18 | 19 | Header("Location: index.php?error_id=1"); 20 | } else { 21 | 22 | function mychop($thistring,$length) { 23 | $result=""; 24 | $mystring=trim($thistring); 25 | if (strlen($mystring)>$length) { 26 | $result=substr($mystring,0,$length); 27 | $result = "$result..."; 28 | }else { 29 | $result=$mystring; 30 | } 31 | 32 | return($result); 33 | } 34 | 35 | $mbox_id = rawurldecode($mbox_id); 36 | 37 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 38 | 39 | // Check to see if the mbox_id is a valid one. 40 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 41 | $username = $dbq->fields['username']; 42 | $user_id = $dbq->fields['user_id']; 43 | $dbq->close(); 44 | 45 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 46 | 47 | include ("$postaci_directory" . "includes/commonhead.inc"); 48 | include ("$postaci_directory" . "includes/stylesheets.inc"); 49 | include ("$postaci_directory" . "includes/javascripts.inc"); 50 | include ("$postaci_directory" . "includes/functions.inc"); 51 | 52 | ?> 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
ver :  <? echo $postaci_version; ?>
63 | 64 | 65 | 66 | 67 | 68 | 69 |
70 | 71 | 72 | 73 | 161 | 193 | 194 |

74 | 75 | 76 | 79 | 80 | 81 | 84 | 85 | 86 | 89 | 90 | 91 | 124 | 125 | 126 | 129 | 130 | 131 | 134 | 135 | 136 | $text78\n"; 139 | } else { 140 | echo "\n"; 141 | } 142 | ?> 143 | 144 | 145 | 158 | 159 |
77 | 78 |
82 | 83 |
87 | 88 |
92 | 93 | 94 | 97 | 121 | 122 |
95 | 96 | 98 | INBOX
"; 101 | } 102 | $folders = $email->getMailboxes(); 103 | $folder_names = array(); 104 | $folder_counter=-1; 105 | while (list($key,$val) = each($folders["name"])) { 106 | $folder_counter++; 107 | $folder_names[$folder_counter] = $val; 108 | } 109 | $ids = array(); 110 | $folder_counter=-1; 111 | while (list($key,$val) = each($folders["id"])) { 112 | $folder_counter++; 113 | $ids[$folder_counter] = $val; 114 | } 115 | 116 | for($i=0;$i$folder_names[$i]
"; 118 | } 119 | ?> 120 |
123 |
127 | 128 |
132 | 133 |
 
146 |
147 | 148 | 149 | \n"; 152 | } 153 | ?> 154 | 155 |
156 |
157 |
160 |
162 | 163 | 164 | 165 | 166 | 169 | 180 | 181 | 182 | 183 | 184 | 189 | 190 | 191 |
167 |

168 |
170 |
 
171 |
172 | 173 | 174 | 175 | 176 |
177 |
178 |

 

179 |
 
  185 |
186 |
187 |

188 |

 
192 |
195 | 196 | 197 | 198 | 201 | -------------------------------------------------------------------------------- /template.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | 20 | Header("Location: index.php?error_id=1"); 21 | } else { 22 | 23 | function mychop($thistring,$length) { 24 | $result=""; 25 | $mystring=trim($thistring); 26 | if (strlen($mystring)>$length) { 27 | $result=substr($mystring,0,$length); 28 | $result = "$result..."; 29 | }else { 30 | $result=$mystring; 31 | } 32 | 33 | return($result); 34 | } 35 | 36 | $mbox_id = rawurldecode($mbox_id); 37 | 38 | include ("$postaci_directory" . "classes/imap_pop3.inc"); 39 | 40 | // Check to see if the mbox_id is a valid one. 41 | $dbq = $db->execute("select user_id,username from tblLoggedUsers where hash='$ID'"); 42 | $username = $dbq->fields['username']; 43 | $user_id = $dbq->fields['user_id']; 44 | $dbq->close(); 45 | 46 | $email=new imap_pop3($default_port,$default_protocol,$default_host,$username,$password,$mbox_id); 47 | 48 | include ("$postaci_directory" . "includes/commonhead.inc"); 49 | include ("$postaci_directory" . "includes/stylesheets.inc"); 50 | include ("$postaci_directory" . "includes/javascripts.inc"); 51 | include ("$postaci_directory" . "includes/functions.inc"); 52 | 53 | ?> 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
ver :  <? echo $postaci_version; ?>
64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 | 72 | 73 | 74 | 162 | 204 | 205 |

75 | 76 | 77 | 80 | 81 | 82 | 85 | 86 | 87 | 90 | 91 | 92 | 125 | 126 | 127 | 130 | 131 | 132 | 135 | 136 | 137 | $text78\n"; 140 | } else { 141 | echo "\n"; 142 | } 143 | ?> 144 | 145 | 146 | 159 | 160 |
78 | 79 |
83 | 84 |
88 | 89 |
93 | 94 | 95 | 98 | 122 | 123 |
96 | 97 | 99 | INBOX
"; 102 | } 103 | $folders = $email->getMailboxes(); 104 | $folder_names = array(); 105 | $folder_counter=-1; 106 | while (list($key,$val) = each($folders["name"])) { 107 | $folder_counter++; 108 | $folder_names[$folder_counter] = $val; 109 | } 110 | $ids = array(); 111 | $folder_counter=-1; 112 | while (list($key,$val) = each($folders["id"])) { 113 | $folder_counter++; 114 | $ids[$folder_counter] = $val; 115 | } 116 | 117 | for($i=0;$i$folder_names[$i]
"; 119 | } 120 | ?> 121 |
124 |
128 | 129 |
133 | 134 |
 
147 |
148 | 149 | 150 | \n"; 153 | } 154 | ?> 155 | 156 |
157 |
158 |
161 |
163 | 164 | 165 | 166 | 167 | 170 | 191 | 192 | 193 | 194 | 195 | 200 | 201 | 202 |
168 |

169 |
171 |
 
172 |
173 | 174 | 175 | 178 | 179 | 180 | 181 | 182 | 183 | 186 | 187 |
176 |
177 |
Put body here.
184 |
185 |
188 |
189 |

 

190 |
 
  196 |
197 |
198 |

199 |

 
203 |
206 | 207 | 208 | 209 | 212 | -------------------------------------------------------------------------------- /upload.php: -------------------------------------------------------------------------------- 1 | execute("select log_id from tblLoggedUsers where hash = '$ID'"); 16 | $log_id = $dbq->fields['log_id']; 17 | $dbq->close(); 18 | if ($log_id == ""){ 19 | 20 | Header("Location: index.php?error_id=1"); 21 | } else { 22 | // Saving the message body to a temporary file. 23 | $dosyaadi = "msgbody.txt"; 24 | $fp = fopen($attach_directory . $ID . "#####" . "msgbody.txt", "w+"); 25 | if ($fp) { 26 | $sonuc = fputs($fp, $msgbody); 27 | fclose($fp); 28 | } //end if 29 | 30 | 31 | if(copy($userfile, $attach_directory . $ID . "######" . $userfile_name)) { 32 | Header("Location: attachments.php?to=$to&cc=$cc&bcc=$bcc&subject=$subject&attached=1&mbox_id=$mbox_id&post_act=$post_act"); 33 | } else { 34 | echo " 

 

$text90

"; 35 | echo "$text47

\n"; 36 | } // end if 37 | } 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /validate_login.php: -------------------------------------------------------------------------------- 1 | authenticate()) { 47 | 48 | //Check to see if this is the first login. 49 | $user_id = 0; 50 | $dbq = $db->execute("select user_id from tblUsers where username = '$txtusername'"); 51 | $user_id = $dbq->fields['user_id']; 52 | $dbq->close(); 53 | 54 | $dbq = $db->execute("select " . $default_protocol . "_count from tblUsers where username = '$txtusername'"); 55 | $visit_count = $dbq->fields[$default_protocol . '_count']; 56 | $dbq->close(); 57 | 58 | $qdate = date('Y-m-d'); 59 | $qtime = date('H:i'); 60 | 61 | if ($visit_count == 0) { 62 | if ($user_id == 0) { // User doesn't exist in tblUsers... (s)he didn' t log in before. 63 | $user = new userclass(); 64 | $dbq = $db->execute("select user_id from tblUsers order by user_id asc"); 65 | $dbq->lastRow(); 66 | $user_id = $dbq->fields['user_id']; 67 | $dbq->close(); 68 | $user_id++; 69 | 70 | // Find user' s domain_id 71 | $domain_id = $user->findUserDomainID($txtusername); 72 | // adding user to tblUsers with default values. 73 | $dbq = $db->execute("insert into tblUsers values($user_id,'$txtusername','','',$domain_id,'$qdate','$REMOTE_ADDR',0,0,'',0,0,0,0,0,0,'','','','','','','','','','','','')"); 74 | $dbq->close(); 75 | } 76 | 77 | if ($default_protocol == "pop3") { 78 | // creating default database mailboxes for POP3 access. 79 | $mbox = new mailbox(); 80 | $mbox_id = $mbox->findMaxMboxID() + 1; 81 | $dbq = $db->execute("insert into tblMailBoxes values($mbox_id,$user_id,'$text7',1)"); 82 | $mbox_id++; 83 | $dbq = $db->execute("insert into tblMailBoxes values($mbox_id,$user_id,'$text8',2)"); 84 | $dbq->close(); 85 | } else { 86 | $mbox2 = imap_open("{" . $default_host . "/" . $default_protocol . "}", $txtusername, $txtpassword); 87 | 88 | if ($mbox2) { 89 | 90 | $folders = $email->getMailboxes(); 91 | $folder_names = array(); 92 | $folder_counter=-1; 93 | $sent_item_exists = 0; 94 | $draft_exists = 0; 95 | while (list($key,$val) = each($folders["name"])) { 96 | $folder_counter++; 97 | $folder_names[$folder_counter] = $val; 98 | if ($folder_names[$folder_counter] == "Sent Items") { 99 | $sent_item_exists = 1; 100 | } 101 | if ($folder_names[$folder_counter] == "Drafts") { 102 | $draft_exists = 1; 103 | } 104 | } 105 | 106 | $sonuc = imap_createmailbox($mbox2, "{" . $default_host . "}INBOX"); 107 | $sonuc = imap_subscribe($mbox2, "{" . $default_host . "}INBOX"); 108 | 109 | if ($sent_item_exists == 0) { 110 | imap_createmailbox($mbox2, "{" . $default_host . "}Sent Items"); 111 | imap_subscribe($mbox2, "{" . $default_host . "}Sent Items"); 112 | } 113 | if ($draft_exists == 0) { 114 | imap_createmailbox($mbox2, "{" . $default_host . "}Drafts"); 115 | imap_subscribe($mbox2, "{" . $default_host . "}Drafts"); 116 | } 117 | } 118 | } 119 | 120 | $f = 1; // First time visitors shall see preferences screen when they enter... 121 | } // end if 122 | 123 | 124 | // We take a log of user details in tblLoggedUsers. This table will be used for gathering username and password. 125 | $dbq = $db->execute("select log_id from tblLoggedUsers"); 126 | $dbq->lastrow(); 127 | $log_id = $dbq->fields['log_id']; 128 | $dbq->close(); 129 | $log_id++; 130 | $dbq = $db->execute("insert into tblLoggedUsers values($log_id,'$txtusername','','$ID','$REMOTE_ADDR','$qdate','$qtime','$user_id',0,0,'','')"); 131 | $dbq->close(); 132 | 133 | // Update the database mailbox names in tblMailboxes for POP3 134 | if ($default_protocol == "pop3") { 135 | $dbq = $db->execute("update tblMailBoxes set mboxname='$text7' where user_id = $user_id and mbox_type = 1"); 136 | $dbq = $db->execute("update tblMailBoxes set mboxname='$text8' where user_id = $user_id and mbox_type = 2"); 137 | } 138 | 139 | $dbq = $db->execute("select " . $default_protocol . "_count from tblUsers where username = '$txtusername'"); 140 | $visit_count = $dbq->fields[$default_protocol . '_count']; 141 | $visit_count++; 142 | $dbq = $db->execute("update tblUsers set " . $default_protocol . "_count=$visit_count where username = '$txtusername'"); 143 | $dbq->close(); 144 | 145 | Header("Location: mailbox.php?mbox_id=INBOX&f=$f"); 146 | 147 | } else { 148 | Header("Location: index.php?error_id=1"); 149 | } 150 | 151 | ?> 152 | --------------------------------------------------------------------------------