kartero.org

kartero.org

Git

This blob has been accessed 265 times via Git panel.

  1. <?php
  2.  
  3. /* modify the values of $db_host, $db_name, $db_user, $db_pass, and $mail_root for basic configuration */
  4.  
  5. $db_host = "localhost";
  6. $db_name = "kartero";
  7. $db_user = "kartero";
  8. $db_pass = "fr1ng3!";
  9.  
  10. $mail_root = "/kartero/mail";
  11. $mail_home = "/kartero/home";
  12.  
  13. /* feel free to hack the succeeding code to suit your needs (basic php and mysql skills required) */
  14.  
  15. require_once("core.php");
  16.  
  17. function rmdirr($recurse_dirname) {
  18.  
  19.         if (!file_exists($recurse_dirname)) {
  20.                 return false;
  21.         }
  22.  
  23.         if (is_file($recurse_dirname)) {
  24.                 return unlink($recurse_dirname);
  25.         }
  26.  
  27.         $recurse_dir = dir($recurse_dirname);
  28.  
  29.         while (false !== $recurse_entry = $recurse_dir->read()) {
  30.  
  31.                 if ($recurse_entry == '.' || $recurse_entry == '..') {
  32.                         continue;
  33.                 }
  34.  
  35.                 rmdirr("$recurse_dirname/$recurse_entry");
  36.         }
  37.  
  38.         $recurse_dir->close();
  39.         return rmdir($recurse_dirname);
  40. }
  41.  
  42. function ack($ack_string) {
  43.         echo "<table width=\"100%\"><tr></td><div class=\"ack\">$ack_string</div></td></tr></table>";
  44. }
  45.  
  46. function nak($nak_string) {
  47.         echo "<table width=\"100%\"><tr></td><div class=\"nak\">$nak_string</div></td></tr></table>";
  48. }
  49.  
  50. if (file_exists("css.php")) {
  51.  
  52.         $css = file_get_contents("css.php");
  53.         $css = str_replace("<style>","",$css);
  54.         $css = str_replace("</style>","",$css);
  55.  
  56.         echo "<style>\r\n$css</style>\r\n\r\n";
  57. }
  58.  
  59. if (!file_exists("$mail_root")) {
  60.  
  61.         $mail_dirs = explode("/",$mail_root);
  62.  
  63.         foreach ($mail_dirs as $mail_dir) {
  64.        
  65.                 if (!empty($mail_dir)) {
  66.                         $mail_mkdir = $mail_mkdir . "/" . $mail_dir;
  67.                         mkdir("$mail_mkdir");
  68.                 }
  69.         }
  70.  
  71.         if (!file_exists("$mail_root")) {
  72.                 nak("Can't create '$mail_root' (check filesystem permissions or change '&#36;mail_root' and try again)");
  73.                 exit();
  74.         }
  75. }
  76.  
  77. $db_link = mysql_pconnect($db_host, $db_user, $db_pass);
  78.  
  79. if (!$db_link) {
  80.         nak(mysql_error());
  81.         exit;
  82. }
  83.  
  84. $db_query = mysql_query("use $db_name");
  85.  
  86. if (!$db_query) {
  87.         $pw_crypt = crypt($db_pass);
  88.         $db_query = mysql_query("create database $db_name");
  89.         $db_query = mysql_query("use $db_name");
  90.         $db_query = mysql_query("create table admins (id varchar(16) not null, pw varchar(64) not null, primary key (id), unique key (id))");
  91.         $db_query = mysql_query("create table domains (id varchar(128) not null, pw varchar(64) not null, max int(6) default '0', mode int(1) default '1', primary key (id), unique key (id))");
  92.         $db_query = mysql_query("create table users (id varchar(255) not null, pw varchar(64) not null, maildir varchar(255) not null, name varchar(128), domain varchar(128), mode int(1) default '1', quota varchar(16), primary key (id), unique key(id))");
  93.         $db_query = mysql_query("create table aliases (id varchar(255) not null, alias varchar(255) not null, domain varchar(128), mode int(1) default '1', primary key (domain))");
  94.         $db_query = mysql_query("insert into admins values('$db_user','$pw_crypt')");
  95. }
  96.  
  97. $id_put = strip_tags($_POST['id']);
  98. $id_put = trim($id_put);
  99. $id_put = strtolower($id_put);
  100.  
  101. if (get_magic_quotes_gpc()) {
  102.         $id_put = stripslashes($id_put);
  103. }
  104.  
  105. if (!is_int($id_put)) {
  106.         $id_put = mysql_real_escape_string($id_put);
  107. }
  108.  
  109. $lvl_put = strip_tags($_POST['lvl']);
  110.  
  111. if ($lvl_put == "subscriber") {
  112.  
  113.         if (!strpos($id_put,"@")) {
  114.                 $id_put = $id_put . "@" . trim(str_replace("mail.","",$_SERVER['SERVER_NAME']));
  115.         }
  116.  
  117.         $pw_get = mysql_query("select pw from users where id='$id_put'");
  118. }
  119.  
  120. if ($lvl_put == "postmaster") {
  121.         $pw_get = mysql_query("select pw from domains where id='$id_put'");
  122. }
  123.  
  124. if ($lvl_put == "administrator") {
  125.         $pw_get = mysql_query("select pw from admins where id='$id_put'");
  126. }
  127.  
  128. $pw_get = mysql_fetch_row($pw_get);
  129. $pw_get = $pw_get[0];
  130.  
  131. $pw_put = $_POST['pw'];
  132.  
  133. if (get_magic_quotes_gpc()) {
  134.         $pw_put = stripslashes($pw_put);
  135. }
  136.  
  137. if (!is_int($pw_put)) {
  138.         $pw_put = mysql_real_escape_string($pw_put);
  139. }
  140.  
  141. $pw_put = strip_tags($pw_put);
  142.  
  143. $pw_mbox = $pw_put;
  144.  
  145. $pw_put = crypt($pw_put,$pw_get);
  146.  
  147. if ($pw_put == $pw_get) {
  148.         $_SESSION['logged_uid'] = $id_put;
  149.         $_SESSION['logged_lvl'] = $lvl_put;
  150.  
  151.         if ($_SESSION['logged_lvl'] == "subscriber") {
  152.                 $_SESSION['logged_key'] = $pw_mbox;
  153.         }
  154. }
  155.  
  156. unset($pw_mbox);
  157.  
  158. if ($_SESSION['logged_lvl'] == "subscriber") {
  159.  
  160.         $filedrop_box = sha1(microtime(true));
  161.  
  162.         $_SESSION['filedrop_dir'] = $filedrop_box;
  163.  
  164.         if (isset($_SESSION['clean_up_i']) and file_exists("attach/i/$fileUsr/{$_SESSION['clean_up_i']}") and (!isset($_POST['filedrop_box']) or empty($_POST['filedrop_box']))) {
  165.  
  166.                 rmdirr("attach/i/$fileUsr/{$_SESSION['clean_up_i']}");
  167.                 unset($_SESSION['clean_up_i']);
  168.  
  169.                 if (count(glob("attach/i/$fileUsr/*")) == 0) {
  170.                         rmdirr("attach/i/$fileUsr");
  171.                 }
  172.         }
  173.  
  174.         if (isset($_SESSION['clean_up_o']) and file_exists("attach/o/$fileUsr/{$_SESSION['clean_up_o']}")) {
  175.                        
  176.                 if ($_POST['rep'] == 2) {
  177.                
  178.                         if (!file_exists("attach/i/$fileUsr")) {
  179.                                 mkdir("attach/i/$fileUsr",0700,1);
  180.                         }
  181.  
  182.                         rename("attach/o/$fileUsr/{$_SESSION['clean_up_o']}","attach/i/$fileUsr/$filedrop_box");
  183.                 }
  184.                 else {
  185.                         rmdirr("attach/o/$fileUsr/{$_SESSION['clean_up_o']}");
  186.                 }
  187.  
  188.                 unset($_SESSION['clean_up_o']);
  189.  
  190.                 if (count(glob("attach/o/$fileUsr/*")) == 0) {
  191.                         rmdirr("attach/o/$fileUsr");
  192.                 }
  193.         }
  194. }
  195.  
  196. if (isset($_GET['do']) and ($_GET['do'] == "logout")) {
  197.  
  198.         if ($mbox) {
  199.                 imap_close($mbox, CL_EXPUNGE);
  200.         }
  201.  
  202.         $_SESSION = array();
  203.         session_destroy();
  204.         header("Location: .");
  205.         exit;
  206. }
  207.  
  208. if (!isset($_SESSION['logged_uid']) and (($pw_put != $pw_get) or !isset($_POST['id']) or !isset($_POST['pw']) or empty($_POST['id']) or empty($_POST['pw']))) {
  209.  
  210.         echo "<title>Kartero</title>";
  211.  
  212.         echo "<div class=\"login\"><center>";
  213.  
  214.         if (file_exists("images/{$_SERVER['SERVER_NAME']}.png")) {
  215.  
  216.                 $logo_info = getimagesize("images/{$_SERVER['SERVER_NAME']}.png");
  217.  
  218.                 if (($logo_info[mime] == "image/png") and ($logo_info[0] > 0) and ($logo_info[1] > 0)) {
  219.                         echo "<img src=\"images/{$_SERVER['SERVER_NAME']}.png\" border=\"0\" width=\"{$logo_info[0]}\" height=\"{$logo_info[1]}\">";
  220.                 }
  221.                 else {
  222.                         echo "<img src=\"images/logo.png\" border=\"0\" width=\"100\" height=\"100\">";
  223.                 }
  224.         }
  225.         else {
  226.                 echo "<img src=\"images/logo.png\" border=\"0\" width=\"100\" height=\"100\">";
  227.         }
  228.  
  229.         echo "<br>kartero v1.0 at {$_SERVER['SERVER_NAME']}<br><br>";
  230.  
  231.         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  232.         echo "<form method=\"post\">";
  233.         echo "<tr bgcolor=\"#ffffff\"><td><select class=\"input\" name=\"lvl\"><option value=\"subscriber\">subscriber</option><option value=\"postmaster\">postmaster</option><option value=\"administrator\">administrator</option></select></td></tr>";
  234.         echo "<tr bgcolor=\"#ffffff\"><td><input required autofocus class=\"input\" type=\"text\" name=\"id\" autocomplete=\"off\" maxlength=\"128\"></td></tr>";
  235.         echo "<tr bgcolor=\"#ffffff\"><td><input required class=\"input\" type=\"password\" name=\"pw\" autocomplete=\"off\" maxlength=\"64\"></td></tr>";
  236.         echo "<tr bgcolor=\"#ffffff\"><td><input class=\"button\" type=\"submit\" value=\"login\"></td></tr>";
  237.         echo "</form>";
  238.         echo "</table>";
  239.  
  240.         echo "</center></div>";
  241.  
  242.         echo "<iframe name=\"preload\" src=\"preload.php\" frameborder=\"0\" scrolling=\"0\" width=\"0\" height=\"0\"></iframe>";
  243.  
  244.         exit;
  245. }
  246.  
  247. if (isset($_SESSION['logged_uid'])) {
  248.  
  249.         echo "<nobr>You are currently logged in to your {$_SESSION['logged_uid']} {$_SESSION['logged_lvl']} account. Click <a href=\"?do=logout\">here</a> to logout.</nobr><br><br>";
  250.  
  251.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  252.         echo "<tr><td colspan=\"3\" valign=\"top\">";
  253.  
  254.         if ($_SESSION['logged_lvl'] == "subscriber") {
  255.  
  256.                 $usr_query = mysql_query("select * from users where id='{$_SESSION['logged_uid']}'");
  257.                 $usr_data = mysql_fetch_row($usr_query);
  258.  
  259.                 $dom_query = mysql_query("select mode from domains where id='{$usr_data[4]}'");
  260.                 $dom_data = mysql_fetch_row($dom_query);
  261.  
  262.                 if ($dom_data[0] == 0) {
  263.                         nak("{$usr_data[4]} disabled by admin");
  264.                         exit();
  265.                 }
  266.  
  267.                 if ($usr_data[5] == 0) {
  268.                         nak("{$_SESSION['logged_uid']} disabled by postmaster");
  269.                         exit();
  270.                 }
  271.        
  272.                 $usr_name = $usr_data[3];
  273.        
  274.                 if (isset($_POST['usr_name']) and !empty($_POST['usr_name']) and (strlen($_POST['usr_name']) <= 128) and (strlen($_POST['usr_name']) > 2)) {
  275.        
  276.                         $usr_name = trim($_POST['usr_name']);
  277.                         $usr_name = ucwords($usr_name);
  278.        
  279.                         if ($usr_name != $usr_data[3]) {
  280.        
  281.                                 $usr_query = mysql_query("update users set name='$usr_name' where id='{$_SESSION['logged_uid']}'");
  282.        
  283.                                 if (!usr_query) {
  284.                                         nak(strtolower(mysql_error()));
  285.                                 }
  286.                                 else {
  287.                                         ack("name changed");
  288.                                 }
  289.                         }
  290.                         else {
  291.                                 $usr_name = $usr_data[3];
  292.                         }
  293.                 }
  294.        
  295.                 $usr_pw0 = $usr_data[1];
  296.        
  297.                 if (isset($_POST['usr_pw1']) and !empty($_POST['usr_pw1']) and isset($_POST['usr_pw2']) and !empty($_POST['usr_pw2']) and isset($_POST['usr_pw3']) and !empty($_POST['usr_pw3']) and (strlen($_POST['usr_pw2']) <= 64) and (strlen($_POST['usr_pw3']) <= 64) and (strlen($_POST['usr_pw2']) >= 8) and (strlen($_POST['usr_pw3']) >= 8)) {
  298.        
  299.                         $usr_pw1 = trim($_POST['usr_pw1']);
  300.                         $usr_pw2 = trim($_POST['usr_pw2']);
  301.                         $usr_pw3 = trim($_POST['usr_pw3']);
  302.        
  303.                         if ($usr_pw0 == crypt($usr_pw1,$usr_pw0)) {
  304.        
  305.                                 if ($usr_pw2 == $usr_pw3) {
  306.                                        
  307.                                         $usr_pw = crypt($usr_pw2);
  308.        
  309.                                         $usr_query = mysql_query("update users set pw='$usr_pw' where id='{$_SESSION['logged_uid']}'");
  310.        
  311.                                         if (!usr_query) {
  312.                                                 nak(strtolower(mysql_error()));
  313.                                         }
  314.                                         else {
  315.                                                 ack("password changed");
  316.                                                 $_SESSION['logged_key'] = $usr_pw2;
  317.                                         }
  318.                                 }
  319.                                 else {
  320.                                         nak("new passwords do not match");
  321.                                 }
  322.                         }
  323.                         else {
  324.                                 nak("current password entered is incorrect");
  325.                         }
  326.                 }
  327.         }
  328.  
  329.         if (isset($_POST['a_email']) and !empty($_POST['a_email']) and isset($_POST['a_fname']) and !empty($_POST['a_fname']) and isset($_POST['a_lname']) and !empty($_POST['a_lname'])) {
  330.  
  331.                 $a_email = strtolower(trim(strip_tags($_POST['a_email'])));
  332.  
  333.                 if (preg_match("/@/",$a_email) and preg_match("/\./",$a_email)) {
  334.  
  335.                         $a_fname = ucwords(trim(strip_tags($_POST['a_fname'])));
  336.                         $a_lname = ucwords(trim(strip_tags($_POST['a_lname'])));
  337.  
  338.                         $addr_query = mysql_query("create table if not exists contacts (id varchar(255) not null, lname varchar(64) not null, fname varchar(64) not null, email varchar(255) not null);");
  339.  
  340.                         $addr_query = mysql_query("select * from contacts where id='{$_SESSION['logged_uid']}' and email='$a_email';");
  341.  
  342.                         if (mysql_num_rows($addr_query) > 0) {
  343.                                 nak("$a_email exists");
  344.                         }
  345.                         else {
  346.                                 $addr_query = mysql_query("insert into contacts values('{$_SESSION['logged_uid']}','$a_lname','$a_fname','$a_email');");
  347.  
  348.                                 if (isset($_FILES['a_photo']) and !empty($_FILES['a_photo'])) {
  349.  
  350.                                         if (is_uploaded_file($_FILES['a_photo']['tmp_name'])) {
  351.  
  352.                                                 if (($_FILES['a_photo']['type']=="image/gif") || ($_FILES['a_photo']['type']=="image/pjpeg") || ($_FILES['a_photo']['type']=="image/jpeg") || ($_FILES['a_photo']['type']=="image/png")) {
  353.  
  354.                                                         $a_path = sha1($_SESSION['logged_uid']);
  355.                                                         $a_file = sha1($a_email);                              
  356.  
  357.                                                         if (file_exists("images/contacts/$a_path/{$a_file}.gif")) {
  358.                                                                 unlink("images/contacts/$a_path/{$a_file}.gif");
  359.                                                         }
  360.  
  361.                                                         if (file_exists("images/contacts/$a_path/{$a_file}.jpg")) {
  362.                                                                 unlink("images/contacts/$a_path/{$a_file}.jpg");
  363.                                                         }
  364.  
  365.                                                         if (file_exists("images/contacts/$a_path/{$a_file}.png")) {
  366.                                                                 unlink("images/contacts/$a_path/{$a_file}.png");
  367.                                                         }
  368.  
  369.                                                         if (!file_exists("images/contacts/$a_path")) {
  370.                                                                 mkdir("images/contacts/$a_path",0700,true);
  371.                                                         }
  372.  
  373.                                                         if ($_FILES['a_photo']['type']=="image/gif") {
  374.                                                                 $res = copy($_FILES['a_photo']['tmp_name'], "images/contacts/$a_path/{$a_file}.gif");
  375.                                                                 kartero_resize_image("images/contacts/$a_path/{$a_file}.gif");
  376.                                                                 unlink($_FILES['a_photo']['tmp_name']);
  377.                                                         }
  378.  
  379.                                                         if (($_FILES['a_photo']['type']=="image/jpeg") or ($_FILES['a_photo']['type']=="image/pjpeg")) {
  380.                                                                 $res = copy($_FILES['a_photo']['tmp_name'], "images/contacts/$a_path/{$a_file}.jpg");
  381.                                                                 kartero_resize_image("images/contacts/$a_path/{$a_file}.jpg");
  382.                                                                 unlink($_FILES['a_photo']['tmp_name']);
  383.                                                         }
  384.  
  385.                                                         if ($_FILES['a_photo']['type']=="image/png") {
  386.                                                                 $res = copy($_FILES['a_photo']['tmp_name'], "images/contacts/$a_path/{$a_file}.png");
  387.                                                                 kartero_resize_image("images/contacts/$a_path/{$a_file}.png");
  388.                                                                 unlink($_FILES['a_photo']['tmp_name']);
  389.                                                         }
  390.                                                 }
  391.                                                 else {
  392.                                                         unlink($_FILES['a_photo']['tmp_name']);
  393.                                                 }
  394.                                         }
  395.                                         else {
  396.                                                 unlink($_FILES['a_photo']['tmp_name']);
  397.                                         }
  398.                                 }
  399.  
  400.                                 ack("$a_email added to contacts");
  401.                         }
  402.                 }
  403.                 else {
  404.                         nak("invalid email");
  405.                 }
  406.         }
  407.  
  408.         if (isset($_POST['a_del']) and !empty($_POST['a_del'])) {
  409.  
  410.                 $a_del = strtolower(trim(strip_tags($_POST['a_del'])));
  411.  
  412.                 $a_del_query = mysql_query("delete from contacts where id='{$_SESSION['logged_uid']}' and email='$a_del';");
  413.  
  414.                 if (!$a_del_query) {
  415.                         nak(strtolower(mysql_error()));
  416.                 }
  417.                 else {
  418.                         $a_path = sha1($_SESSION['logged_uid']);
  419.                         $a_file = sha1($a_del);                        
  420.  
  421.                         if (file_exists("images/contacts/$a_path/{$a_file}.gif")) {
  422.                                 unlink("images/contacts/$a_path/{$a_file}.gif");
  423.                         }
  424.  
  425.                         if (file_exists("images/contacts/$a_path/{$a_file}.jpg")) {
  426.                                 unlink("images/contacts/$a_path/{$a_file}.jpg");
  427.                         }
  428.  
  429.                         if (file_exists("images/contacts/$a_path/{$a_file}.png")) {
  430.                                 unlink("images/contacts/$a_path/{$a_file}.png");
  431.                         }
  432.  
  433.                         ack("$a_del removed from contacts");
  434.                 }
  435.         }
  436.  
  437.         if ($_SESSION['logged_lvl'] == "postmaster") {
  438.        
  439.                 $dom_query = mysql_query("select mode from domains where id='{$_SESSION['logged_uid']}'");
  440.                 $dom_query = mysql_fetch_row($dom_query);
  441.        
  442.                 if ($dom_query[0] == "0") {
  443.                         nak("{$_SESSION['logged_uid']} disabled by admin - new settings will take effect once it is re-enabled");
  444.                 }
  445.  
  446.                 $max_get = mysql_query("select max from domains where id='{$_SESSION['logged_uid']}'");
  447.  
  448.                 $pm_max = mysql_fetch_row($max_get);
  449.  
  450.                 $pm_get = mysql_query("select * from users where domain='{$_SESSION['logged_uid']}' order by id");
  451.  
  452.                 $pm_now = mysql_num_rows($pm_get);
  453.  
  454.                 if (isset($_POST['pm_id']) and isset($_POST['pm_name']) and isset($_POST['pm_pw']) and !empty($_POST['pm_id']) and !empty($_POST['pm_name']) and !empty($_POST['pm_pw'])) {
  455.  
  456.                         if (($pm_now >= $pm_max[0]) and ($pm_max[0] != 0)) {
  457.                                 nak("{$_SESSION['logged_uid']} limit exceeded");
  458.                         }
  459.                         else {
  460.                                 $pm_id = trim($_POST['pm_id']);
  461.                                 $pm_id = strtolower($pm_id);
  462.                
  463.                                 if (preg_match("/@/",$pm_id)) {
  464.                                         $pm_id = substr($pm_id,0,strpos($pm_id,"@"));
  465.                                 }
  466.                
  467.                                 $pm_addr = $pm_id . "@" . $_SESSION['logged_uid'];
  468.                
  469.                                 $alias_query = mysql_query("select id from aliases where id='$pm_addr'");
  470.                
  471.                                 if (mysql_fetch_row($alias_query) > 0) {
  472.                                         nak("$pm_addr alias exists");
  473.                                 }
  474.                                 else {
  475.                                         $pm_name = trim($_POST['pm_name']);
  476.                                         $pm_name = ucwords($pm_name);
  477.                
  478.                                         $pm_pw = trim($_POST['pm_pw']);
  479.                                         $pm_pw = crypt($pm_pw);
  480.                
  481.                                         $pm_init = substr($pm_id,0,1);
  482.                
  483.                                         $pm_maildir = "{$_SESSION['logged_uid']}/$pm_init/$pm_id";
  484.        
  485.                                         $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
  486.  
  487.                                         if ($pm_quota == "") {
  488.                                                 $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1',NULL)");
  489.                                         }
  490.                                         else {
  491.                                                 $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1','$pm_quota')");
  492.                                         }
  493.                
  494.                                         if (!$pm_query) {
  495.                                                 nak(strtolower(mysql_error()));
  496.                                         }
  497.                                         else {
  498.                                                 if (!file_exists("$mail_root/{$_SESSION['logged_uid']}")) {
  499.                                                         mkdir("$mail_root/{$_SESSION['logged_uid']}");
  500.                                                 }
  501.                
  502.                                                 if (!file_exists("$mail_root/{$_SESSION['logged_uid']}/$pm_init")) {
  503.                                                         mkdir("$mail_root/{$_SESSION['logged_uid']}/$pm_init");
  504.                                                 }
  505.                
  506.                                                 if (!file_exists("$mail_root/$pm_maildir")) {
  507.                                                         mkdir("$mail_root/$pm_maildir");
  508.                                                 }
  509.                
  510.                                                 if (!file_exists("$mail_root/$pm_maildir/cur")) {
  511.                                                         mkdir("$mail_root/$pm_maildir/cur");
  512.                                                 }
  513.                        
  514.                                                 if (!file_exists("$mail_root/$pm_maildir/new")) {
  515.                                                         mkdir("$mail_root/$pm_maildir/new");
  516.                                                 }
  517.                
  518.                                                 if (!file_exists("$mail_root/$pm_maildir/tmp")) {
  519.                                                         mkdir("$mail_root/$pm_maildir/tmp");
  520.                                                 }
  521.                
  522.                                                 ack("$pm_addr added");
  523.                                         }
  524.                                 }
  525.                         }
  526.                 }
  527.  
  528.                 if (isset($_POST['pm_mod']) and !empty($_POST['pm_mod'])) {
  529.                        
  530.                         $pm_mod = trim($_POST['pm_mod']);
  531.        
  532.                         if (isset($_POST['pm_name']) and !empty($_POST['pm_name'])) {
  533.        
  534.                                 $pm_name = trim($_POST['pm_name']);
  535.                                 $pm_name = ucwords($pm_name);
  536.        
  537.                                 $pm_query = mysql_query("select name from users where id='$pm_mod'");
  538.        
  539.                                 $name_get = mysql_fetch_row($pm_query);
  540.        
  541.                                 if ($name_get[0] != $pm_name) {
  542.        
  543.                                         $pm_query = mysql_query("update users set name='$pm_name' where id='$pm_mod'");
  544.        
  545.                                         if (!$pm_query) {
  546.                                                 nak(strtolower(mysql_error()));
  547.                                         }
  548.                                         else {
  549.                                                 ack("$pm_mod complete name updated");
  550.                                         }
  551.                                 }
  552.                         }
  553.        
  554.                         if (isset($_POST['pm_pass']) and !empty($_POST['pm_pass'])) {
  555.        
  556.                                 $pm_pass = $_POST['pm_pass'];
  557.                                 $pm_pass = crypt($pm_pass);
  558.        
  559.                                 $pm_query = mysql_query("update users set pw='$pm_pass' where id='$pm_mod'");
  560.        
  561.                                 if (!$pm_query) {
  562.                                         nak(strtolower(mysql_error()));
  563.                                 }
  564.                                 else {
  565.                                         ack("$pm_mod password updated");
  566.                                 }
  567.                         }
  568.  
  569.                         if (isset($_POST['pm_quota'])) {
  570.        
  571.                                 $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
  572.        
  573.                                 $pm_query = mysql_query("select quota from users where id='$pm_mod'");
  574.        
  575.                                 $quota_get = mysql_fetch_row($pm_query);
  576.        
  577.                                 if ($quota_get[0] != $pm_quota) {
  578.        
  579.                                         if ($pm_quota == "") {
  580.                                                 $pm_query = mysql_query("update users set quota=NULL where id='$pm_mod'");
  581.                                         }
  582.                                         else {
  583.                                                 $pm_query = mysql_query("update users set quota='$pm_quota' where id='$pm_mod'");
  584.                                         }
  585.        
  586.                                         if (!$pm_query) {
  587.                                                 nak(strtolower(mysql_error()));
  588.                                         }
  589.                                         else {
  590.                                                 ack("$pm_mod quota updated");
  591.                                         }
  592.                                 }
  593.                         }
  594.                 }
  595.        
  596.                 if (isset($_POST['pm_set']) and !empty($_POST['pm_set']) and isset($_POST['pm_do']) and !empty($_POST['pm_do'])) {
  597.        
  598.                         $pm_set = trim($_POST['pm_set']);
  599.                         $pm_do = trim($_POST['pm_do']);
  600.        
  601.                         if ($pm_do == "disable") {
  602.                                 $pm_do = "0";
  603.                         }
  604.        
  605.                         if ($pm_do == "enable") {
  606.                                 $pm_do = "1";
  607.                         }
  608.                
  609.                         $pm_query = mysql_query("update aliases set mode='$pm_do' where alias='$pm_set'");
  610.                         $pm_query = mysql_query("update users set mode='$pm_do' where id='$pm_set'");
  611.        
  612.                         if (!$pm_query) {
  613.                                 nak(strtolower(mysql_error()));
  614.                         }
  615.                         else {
  616.        
  617.                                 $pm_query = mysql_query("select alias from aliases where alias='$pm_set'");
  618.                                 $pm_aka = mysql_num_rows($pm_query);
  619.        
  620.                                 if ($pm_do == "0") {
  621.        
  622.                                         if ($pm_aka > 0) {
  623.        
  624.                                                 if ($pm_aka < 2) {
  625.                                                         ack("$pm_set account and 1 alias disabled");
  626.                                                 }
  627.                                                 else {
  628.                                                         ack("$pm_set account and $pm_aka aliases disabled");
  629.                                                 }
  630.                                         }
  631.                                         else {
  632.                                                 ack("$pm_set account disabled");
  633.                                         }
  634.                                 }
  635.        
  636.                                 if ($pm_do == "1") {
  637.        
  638.                                         if (mysql_fetch_row($pm_query) > 0) {
  639.        
  640.                                                 if ($pm_aka < 2) {
  641.                                                         ack("$pm_set account and 1 alias enabled");
  642.                                                 }
  643.                                                 else {
  644.                                                         ack("$pm_set account and $pm_aka aliases enabled");
  645.                                                 }
  646.                                         }
  647.                                         else {
  648.                                                 ack("$pm_set account enabled");
  649.                                         }
  650.                                 }
  651.                         }
  652.                 }
  653.        
  654.                 if (isset($_POST['pm_del']) and !empty($_POST['pm_del'])) {
  655.                        
  656.                         $pm_del = trim($_POST['pm_del']);
  657.        
  658.                         $pm_query = mysql_query("delete from aliases where alias='$pm_del'");
  659.                         $pm_query = mysql_query("delete from users where id='$pm_del'");
  660.        
  661.                         if (!$pm_query) {
  662.                                 nak(strtolower(mysql_error()));
  663.                         }
  664.                         else {
  665.                                 $pm_init = substr($pm_del,0,1);
  666.                                 $pm_box = substr($pm_del,0,strpos($pm_del,"@"));
  667.        
  668.                                 if (file_exists("$mail_root/{$_SESSION['logged_uid']}/$pm_init/$pm_box")) {
  669.                                         rmdirr("$mail_root/{$_SESSION['logged_uid']}/$pm_init/$pm_box");
  670.                                 }
  671.        
  672.                                 if (count(glob("$mail_root/{$_SESSION['logged_uid']}/$pm_init/*")) < 1) {
  673.                                         rmdir("$mail_root/{$_SESSION['logged_uid']}/$pm_init");
  674.                                 }
  675.        
  676.                                 ack("$pm_del deleted");
  677.                         }
  678.                 }
  679.        
  680.                 if (isset($_POST['alias_add']) and !empty($_POST['alias_add']) and isset($_POST['alias_to']) and !empty($_POST['alias_to'])) {
  681.        
  682.                         $alias_add = trim($_POST['alias_add']);
  683.        
  684.                         if (preg_match("/@/",$alias_add)) {
  685.                                 $alias_add = substr($alias_add,0,strpos($alias_add,"@"));
  686.                         }
  687.        
  688.                         $alias_add = "$alias_add@{$_SESSION['logged_uid']}";
  689.        
  690.                         $alias_to = trim($_POST['alias_to']);
  691.        
  692.                         $alias_query = mysql_query("select id from users where id='$alias_add'");
  693.        
  694.                         if (mysql_num_rows($alias_query) > 0) {
  695.                                 nak("$alias_add account exists");
  696.                         }
  697.                         else {
  698.                                 if (!preg_match("/@/",$alias_to) or preg_match("/@{$_SESSION['logged_uid']}/",$alias_to)) {
  699.        
  700.                                         if (preg_match("/@{$_SESSION['logged_uid']}/",$alias_to)) {
  701.                                                 $alias_to = substr($alias_to,0,strpos($alias_to,"@"));
  702.                                         }
  703.                
  704.                                         $alias_to = "$alias_to@{$_SESSION['logged_uid']}";
  705.                
  706.                                         $alias_query = mysql_query("select id from users where id='$alias_to'");
  707.                
  708.                                         if (mysql_num_rows($alias_query) < 1) {
  709.                                                 nak("$alias_to does not exist");
  710.                                         }
  711.                                         else {
  712.                                                 $alias_query = mysql_query("insert into aliases values('$alias_add','$alias_to','{$_SESSION['logged_uid']}','1')");
  713.                
  714.                                                 if (!$alias_query) {
  715.                                                         nak(strtolower(mysql_error()));
  716.                                                 }
  717.                                                 else {
  718.                                                         ack("$alias_add added");
  719.                                                 }
  720.                                         }
  721.                                 }
  722.                                 else {
  723.                                         $alias_query = mysql_query("insert into aliases values('$alias_add','$alias_to','{$_SESSION['logged_uid']}','1')");
  724.        
  725.                                         if (!$alias_query) {
  726.                                                 nak(strtolower(mysql_error()));
  727.                                         }
  728.                                         else {
  729.                                                 ack("$alias_add added");
  730.                                         }
  731.                                 }
  732.                         }
  733.                 }
  734.        
  735.                 if (isset($_POST['alias_mod']) and !empty($_POST['alias_mod']) and isset($_POST['alias_old']) and !empty($_POST['alias_old']) and isset($_POST['alias_to']) and !empty($_POST['alias_to'])) {
  736.                        
  737.                         $alias_mod = trim($_POST['alias_mod']);
  738.                         $alias_old = trim($_POST['alias_old']);
  739.                         $alias_to = trim($_POST['alias_to']);
  740.        
  741.                         if (!preg_match("/@/",$alias_to) or preg_match("/@{$_SESSION['logged_uid']}/",$alias_to)) {
  742.        
  743.                                 if (preg_match("/@{$_SESSION['logged_uid']}/",$alias_to)) {
  744.                                         $alias_to = substr($alias_to,0,strpos($alias_to,"@"));
  745.                                 }
  746.        
  747.                                 $alias_to = "$alias_to@{$_SESSION['logged_uid']}";
  748.        
  749.                                 $alias_query = mysql_query("select id from users where id='$alias_to'");
  750.        
  751.                                 if (mysql_num_rows($alias_query) < 1) {
  752.                                         nak("$alias_to does not exist");
  753.                                 }
  754.                                 else {
  755.                                         $alias_query = mysql_query("update aliases set alias='$alias_to' where id='$alias_mod' and alias='$alias_old'");
  756.        
  757.                                         if (!$alias_query) {
  758.                                                 nak(strtolower(mysql_error()));
  759.                                         }
  760.                                         else {
  761.                                                 ack("$alias_mod updated");
  762.                                         }
  763.                                 }
  764.                         }
  765.                         else {
  766.        
  767.                                 $alias_query = mysql_query("update aliases set alias='$alias_to' where id='$alias_mod' and alias='$alias_old'");
  768.                
  769.                                 if (!$alias_query) {
  770.                                         nak(strtolower(mysql_error()));
  771.                                 }
  772.                                 else {
  773.                                         ack("$alias_mod updated");
  774.                                 }
  775.                         }
  776.                 }
  777.        
  778.                 if (isset($_POST['alias_set']) and !empty($_POST['alias_set']) and isset($_POST['alias_usr']) and !empty($_POST['alias_usr']) and isset($_POST['alias_do']) and !empty($_POST['alias_do'])) {
  779.        
  780.                         $alias_set = trim($_POST['alias_set']);
  781.                         $alias_usr = trim($_POST['alias_usr']);
  782.                         $alias_do = trim($_POST['alias_do']);
  783.        
  784.                         if ($alias_do == "disable") {
  785.                                 $alias_do = "0";
  786.                                 $alias_query = mysql_query("update aliases set mode='$alias_do' where id='$alias_set' and alias='$alias_usr'");
  787.        
  788.                                 if (!$alias_query) {
  789.                                         nak(strtolower(mysql_error()));
  790.                                 }
  791.                                 else {
  792.                                         ack("$alias_set alias of $alias_usr disabled");
  793.                                 }
  794.                         }
  795.        
  796.                         if ($alias_do == "enable") {
  797.        
  798.                                 $alias_query = mysql_query("select alias from aliases where id='$alias_set'");
  799.                                 $alias_recipient = mysql_fetch_row($alias_query);
  800.                                 $alias_recipient = $alias_recipient[0];
  801.        
  802.                                 $usr_query = mysql_query("select mode from users where id='$alias_recipient'");
  803.                                 $alias_recipient_mode = mysql_fetch_row($usr_query);
  804.                                 $alias_recipient_mode = $alias_recipient_mode[0];
  805.        
  806.                                 if ($alias_recipient_mode == "0") {
  807.                                         nak("cannot enable $alias_set alias while $alias_recipient recipient account is disabled");
  808.                                 }
  809.                                 else {
  810.                                         $alias_do = "1";
  811.                                         $alias_query = mysql_query("update aliases set mode='$alias_do' where id='$alias_set' and alias='$alias_usr'");
  812.                
  813.                                         if (!$alias_query) {
  814.                                                 nak(strtolower(mysql_error()));
  815.                                         }
  816.                                         else {
  817.                                                 ack("$alias_set alias of $alias_usr enabled");
  818.                                         }
  819.                                 }
  820.                         }
  821.                 }
  822.        
  823.                 if (isset($_POST['alias_del']) and !empty($_POST['alias_del']) and isset($_POST['alias_usr']) and !empty($_POST['alias_usr'])) {
  824.                        
  825.                         $alias_del = trim($_POST['alias_del']);
  826.                         $alias_usr = trim($_POST['alias_usr']);
  827.  
  828.                         $alias_query = mysql_query("delete from aliases where id='$alias_del' and alias='$alias_usr'");
  829.        
  830.                         if (!$alias_query) {
  831.                                 nak(strtolower(mysql_error()));
  832.                         }
  833.                         else {
  834.                                 ack("$alias_del alias of $alias_usr deleted");
  835.                         }
  836.                 }
  837.         }
  838.        
  839.         if ($_SESSION['logged_lvl'] == "administrator") {
  840.  
  841.                 if (isset($_POST['dom_name']) and isset($_POST['dom_pass']) and isset($_POST['dom_max']) and !empty($_POST['dom_name']) and !empty($_POST['dom_pass']) and is_numeric($_POST['dom_max'])) {
  842.        
  843.                         $dom_name = trim($_POST['dom_name']);
  844.        
  845.                         $dom_pass = trim($_POST['dom_pass']);
  846.                         $dom_pass = crypt($dom_pass);
  847.        
  848.                         $dom_max = trim($_POST['dom_max']);
  849.        
  850.                         $dom_query = mysql_query("insert into domains values('$dom_name','$dom_pass','$dom_max','1')");
  851.        
  852.                         if (!$dom_query) {
  853.                                 nak(strtolower(mysql_error()));
  854.                         }
  855.                         else {
  856.                                 if (!file_exists("$mail_root/$dom_name")) {
  857.                                         mkdir("$mail_root/$dom_name");
  858.                                 }
  859.        
  860.                                 ack("$dom_name added");
  861.                         }
  862.                 }
  863.        
  864.                 if (isset($_POST['dom_mod']) and !empty($_POST['dom_mod'])) {
  865.                        
  866.                         $dom_mod = trim($_POST['dom_mod']);
  867.        
  868.                         if (isset($_POST['dom_pass']) and !empty($_POST['dom_pass'])) {
  869.        
  870.                                 $dom_pass = $_POST['dom_pass'];
  871.                                 $dom_pass = crypt($dom_pass);
  872.        
  873.                                 $dom_query = mysql_query("update domains set pw='$dom_pass' where id='$dom_mod'");
  874.        
  875.                                 if (!$dom_query) {
  876.                                         nak(strtolower(mysql_error()));
  877.                                 }
  878.                                 else {
  879.                                         ack("$dom_mod postmaster password updated");
  880.                                 }
  881.                         }
  882.        
  883.                         if (isset($_POST['dom_max']) and is_numeric($_POST['dom_max'])) {
  884.        
  885.                                 $dom_max = $_POST['dom_max'];
  886.        
  887.                                 $dom_query = mysql_query("select max from domains where id='$dom_mod'");
  888.        
  889.                                 $max_get = mysql_fetch_row($dom_query);
  890.        
  891.                                 if ($max_get[0] != $dom_max) {
  892.        
  893.                                         $dom_query = mysql_query("update domains set max='$dom_max' where id='$dom_mod'");
  894.        
  895.                                         if (!$dom_query) {
  896.                                                 nak(strtolower(mysql_error()));
  897.                                         }
  898.                                         else {
  899.                                                 ack("$dom_mod account limit updated");
  900.                                         }
  901.                                 }
  902.                         }
  903.                 }
  904.        
  905.                 if (isset($_POST['dom_set']) and !empty($_POST['dom_set']) and isset($_POST['dom_do']) and !empty($_POST['dom_do'])) {
  906.        
  907.                         $dom_set = trim($_POST['dom_set']);
  908.                         $dom_do = trim($_POST['dom_do']);
  909.        
  910.                         if ($dom_do == "disable") {
  911.                                 $dom_do = "0";
  912.                         }
  913.        
  914.                         if ($dom_do == "enable") {
  915.                                 $dom_do = "1";
  916.                         }
  917.                
  918.                         $dom_query = mysql_query("update domains set mode='$dom_do' where id='$dom_set'");
  919.        
  920.                         if (!$dom_query) {
  921.                                 nak(strtolower(mysql_error()));
  922.                         }
  923.                         else {
  924.                                 if ($dom_do == "0") {
  925.                                         ack("$dom_set disabled");
  926.                                 }
  927.        
  928.                                 if ($dom_do == "1") {
  929.                                         ack("$dom_set enabled");
  930.                                 }
  931.                         }
  932.                 }
  933.        
  934.                 if (isset($_POST['dom_del']) and !empty($_POST['dom_del'])) {
  935.                        
  936.                         $dom_del = trim($_POST['dom_del']);
  937.        
  938.                         $dom_query = mysql_query("delete from aliases where domain='$dom_del'");
  939.                         $dom_query = mysql_query("delete from users where domain='$dom_del'");
  940.                         $dom_query = mysql_query("delete from domains where id='$dom_del'");
  941.        
  942.                         if (!$dom_query) {
  943.                                 nak(strtolower(mysql_error()));
  944.                         }
  945.                         else {
  946.                                 if (file_exists("$mail_root/$dom_del")) {
  947.                                         rmdirr("$mail_root/$dom_del");
  948.                                 }
  949.                                 ack("$dom_del deleted");
  950.                         }
  951.                 }
  952.         }
  953.        
  954.         echo "</td></tr>";
  955.  
  956.         echo "<tr><td valign=\"top\">";
  957.  
  958.         if ($_SESSION['logged_lvl'] == "subscriber") {
  959.  
  960.                 $host = "{127.0.0.1:143/imap/notls/norsh}";
  961.  
  962.                 if (!isset($_POST['box']) or empty($_POST['box'])) {
  963.                         $folder = "INBOX";
  964.                 }
  965.                 else {
  966.                         $folder = trim(strip_tags($_POST['box']));
  967.                 }
  968.  
  969.                 $mbox = @imap_open("{$host}$folder", $_SESSION['logged_uid'], $_SESSION['logged_key'], CL_EXPUNGE) or die(imap_last_error());
  970.  
  971.                 if (isset($_POST['move_msg']) and !empty($_POST['move_msg']) and isset($_POST['move_box']) and !empty($_POST['move_box'])) {
  972.  
  973.                         $move_msg = trim(strip_tags($_POST['move_msg']));
  974.                         $move_box = imap_utf7_encode(ucwords(trim(preg_replace("/[^a-z0-9 ]/i","",strip_tags($_POST['move_box'])))));
  975.  
  976.                         if (($move_box != "Sent") and ($move_box != "Trash")) {
  977.                                 imap_mail_move($mbox,$move_msg,$move_box,CP_UID);
  978.                                 imap_expunge($mbox);
  979.                         }
  980.                 }
  981.  
  982.                 if (isset($_POST['new_box']) and !empty($_POST['new_box'])) {
  983.  
  984.                         $new_box = imap_utf7_encode(ucwords(trim(preg_replace("/[^a-z0-9 ]/i","",strip_tags($_POST['new_box'])))));
  985.                         imap_createmailbox($mbox,"{$host}$new_box");
  986.                 }
  987.  
  988.                 if (isset($_POST['del_box']) and !empty($_POST['del_box'])) {
  989.  
  990.                         $del_box = imap_utf7_encode(ucwords(trim(preg_replace("/[^a-z0-9 ]/i","",strip_tags($_POST['del_box'])))));
  991.                         $del_siv = $del_box;
  992.  
  993.                         if (($del_box != "INBOX") and ($del_box != "Sent") and ($del_box != "Trash")) {
  994.                                 imap_deletemailbox($mbox,"{$host}$del_box");
  995.                         }
  996.                 }
  997.  
  998.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  999.  
  1000.                 if (isset($_POST['reply_from']) and isset($_POST['reply_to']) and isset($_POST['reply_subj']) and isset($_POST['reply_body']) and !empty($_POST['reply_from']) and !empty($_POST['reply_to']) and !empty($_POST['reply_subj']) and !empty($_POST['reply_body'])) {
  1001.                
  1002.                         $reply_from = trim($_POST['reply_from']);
  1003.                         $reply_to = trim($_POST['reply_to']);
  1004.                         $reply_subj = trim($_POST['reply_subj']);
  1005.                         $reply_body = trim($_POST['reply_body']);                      
  1006.                         $reply_headers = "From: $reply_from\nX-Mailer: Kartero/1.0 (PHP/" . phpversion() . ")\n";
  1007.  
  1008.                         if (isset($_POST['reply_cc']) and !empty($_POST['reply_cc'])) {
  1009.                        
  1010.                                 $reply_cc = trim($_POST['reply_cc']);
  1011.                                
  1012.                                 $reply_headers = $reply_headers . "Cc: $reply_cc\n";
  1013.                         }
  1014.  
  1015.                         if (isset($_POST['reply_bcc']) and !empty($_POST['reply_bcc'])) {
  1016.                        
  1017.                                 $reply_bcc = trim($_POST['reply_bcc']);
  1018.                                
  1019.                                 $reply_headers = $reply_headers . "Bcc: $reply_bcc\n";
  1020.                         }
  1021.  
  1022.                         if (isset($_POST['filedrop_box']) and !empty($_POST['filedrop_box'])) {
  1023.  
  1024.                                 $do_filedrop_box = $_POST['filedrop_box'];
  1025.  
  1026.                                 if (file_exists("attach/i/$fileUsr/$do_filedrop_box") and (count(glob("attach/i/$fileUsr/$do_filedrop_box/*")) > 0)) {
  1027.  
  1028.                                         $mime_boundary = md5(microtime(true));
  1029.  
  1030.                                         $reply_headers .= "MIME-Version: 1.0\n";
  1031.                                         $reply_headers .= "Content-Type: multipart/mixed; boundary=\"{$mime_boundary}\"\n";
  1032.                                        
  1033.                                         $reply_body = "\nThis is a multi-part message in MIME format.\n\n--{$mime_boundary}\nContent-type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\n{$reply_body}";
  1034.  
  1035.                                         $do_reply_from = extract_emails_from($reply_from);
  1036.                                         $do_reply_to = extract_emails_from($reply_to);
  1037.  
  1038.                                         $do_filedrop_msg = glob("attach/i/$fileUsr/$do_filedrop_box/*");
  1039.  
  1040.                                         sort($do_filedrop_msg);
  1041.                                         reset($do_filedrop_msg);
  1042.  
  1043.                                         foreach ($do_filedrop_msg as $do_filedrop_put) {
  1044.  
  1045.                                                 $do_filedrop_nom = str_replace("attach/i/$fileUsr/$do_filedrop_box/","",$do_filedrop_put);
  1046.  
  1047.                                                 $reply_body = $reply_body . "\n\n--{$mime_boundary}\nContent-Type: application/octet-stream; name=\"$do_filedrop_nom\"\nContent-Disposition: attachment; filename=\"$do_filedrop_nom\"\nContent-Transfer-Encoding: base64\n\n" . chunk_split(base64_encode(file_get_contents($do_filedrop_put)));
  1048.                                         }
  1049.  
  1050.                                         $reply_body = $reply_body . "--{$mime_boundary}--";
  1051.  
  1052.                                         rmdirr("attach/i/$fileUsr/$do_filedrop_box");
  1053.  
  1054.                                         if (count(glob("attach/i/$fileUsr/*")) == 0) {
  1055.                                                 rmdirr("attach/i/$fileUsr");
  1056.                                         }
  1057.                                 }
  1058.                         }
  1059.  
  1060.                         if ($_POST['redirect'] == 1) {
  1061.  
  1062.                                 $redirect_date = date("D, j M Y H:i:s O (T)");
  1063.  
  1064.                                 $reply_headers = "Resent-Date: $redirect_date\nResent-To: $reply_to\n";
  1065.  
  1066.                                 if (isset($_POST['reply_cc']) and !empty($_POST['reply_cc'])) {
  1067.                        
  1068.                                         $reply_cc = trim($_POST['reply_cc']);
  1069.                                
  1070.                                         $reply_headers = $reply_headers . "Resent-Cc: $reply_cc\n";
  1071.                                 }
  1072.        
  1073.                                 if (isset($_POST['reply_bcc']) and !empty($_POST['reply_bcc'])) {
  1074.                                
  1075.                                         $reply_bcc = trim($_POST['reply_bcc']);
  1076.                                        
  1077.                                         $reply_headers = $reply_headers . "Resent-Bcc: $reply_bcc\n";
  1078.                                 }
  1079.  
  1080.                                 $reply_headers = $reply_headers . imap_fetchheader($mbox,$_POST['msg'],FT_UID|FT_PREFETCHTEXT) . "\n";
  1081.  
  1082.                                 $reply_body = imap_body($mbox,$_POST['msg'],FT_UID);
  1083.                         }
  1084.  
  1085.                         $reply_fenv = extract_emails_from($reply_from);
  1086.  
  1087.                         if ($_POST['reply_hi'] == "on") {
  1088.                                 $reply_headers = $reply_headers . "X-Priority: 1 (Highest)\nImportance: High\n";
  1089.                         }
  1090.  
  1091.                         if ($_POST['reply_rr'] == "on") {
  1092.                                 $reply_headers = $reply_headers . "X-Confirm-Reading-To: {$reply_fenv[0]}\nDisposition-Notification-To: {$reply_fenv[0]}\n";
  1093.                         }
  1094.  
  1095.                         if ($_POST['reply_dr'] == "on") {
  1096.                                 $reply_headers = $reply_headers . "Return-Receipt-To: {$reply_fenv[0]}\n";
  1097.                         }
  1098.  
  1099.                         imap_createmailbox($mbox,"{$host}Sent");
  1100.  
  1101.                         $reply_date = date ("d-M-Y H:i:s O");
  1102.                        
  1103.                         $reply_body = preg_replace("#(?<!\r)\n#si", "\n", $reply_body);
  1104.  
  1105.                         $reply_headers = preg_replace('#(?<!\r)\n#si', "\n", $reply_headers);
  1106.                         $reply_headers = str_replace("\n\n","\n",$reply_headers);
  1107.  
  1108.                         imap_append($mbox,"{$host}Sent","To: $reply_to\nSubject: $reply_subj\nDate: $reply_date\n$reply_headers\n\n$reply_body\n");
  1109.  
  1110.                         mail($reply_to, $reply_subj, $reply_body, $reply_headers, "-f {$reply_fenv[0]}");
  1111.  
  1112.                         if ($_POST['ack'] == 1) {
  1113.  
  1114.                                 imap_setflag_full($mbox, $_POST['msg'], '\\Answered',ST_UID);
  1115.                         }
  1116.                 }
  1117.  
  1118.                 if (isset($_POST['not']) and !empty($_POST['not']) and is_numeric($_POST['not'])) {
  1119.  
  1120.                         imap_clearflag_full($mbox, $_POST['msg'], '\\Seen',ST_UID);
  1121.                         imap_expunge($mbox);
  1122.                 }
  1123.  
  1124.                 if (isset($_POST['emt']) and !empty($_POST['emt']) and is_numeric($_POST['emt'])) {
  1125.  
  1126.                         imap_delete($mbox,'1:*');
  1127.                         imap_expunge($mbox);
  1128.                 }
  1129.  
  1130.                 echo "<tr><td valign=\"top\" width=\"800\"><div id=\"main\" class=\"main\">";
  1131.  
  1132.                 if (isset($_POST['get']) and !empty($_POST['get'])) {
  1133.                         include("read.php");
  1134.                 }
  1135.                 elseif (isset($_POST['rep']) and !empty($_POST['rep'])) {
  1136.                         include("send.php");
  1137.                 }
  1138.                 elseif (isset($_POST['new']) and !empty($_POST['new'])) {
  1139.                         include("post.php");
  1140.                 }
  1141.                 elseif (isset($_POST['dig']) and !empty($_POST['dig'])) {
  1142.                         include("search.php");
  1143.                 }
  1144.                 elseif (isset($_POST['addr']) and !empty($_POST['addr'])) {
  1145.  
  1146.                         echo "<title>Kartero - Contacts</title>";
  1147.  
  1148.                         echo "<div class=\"message\">";
  1149.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
  1150.  
  1151.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  1152.  
  1153.                         echo "<tr>";
  1154.                         echo "<td class=\"label\"><img src=\"images/mail-contacts.png\" border=\"0\" width=\"32\" height=\"32\" onclick=\"document.getElementById('list').className ='';document.getElementById('add').className='hide'\"></td>";
  1155.                         echo "<td class=\"label\"><img src=\"images/mail-contacts.png\" border=\"0\" width=\"32\" height=\"32\" onclick=\"document.getElementById('list').className ='hide';document.getElementById('add').className=''\"></td>";
  1156. echo "</tr>";
  1157.  
  1158.                         echo "<tr><td class=\"label\">list</td><td class=\"label\">add</td></tr>";
  1159.  
  1160.                         echo "</table>";
  1161.  
  1162.                         echo "</td></tr></table>";
  1163.                         echo "</div>";
  1164.  
  1165.                         $addr_query = mysql_query("select * from contacts where id='{$_SESSION['logged_uid']}' order by lname, fname, email;");
  1166.  
  1167.                         if (($_POST['addr'] == "add") or (mysql_num_rows($addr_query) < 1)) {
  1168.                                 echo "<div id=\"add\">";
  1169.                         }
  1170.                         else {
  1171.                                 echo "<div id=\"add\" class=\"hide\">";
  1172.                         }
  1173.  
  1174.                         echo "<div class=\"spacer\"></div>";
  1175.                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\" width=\400\">";
  1176.                         echo "<form method=\"post\" enctype=\"multipart/form-data\">";
  1177.                         echo "<input type=\"hidden\" name=\"addr\" value=\"add\">";
  1178.                
  1179.                         echo "<tr><td><input class=\"input\" type=\"text\" name=\"a_email\" maxlength=\"255\" autocomplete=\"off\" required autofocus></td><td>email address</td></tr>";
  1180.                         echo "<tr><td><input class=\"input\" type=\"text\" name=\"a_fname\" maxlength=\"64\" autocomplete=\"off\" required></td><td>first name</td></tr>";
  1181.                         echo "<tr><td><input class=\"input\" type=\"text\" name=\"a_lname\" maxlength=\"64\" autocomplete=\"off\" required></td><td>last name</td></tr>";
  1182.                         echo "<tr><td><input type=\"file\" name=\"a_photo\"></td><td>optional photo</td></tr>";
  1183.                         echo "<tr><td><input class=\"button\" type=\"submit\" value=\"add contact\"></td><td></td></tr>";
  1184.  
  1185.                         echo "</form>";
  1186.                         echo "</table>";
  1187.                         echo "</div>";
  1188.  
  1189.                         if ($_POST['addr'] == "list") {
  1190.                                 echo "<div id=\"list\">";
  1191.                         }
  1192.                         else {
  1193.                                 echo "<div id=\"list\" class=\"hide\">";
  1194.                         }
  1195.  
  1196.                         if (mysql_num_rows($addr_query) > 0) {
  1197.  
  1198.                                 echo "<div class=\"spacer\"></div>";
  1199.                                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  1200.  
  1201.                                 while ($addr_row = mysql_fetch_array($addr_query)) {
  1202.                        
  1203.                                         if ($bgColor == "#ffffff") {
  1204.                                                 $bgColor = "#fdfdfd";
  1205.                                         }
  1206.                                         else {
  1207.                                                 $bgColor = "#ffffff";
  1208.                                         }
  1209.  
  1210.                                         echo "<form method=\"post\">";
  1211.                                         echo "<input type=\"hidden\" name=\"addr\" value=\"list\">";
  1212.                                         echo "<input type=\"hidden\" name=\"a_del\" value=\"{$addr_row[email]}\">";
  1213.                                         echo "<tr bgcolor=\"$bgColor\">";
  1214.                                         echo "<td valign=\"bottom\" width=\"24\"><input type=\"image\" src=\"images/sieve-del.png\"></td>";
  1215.                                         echo "<td>{$addr_row[fname]} {$addr_row[lname]}</td><td>{$addr_row[email]}</td>";
  1216.                                         echo "</tr>";
  1217.                                         echo "</form>";
  1218.                                 }
  1219.  
  1220.                                 echo "</table>";
  1221.                                 echo "</div>";
  1222.  
  1223.                                 unset($bgColor);
  1224.                         }
  1225.                 }
  1226.                 elseif (isset($_POST['set']) and !empty($_POST['set'])) {
  1227.  
  1228.                         echo "<script type=\"text/javascript\" src=\"core.js\" async></script>";
  1229.                        
  1230.                         echo "<style> @-webkit-keyframes strength { 0% { width: 0; height: 11px; } } @-moz-keyframes strength { 0% { width: 0; height: 11px; } } #mtr { width: 0; height: 11px; padding: 0; margin: 0; -webkit-animation-name: strength; -moz-animation-name: strength; -webkit-animation-duration: 1s; -moz-animation-duration: 1s; -webkit-animation-iteration-count: 1; -moz-animation-iteration-count: 1; -webkit-animation-timing-function: ease; -moz-animation-timing-function: ease; } </style>";
  1231.  
  1232.                         echo "<title>Kartero - Settings</title>";
  1233.  
  1234.                         echo "<div class=\"message\">";
  1235.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
  1236.  
  1237.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
  1238.  
  1239.                         echo "<tr>";
  1240.                         echo "<td class=\"label\"><img src=\"images/mail-settings.png\" border=\"0\" width=\"32\" height=\"32\" onclick=\"document.getElementById('account').className ='';document.getElementById('folders').className='hide';document.getElementById('filters').className='hide'\"></td>";
  1241.                         echo "<td class=\"label\"><img src=\"images/mail-settings.png\" border=\"0\" width=\"32\" height=\"32\" onclick=\"document.getElementById('account').className ='hide';document.getElementById('folders').className='';document.getElementById('filters').className='hide'\"></td>";
  1242.                         echo "<td class=\"label\"><img src=\"images/mail-settings.png\" border=\"0\" width=\"32\" height=\"32\" onclick=\"document.getElementById('account').className ='hide';document.getElementById('folders').className='hide';document.getElementById('filters').className=''\"></td>";
  1243. echo "</tr>";
  1244.  
  1245.                         echo "<tr><td class=\"label\">account</td><td class=\"label\">folders</td><td class=\"label\">filters</td></tr>";
  1246.  
  1247.                         echo "</table>";
  1248.                        
  1249.                         echo "</td></tr></table>";
  1250.                         echo "</div>";
  1251.  
  1252.                         if ($_POST['set'] == "account") {
  1253.                                 echo "<div id=\"account\">";
  1254.                         }
  1255.                         else {
  1256.                                 echo "<div id=\"account\" class=\"hide\">";
  1257.                         }
  1258.  
  1259.                         echo "<div class=\"spacer\"></div>";
  1260.                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\">";
  1261.                         echo "<form method=\"post\">";
  1262.                         echo "<input type=\"hidden\" name=\"set\" value=\"account\">";
  1263.                         echo "<tr bgcolor=\"#ffffff\"><td width=\"400\"><input class=\"input\" type=\"text\" name=\"usr_name\" value=\"$usr_name\" autocomplete=\"off\" maxlength=\"128\" required autofocus></td><td>name</td></tr>";
  1264.                         echo "<tr bgcolor=\"#ffffff\"><td><input class=\"input\" type=\"password\" name=\"usr_pw1\" autocomplete=\"off\" maxlength=\"64\"></td><td><nobr>current password</nobr></td></tr>";
  1265.  
  1266.                         echo "<tr bgcolor=\"#ffffff\"><td><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\"><tr bgcolor=\"#ffffff\"><td height=\"17\"><div id=\"mtr\" style=\"display: none;\"></div></td></tr></table></td><td id=\"ctd\"></td></tr>";
  1267.  
  1268.                         echo "<tr bgcolor=\"#ffffff\"><td><input class=\"input\" type=\"password\" name=\"usr_pw2\" autocomplete=\"off\" maxlength=\"64\" onkeyup=\"eval(this.value)\" id=\"usr_pw2\"></td><td id=\"pmc1\"><nobr>new password";
  1269.  
  1270.                         if (isset($_POST['usr_pw1']) and !empty($_POST['usr_pw1']) and isset($_POST['usr_pw2']) and (strlen($_POST['usr_pw2']) < 8)) {
  1271.                                 echo " <font color=\"red\">too short</font>";
  1272.                         }
  1273.  
  1274.                         echo "</nobr></td></tr>";
  1275.  
  1276.                         echo "<tr bgcolor=\"#ffffff\"><td><input class=\"input\" type=\"password\" name=\"usr_pw3\" autocomplete=\"off\" maxlength=\"64\" onkeyup=\"same(this.value)\" id=\"usr_pw3\"></td><td id=\"pmc2\"><nobr>new password";
  1277.  
  1278.                         if (isset($_POST['usr_pw1']) and !empty($_POST['usr_pw1']) and isset($_POST['usr_pw3']) and (strlen($_POST['usr_pw3']) < 8)) {
  1279.                                 echo " <font color=\"red\">too short</font>";
  1280.                         }
  1281.  
  1282.                         echo "</nobr></td></tr>";
  1283.  
  1284.                         echo "<tr bgcolor=\"#ffffff\"><td><input class=\"button\" type=\"submit\" value=\"update\"></td><td></td></tr>";
  1285.                         echo "</form></table>";
  1286.                         echo "</div>";
  1287.  
  1288.                         if ($_POST['set'] == "folders") {
  1289.                                 echo "<div id=\"folders\">";
  1290.                         }
  1291.                         else {
  1292.                                 echo "<div id=\"folders\" class=\"hide\">";
  1293.                         }
  1294.  
  1295.                         echo "<div class=\"spacer\"></div>";
  1296.                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\">";
  1297.                         echo "<form method=\"post\">";
  1298.                         echo "<input type=\"hidden\" name=\"set\" value=\"folders\">";
  1299.                         echo "<tr bgcolor=\"#ffffff\"><td width=\"200\"><input class=\"input\" type=\"text\" name=\"new_box\" autocomplete=\"off\" maxlength=\"200\" required autofocus></td>";
  1300.                         echo "<td width=\"197\"><input class=\"button\" type=\"submit\" value=\"create folder\"></td><td></td></tr>";
  1301.                         echo "</form>";
  1302.  
  1303.                         $usr_box = imap_list($mbox,$host,"*");
  1304.                         $usr_box = array_diff($usr_box,array("{$host}INBOX","{$host}Sent","{$host}Trash"));
  1305.  
  1306.                         if (count($usr_box) > 0) {
  1307.  
  1308.                                 sort($usr_box);
  1309.  
  1310.                                 echo "<form method=\"post\">";
  1311.                                 echo "<input type=\"hidden\" name=\"set\" value=\"folders\">";
  1312.                                 echo "<tr bgcolor=\"#ffffff\"><td width=\"200\"><select class=\"input\" name=\"del_box\">";
  1313.  
  1314.                                 foreach ($usr_box as $del_box) {
  1315.        
  1316.                                         $del_box = imap_utf7_decode(str_replace($host,"",$del_box));
  1317.                                        
  1318.                                         echo "<option value=\"$del_box\">$del_box</option>";
  1319.                                 }              
  1320.                
  1321.                                 echo "</select></td><td width=\"197\"><input class=\"button\" type=\"submit\" value=\"delete folder\" onclick=\"if (confirm('Delete folder and all messages in it?')) {return true;} else {return false;}\"></td><td></td></tr>";
  1322.                                 echo "</form>";
  1323.                         }
  1324.  
  1325.                         echo "</table>";
  1326.                         echo "</div>";
  1327.  
  1328.                         if (isset($mail_home) and !empty($mail_home)) {
  1329.  
  1330.                                 $sivU = explode("@",$_SESSION['logged_uid']);
  1331.                                 $sivN = $sivU[0];
  1332.                                 $sivD = $sivU[1];
  1333.                                 $sivP = "$mail_home/$sivD/{$sivN[0]}/$sivN";
  1334.                                 $sivR = glob("$sivP/*.sieve",GLOB_NOSORT);
  1335.  
  1336.                                 if ($del_siv) {
  1337.                        
  1338.                                         foreach ($sivR as $sivI) {
  1339.                        
  1340.                                                 if (stripos(file_get_contents($sivI),"fileinto \"$del_siv\";")) {
  1341.                                                         unlink($sivI);
  1342.                                                 }
  1343.                                         }
  1344.                                 }
  1345.  
  1346.                                 if (isset($_POST['sieveT']) and !empty($_POST['sieveT']) and isset($_POST['sieveV']) and !empty($_POST['sieveV']) and isset($_POST['sieveF']) and !empty($_POST['sieveF'])) {
  1347.  
  1348.                                         $sieveT = strtolower(trim(strip_tags($_POST['sieveT'])));
  1349.                                         $sieveV = trim($_POST['sieveV']);
  1350.                                         $sieveF = imap_utf7_encode(trim(strip_tags($_POST['sieveF'])));
  1351.  
  1352.                                         if ($sieveT == "subject") {
  1353.                                                 $sieveV = strip_tags($sieveV);
  1354.                                         }
  1355.  
  1356.                                         if ($sieveV != "") {
  1357.  
  1358.                                                 if ($sieveT == "body") {
  1359.                                                         $sieveW = "require [\"fileinto\", \"body\"]; if body :contains \"$sieveV\" { fileinto \"$sieveF\"; }";
  1360.                                                 }
  1361.                                                 else {
  1362.                                                         $sieveW = "require \"fileinto\"; if header :contains \"$sieveT\" \"$sieveV\" { fileinto \"$sieveF\"; }";
  1363.                                                 }
  1364.                                         }
  1365.  
  1366.                                         if ($sieveW != ""){
  1367.  
  1368.                                                 if (count($sivR) > 0) {
  1369.                                        
  1370.                                                         foreach ($sivR as $sieveR) {
  1371.  
  1372.                                                                 if (strtolower(trim(file_get_contents($sieveR))) != strtolower($sieveW)) {
  1373.                                                                         continue;
  1374.                                                                 }
  1375.                                                        
  1376.                                                                 unlink($sieveR);
  1377.                                                         }
  1378.                                                 }
  1379.  
  1380.                                                 $sieveP = "$sivP/" . date("YmdHis") . ".sieve";
  1381.  
  1382.                                                 if (!file_exists($sivP)) {
  1383.                                                         mkdir($sivP,0700,true);
  1384.                                                 }
  1385.  
  1386.                                                 $fp = fopen($sieveP,"w");
  1387.                                                 fwrite($fp,$sieveW);
  1388.                                                 fclose($fp);
  1389.  
  1390.                                                 $sieveC = "$sieveT \"$sieveV\"";
  1391.  
  1392.                                                 $sieveO = (imap_search($mbox,$sieveC,SE_UID));
  1393.  
  1394.                                                 foreach ($sieveO as $sivO) {
  1395.                                                         imap_mail_move($mbox,$sivO,$sieveF,CP_UID);
  1396.                                                         imap_expunge($mbox);
  1397.                                                 }
  1398.                                         }
  1399.                                 }
  1400.  
  1401.                                 if (isset($_POST['sieve']) and !empty($_POST['sieve'])) {
  1402.  
  1403.                                         $sieve = strtolower(trim(strip_tags($_POST['sieve'])));
  1404.  
  1405.                                         if (isset($_POST['sivM']) and !empty($_POST['sivM'])) {
  1406.  
  1407.                                                 $sivM = trim(strip_tags($_POST['sivM']));
  1408.  
  1409.                                                 if (file_exists("$sivP/$sivM") and ($_POST['set'] == "sivM")) {
  1410.  
  1411.                                                         $sivMs = file_get_contents("$sivP/$sieve");
  1412.                                                         $sivMt = file_get_contents("$sivP/$sivM");
  1413.  
  1414.                                                         $fp = fopen("$sivP/$sieve","w");
  1415.                                                         fwrite($fp,$sivMt);
  1416.                                                         fclose($fp);
  1417.  
  1418.                                                         $fp = fopen("$sivP/$sivM","w");
  1419.                                                         fwrite($fp,$sivMs);
  1420.                                                         fclose($fp);
  1421.                                                 }
  1422.                                         }
  1423.  
  1424.                                         if (file_exists("$sivP/$sieve") and ($_POST['set'] == "sivD")) {
  1425.                                                 unlink("$sivP/$sieve");
  1426.                                         }
  1427.                                 }
  1428.  
  1429.                                 if (($_POST['set'] == "filters") or ($_POST['set'] == "sivD") or ($_POST['set'] == "sivM")) {
  1430.                                         echo "<div id=\"filters\">";
  1431.                                 }
  1432.                                 else {
  1433.                                         echo "<div id=\"filters\" class=\"hide\">";
  1434.                                 }
  1435.  
  1436.                                 echo "<div class=\"spacer\"></div>";
  1437.                                 echo "<div class=\"message\" style=\"padding: 0;\">";
  1438.                                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\" width=\"100%\">";
  1439.                                 echo "<form method=\"post\"><input type=\"hidden\" name=\"set\" value=\"filters\"><tr>";
  1440.                                 echo "<td width=\"200\"><select class=\"input\" name=\"sieveT\">";
  1441.                                 echo "<option value=\"subject\">If message subject contains</option>";
  1442.                                 echo "<option value=\"from\">If message from contains</option>";
  1443.                                 echo "<option value=\"to\">If message to contains</option>";
  1444.                                 echo "<option value=\"cc\">If message cc contains</option>";
  1445.                                 echo "<option value=\"body\">If message body contains</option>";
  1446.                                 echo "</td>";
  1447.                                 echo "<td><input class=\"input\" type=\"text\" name=\"sieveV\" autocomplete=\"off\" required></td>";
  1448.                                 echo "<td><select class=\"input\" name=\"sieveF\"><option value=\"Trash\" selected>then move to Trash</option>";
  1449.  
  1450.                                 foreach ($usr_box as $sieveF) {
  1451.  
  1452.                                         $sieveF = str_replace($host,"",$sieveF);
  1453.  
  1454.                                         echo "<option value=\"$sieveF\">then move to $sieveF</option>";
  1455.                                 }
  1456.  
  1457.                                 echo "</select></td>";
  1458.                                 echo "<td><input class=\"button\" type=\"submit\" value=\"add filter\"></td>";
  1459.                                 echo "</tr></form>";
  1460.                                 echo "</table>";
  1461.                                 echo "</div>";
  1462.                                 echo "<div class=\"spacer\"></div>";
  1463.  
  1464.                                 $sivR = glob("$sivP/*.sieve");
  1465.  
  1466.                                 if (count($sivR) > 0) {
  1467.  
  1468.                                         $sivW = 'require "include";';
  1469.        
  1470.                                         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  1471.  
  1472.                                         foreach ($sivR as $sivK => $sivS) {
  1473.  
  1474.                                                 if ($bgColor == "#ffffff") {
  1475.                                                         $bgColor = "#fdfdfd";
  1476.                                                 }
  1477.                                                 else {
  1478.                                                         $bgColor = "#ffffff";
  1479.                                                 }
  1480.  
  1481.                                                 if ($sivK > 0) {
  1482.  
  1483.                                                         $sivKp = $sivK - 1;
  1484.  
  1485.                                                         if (array_key_exists($sivKp,$sivR)) {
  1486.                                                                 $sivKp = basename($sivR[$sivKp]);
  1487.                                                         }
  1488.                                                         else {
  1489.                                                                 unset($sivKp);
  1490.                                                         }
  1491.                                                 }
  1492.  
  1493.                                                 if ($sivK < count($sivR)) {
  1494.  
  1495.                                                         $sivKn = $sivK + 1;
  1496.  
  1497.                                                         if (array_key_exists($sivKn,$sivR)) {
  1498.                                                                 $sivKn = basename($sivR[$sivKn]);
  1499.                                                         }
  1500.                                                         else {
  1501.                                                                 unset($sivKn);
  1502.                                                         }
  1503.                                                 }
  1504.  
  1505.                                                 $sivC = (explode('"',file_get_contents($sivS)));
  1506.                                                 $sivF = basename($sivS);
  1507.  
  1508.                                                 $sivW = $sivW . "\r\ninclude \"" . str_replace(".sieve","",$sivF) . '";';
  1509.  
  1510.                                                 echo "<form method=\"post\">";
  1511.                                                 echo "<input type=\"hidden\" name=\"set\" value=\"sivD\">";
  1512.                                                 echo "<input type=\"hidden\" name=\"sieve\" value=\"$sivF\">";
  1513.                                                 echo "<tr bgcolor=\"$bgColor\">";
  1514.                                                 echo "<td valign=\"bottom\" width=\"24\"><input type=\"image\" src=\"images/sieve-del.png\"></td>";
  1515.                                                 echo "</form>";
  1516.  
  1517.                                                 if ($sivKp) {
  1518.                                                         echo "<form method=\"post\">";
  1519.                                                         echo "<input type=\"hidden\" name=\"set\" value=\"sivM\">";
  1520.                                                         echo "<input type=\"hidden\" name=\"sieve\" value=\"$sivF\">";
  1521.                                                         echo "<input type=\"hidden\" name=\"sivM\" value=\"$sivKp\">";
  1522.                                                         echo "<td valign=\"bottom\" width=\"24\"><input type=\"image\" src=\"images/sieve-up.png\"></td>";
  1523.                                                         echo "</form>";
  1524.                                                 }
  1525.                                                 else {
  1526.                                                         if (count($sivR) > 1) {
  1527.                                                                 echo "<td></td>";
  1528.                                                         }
  1529.                                                 }
  1530.  
  1531.                                                 if ($sivKn) {
  1532.                                                         echo "<form method=\"post\">";
  1533.                                                         echo "<input type=\"hidden\" name=\"set\" value=\"sivM\">";
  1534.                                                         echo "<input type=\"hidden\" name=\"sieve\" value=\"$sivF\">";
  1535.                                                         echo "<input type=\"hidden\" name=\"sivM\" value=\"$sivKn\">";
  1536.                                                         echo "<td valign=\"bottom\" width=\"24\"><input type=\"image\" src=\"images/sieve-down.png\"></td>";
  1537.                                                         echo "</form>";
  1538.                                                 }
  1539.                                                 else {
  1540.                                                         if (count($sivR) > 1) {
  1541.                                                                 echo "<td></td>";
  1542.                                                         }
  1543.                                                 }
  1544.                                                 echo "<td>If message {$sivC[3]} contains {$sivC[5]} then move to {$sivC[7]}</td>";
  1545.                                                 echo "</tr>";
  1546.                                         }
  1547.                        
  1548.                                         echo "</table>";
  1549.                                         echo "</div>";
  1550.  
  1551.                                         if ($sivW != file_get_contents("$sivP/.dovecot.sieve")) {
  1552.  
  1553.                                                 $fp = fopen("$sivP/.dovecot.sieve","w");
  1554.                                                 fwrite($fp,$sivW);
  1555.                                                 fclose($fp);
  1556.                                         }
  1557.                                 }
  1558.                                 else {
  1559.                                         if (file_exists("$sivP/.dovecot.sieve")) {
  1560.                                                         unlink("$sivP/.dovecot.sieve");
  1561.                                         }
  1562.  
  1563.                                         if (file_exists("$sivP/.dovecot.svbin")) {
  1564.                                                         unlink("$sivP/.dovecot.svbin");
  1565.                                         }
  1566.                                 }
  1567.                         }
  1568.                 }
  1569.                 else {
  1570.                         // imap_ping() should be doing this, but it's not working:
  1571.                         $mbox = @imap_open("{$host}$folder", $_SESSION['logged_uid'], $_SESSION['logged_key'], CL_EXPUNGE) or die(imap_last_error());
  1572.  
  1573.                         include("inbox.php");
  1574.  
  1575. //echo "<script type=\"text/javascript\" src=\"jquery-1.3.2.min.js\"></script>";
  1576.  
  1577. //echo "<script type=\"text/javascript\"> $(document).ready(function() { setInterval(function() { $('#main').fadeOut(\"fast\").load('inbox.php').fadeIn(\"slow\"); }, 5000); }); </script>";
  1578.                 }
  1579.  
  1580.                 echo "</div></td>";
  1581.  
  1582.                 echo "<td width=\"10\"></td>";
  1583.  
  1584.                 echo "<td valign=\"top\" width=\"100\">";
  1585.  
  1586.                 // imap_ping() should be doing this, but it's not working:
  1587.                 $mbox = @imap_open("{$host}$folder", $_SESSION['logged_uid'], $_SESSION['logged_key'], CL_EXPUNGE) or die(imap_last_error());
  1588.  
  1589.                 include("folders.php");
  1590.                 echo "</td>";
  1591.  
  1592.                 echo "</tr></table>";
  1593.         }
  1594.  
  1595.         if ($_SESSION['logged_lvl'] == "postmaster") {
  1596.  
  1597.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  1598.                 echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"4\" align=\"center\">status</td><td align=\"center\">username</td><td align=\"center\">complete name</td><td align=\"center\">password</td><td align=\"center\">quota</td><td align=\"center\" colspan=\"2\">action</td></tr>";
  1599.                 echo "<form method=\"post\">";
  1600.                 echo "<tr bgcolor=\"#ffffff\"><td align=\"center\">new</td><td align=\"center\">cur</td><td align=\"center\">aka</td><td align=\"center\">rcv</td><td><input class=\"input\" type=\"text\" name=\"pm_id\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"pm_name\" autocomplete=\"off\" maxlength=\"128\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pw\" autocomplete=\"off\" maxlength=\"64\"></td><td width=\"64\"><input class=\"input\" type=\"text\" name=\"pm_quota\" autocomplete=\"off\" maxlength=\"16\" style=\"text-align: right;\"></td><td colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
  1601.                 echo "</form>";
  1602.        
  1603.                 $pm_get = mysql_query("select * from users where domain='{$_SESSION['logged_uid']}' order by id");
  1604.        
  1605.                 while ($pm_row = mysql_fetch_array($pm_get)) {
  1606.        
  1607.                         if ($pm_row[5] == "1") {
  1608.                                 $pm_do = "disable";
  1609.                                 $pm_bg = "#ffffff";
  1610.                         }
  1611.        
  1612.                         if ($pm_row[5] == "0") {
  1613.                                 $pm_do = "enable";
  1614.                                 $pm_bg = "#eeeeee";
  1615.                         }
  1616.        
  1617.                         $msg_new = "$mail_root/{$_SESSION['logged_uid']}/" . substr($pm_row[0],0,1) . "/" . substr($pm_row[0],0,strpos($pm_row[0],"@")) . "/new/*";
  1618.                         $msg_new = count(glob($msg_new));
  1619.        
  1620.                         $msg_cur = "$mail_root/{$_SESSION['logged_uid']}/" . substr($pm_row[0],0,1) . "/" . substr($pm_row[0],0,strpos($pm_row[0],"@")) . "/cur/*";
  1621.                         $msg_cur = count(glob($msg_cur));
  1622.        
  1623.                         $pm_aka = mysql_query("select * from aliases where alias='{$pm_row[0]}'");
  1624.                         $pm_aka = mysql_num_rows($pm_aka);
  1625.        
  1626.                         echo "<tr bgcolor=\"$pm_bg\"><td align=\"right\">$msg_new</td><td align=\"right\">$msg_cur</td><td align=\"right\">$pm_aka</td><form method=\"post\"><input type=\"hidden\" name=\"pm_set\" value=\"{$pm_row[0]}\"><input type=\"hidden\" name=\"pm_do\" value=\"$pm_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$pm_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_mod\" value=\"{$pm_row[0]}\"><td>{$pm_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"pm_name\" maxlength=\"128\" autocomplete=\"off\" value=\"{$pm_row[3]}\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"input\" type=\"text\" name=\"pm_quota\" maxlength=\"16\" autocomplete=\"off\" value=\"{$pm_row[6]}\" style=\"text-align: right;\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_del\" value=\"{$pm_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$pm_row[0]} plus all messages and aliases associated with this account?')) {return true;} else {return false;}\"></td></form></tr>";
  1627.                 }
  1628.        
  1629.                 echo "</table>";
  1630.         }
  1631.  
  1632.         if ($_SESSION['logged_lvl'] == "administrator") {
  1633.        
  1634.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  1635.                 echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"2\" align=\"center\">status</td><td align=\"center\"><nobr>domain name</nobr></td><td align=\"center\"><nobr>account limit</nobr></td><td align=\"center\"><nobr>postmaster password</nobr></td><td align=\"center\" colspan=\"2\">action</td></tr>";
  1636.                 echo "<form method=\"post\"><tr bgcolor=\"#ffffff\"><td align=\"center\">usr</td><td align=\"center\">rcv</td><td align=\"center\"><input class=\"input\" type=\"text\" name=\"dom_name\" maxlength=\"128\" autocomplete=\"off\"></td><td align=\"center\"><input class=\"input\" style=\"text-align: right;\" type=\"text\" name=\"dom_max\" maxlength=\"6\" autocomplete=\"off\" value=\"0\"></td><td align=\"center\"><input class=\"input\" type=\"text\" name=\"dom_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td align=\"center\" colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr></form>";
  1637.        
  1638.                 $dom_get = mysql_query("select * from domains order by id");
  1639.        
  1640.                 while ($dom_row = mysql_fetch_array($dom_get)) {
  1641.  
  1642.                         $dom_usr = mysql_query("select * from users where domain='{$dom_row[0]}'");
  1643.                         $dom_usr = mysql_num_rows($dom_usr);
  1644.        
  1645.                         if ($dom_row[3] == "1") {
  1646.                                 $dom_do = "disable";
  1647.                                 $dom_bg = "#ffffff";
  1648.                         }
  1649.        
  1650.                         if ($dom_row[3] == "0") {
  1651.                                 $dom_do = "enable";
  1652.                                 $dom_bg = "#eeeeee";
  1653.                         }
  1654.        
  1655.                         echo "<tr bgcolor=\"$dom_bg\"><td align=\"right\">$dom_usr</td><form method=\"post\"><input type=\"hidden\" name=\"dom_set\" value=\"{$dom_row[0]}\"><input type=\"hidden\" name=\"dom_do\" value=\"$dom_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$dom_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"dom_mod\" value=\"{$dom_row[0]}\"><td>{$dom_row[0]}</td><td><input class=\"input\" style=\"text-align: right;\" type=\"text\" name=\"dom_max\" maxlength=\"6\" autocomplete=\"off\" value=\"{$dom_row[2]}\"></td><td><input class=\"input\" type=\"text\" name=\"dom_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"dom_del\" value=\"{$dom_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$dom_row[0]} plus all accounts and messages associated with this domain?')) {return true;} else {return false;}\"></td></form></tr>";
  1656.                 }
  1657.        
  1658.                 echo "</table>";
  1659.         }
  1660.        
  1661.         echo "</td>";
  1662.  
  1663.         if ($_SESSION['logged_lvl'] == "postmaster") {
  1664.        
  1665.                 echo "<td width=\"10\"></td><td valign=\"top\">";
  1666.  
  1667.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
  1668.                 echo "<tr bgcolor=\"#eeeeee\"><td align=\"center\">alias</td><td align=\"center\">recipient</td><td align=\"center\" colspan=\"3\">action</td></tr>";
  1669.                 echo "<form method=\"post\">";
  1670.                 echo "<tr bgcolor=\"#ffffff\"><td><input class=\"input\" type=\"text\" name=\"alias_add\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"alias_to\" autocomplete=\"off\" maxlength=\"128\"></td><td colspan=\"3\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
  1671.                 echo "</form>";
  1672.        
  1673.                 $get_aliases = mysql_query("select * from aliases where domain='{$_SESSION['logged_uid']}' order by id, alias");
  1674.        
  1675.                 while ($aliases_row = mysql_fetch_array($get_aliases)) {
  1676.        
  1677.                         if ($aliases_row[3] == "1") {
  1678.                                 $alias_do = "disable";
  1679.                                 $alias_bg = "#ffffff";
  1680.                         }
  1681.        
  1682.                         if ($aliases_row[3] == "0") {
  1683.                                 $alias_do = "enable";
  1684.                                 $alias_bg = "#eeeeee";
  1685.                         }
  1686.        
  1687.                         echo "<tr bgcolor=\"$alias_bg\"><form method=\"post\"><input type=\"hidden\" name=\"alias_mod\" value=\"{$aliases_row[0]}\"><input type=\"hidden\" name=\"alias_old\" value=\"{$aliases_row[1]}\"><td>{$aliases_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"alias_to\" maxlength=\"255\" autocomplete=\"off\" value=\"{$aliases_row[1]}\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"alias_set\" value=\"{$aliases_row[0]}\"><input type=\"hidden\" name=\"alias_do\" value=\"$alias_do\"><input type=\"hidden\" name=\"alias_usr\" value=\"{$aliases_row[1]}\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$alias_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"alias_del\" value=\"{$aliases_row[0]}\"><input type=\"hidden\" name=\"alias_usr\" value=\"{$aliases_row[1]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete the {$aliases_row[0]} alias of {$aliases_row[1]}?')) {return true;} else {return false;}\"></td></form></tr>";
  1688.                 }
  1689.        
  1690.                 echo "</table>";
  1691.         }
  1692.  
  1693.         echo "</td></tr>";
  1694.         echo "</table>";
  1695. }
  1696.  
  1697. mysql_close($db_link);
  1698.  
  1699. ?>
  1700.  
filedropkartero.git-41992ae.tar.bz2 new
412.12 KB
262 downloads
filedropkartero.git-41992ae.zip
448.41 KB
237 downloads
filedropkartero.git-b404ba2.tar.bz2
411.70 KB
248 downloads
filedropkartero.git-b404ba2.zip
447.96 KB
229 downloads
filedropkartero.git-a7684d9.tar.bz2
411.72 KB
234 downloads
filedropkartero.git-a7684d9.zip
447.96 KB
271 downloads
filedropkartero.git-83512be.tar.bz2
410.26 KB
226 downloads
filedropkartero.git-83512be.zip
445.30 KB
200 downloads
filedropkartero.git-1954b25.tar.bz2
410.21 KB
219 downloads
filedropkartero.git-1954b25.zip
445.30 KB
195 downloads
filedropkartero.git-2f7c910.tar.bz2
410.25 KB
209 downloads
filedropkartero.git-2f7c910.zip
445.29 KB
182 downloads
filedropkartero.git-6317ffb.tar.bz2
410.40 KB
194 downloads
filedropkartero.git-6317ffb.zip
445.28 KB
164 downloads
filedropkartero.git-60ccd7a.tar.bz2
410.40 KB
182 downloads
filedropkartero.git-60ccd7a.zip
445.20 KB
160 downloads
filedropkartero.git-ea6f885.tar.bz2
410.47 KB
169 downloads
filedropkartero.git-ea6f885.zip
445.26 KB
142 downloads
filedropkartero.git-7f580e5.zip
445.17 KB
132 downloads
filedropkartero.git-7f580e5.tar.bz2
410.18 KB
140 downloads
filedropkartero.git-b9364de.tar.bz2
409.41 KB
130 downloads
filedropkartero.git-b9364de.zip
444.09 KB
391 downloads
filedropkartero.git-e9bcd78.zip
444.03 KB
371 downloads
filedropkartero.git-e9bcd78.tar.bz2
409.39 KB
396 downloads
filedropkartero.git-96c60ff.tar.bz2
407.96 KB
388 downloads
filedropkartero.git-96c60ff.zip
441.87 KB
343 downloads
filedropkartero.git-4357b59.tar.bz2
407.17 KB
386 downloads
filedropkartero.git-4357b59.zip
440.69 KB
346 downloads
filedropkartero.git-c6ff319.tar.bz2
407.28 KB
384 downloads
filedropkartero.git-c6ff319.zip
440.70 KB
327 downloads
filedropkartero.git-8b87a29.tar.bz2
407.27 KB
364 downloads
filedropkartero.git-8b87a29.zip
440.71 KB
326 downloads
filedropkartero.git-ee42942.tar.bz2
406.49 KB
324 downloads
filedropkartero.git-ee42942.zip
439.92 KB
304 downloads
filedropkartero.git-867e7e6.tar.bz2
406.75 KB
346 downloads
filedropkartero.git-867e7e6.zip
440.03 KB
307 downloads
filedropkartero.git-3f3fc02.tar.bz2
406.38 KB
343 downloads
filedropkartero.git-3f3fc02.zip
439.71 KB
333 downloads
filedropkartero.git-b6f779d.tar.bz2
406.55 KB
363 downloads
filedropkartero.git-b6f779d.zip
440.00 KB
292 downloads
filedropkartero.git-83f24b0.zip
439.12 KB
274 downloads
filedropkartero.git-52316ec.tar.bz2
406.17 KB
319 downloads
filedropkartero.git-52316ec.zip
439.18 KB
297 downloads
filedropkartero.git-83f24b0.tar.bz2
405.84 KB
313 downloads
filedropkartero.git-8a42d47.tar.bz2
405.73 KB
292 downloads
filedropkartero.git-8a42d47.zip
439.02 KB
270 downloads
filedropkartero.git-830c9cb.tar.bz2
406.08 KB
295 downloads
filedropkartero.git-830c9cb.zip
439.08 KB
269 downloads
filedropkartero.git-ebec1be.tar.bz2
406.16 KB
298 downloads
filedropkartero.git-ebec1be.zip
439.09 KB
297 downloads
filedropkartero.git-7c0b70f.tar.bz2
402.43 KB
284 downloads
filedropkartero.git-7c0b70f.zip
435.91 KB
262 downloads
filedropkartero.git-80edc03.tar.bz2
402.75 KB
297 downloads
filedropkartero.git-80edc03.zip
435.84 KB
273 downloads
filedropkartero.git-b408c23.tar.bz2
402.19 KB
288 downloads
filedropkartero.git-b408c23.zip
435.59 KB
277 downloads
filedropkartero.git-29c0e1f.tar.bz2
401.84 KB
292 downloads
filedropkartero.git-29c0e1f.zip
435.25 KB
289 downloads
filedropkartero.git-9086094.tar.bz2
401.94 KB
292 downloads
filedropkartero.git-9086094.zip
435.34 KB
289 downloads
filedropkartero.git-47ca624.tar.bz2
402.10 KB
291 downloads
filedropkartero.git-47ca624.zip
435.51 KB
257 downloads
filedropkartero.git-81314a5.zip
435.53 KB
277 downloads
filedropkartero.git-81314a5.tar.bz2
402.25 KB
285 downloads
filedropkartero.git-cae7074.zip
435.20 KB
273 downloads
filedropkartero.git-cae7074.tar.bz2
401.98 KB
302 downloads
filedropkartero.git-cc68e56.tar.bz2
402.07 KB
285 downloads
filedropkartero.git-cc68e56.zip
435.16 KB
303 downloads
filedropkartero.git-230f35d.tar.bz2
401.43 KB
271 downloads
filedropkartero.git-230f35d.zip
434.68 KB
290 downloads
filedropkartero.git-5ae58a2.tar.bz2
401.54 KB
273 downloads
filedropkartero.git-5ae58a2.zip
434.68 KB
263 downloads
filedropkartero.git-a591f4b.tar.bz2
401.76 KB
273 downloads
filedropkartero.git-a591f4b.zip
435.17 KB
270 downloads
filedropkartero.git-36876c8.tar.bz2
400.44 KB
269 downloads
filedropkartero.git-36876c8.zip
432.36 KB
293 downloads
filedropkartero.git-a34c9ed.tar.bz2
400.57 KB
293 downloads
filedropkartero.git-a34c9ed.zip
432.27 KB
283 downloads
filedropkartero.git-e828148.zip
433.58 KB
264 downloads
filedropkartero.git-e828148.tar.bz2
400.88 KB
280 downloads
filedropkartero.git-476cdda.tar.bz2
400.60 KB
310 downloads
filedropkartero.git-476cdda.zip
432.26 KB
276 downloads
filedropkartero.git-054c286.tar.bz2
98.09 KB
350 downloads
filedropkartero.git-054c286.zip
109.53 KB
334 downloads
filedropkartero.git-071b099.tar.bz2
98.76 KB
352 downloads
filedropkartero.git-071b099.zip
110.21 KB
336 downloads
filedropkartero.git-551c38d.tar.bz2
98.51 KB
358 downloads
filedropkartero.git-551c38d.zip
110.20 KB
326 downloads
filedropkartero.git-569dc0c.tar.bz2
98.40 KB
352 downloads
filedropkartero.git-569dc0c.zip
109.86 KB
318 downloads
filedropkartero.git-58a052b.tar.bz2
97.95 KB
349 downloads
filedropkartero.git-58a052b.zip
109.36 KB
332 downloads
filedropkartero.git-43a5af3.tar.bz2
97.80 KB
345 downloads
filedropkartero.git-43a5af3.zip
109.30 KB
329 downloads
filedropkartero.git-bbe069d.tar.bz2
98.03 KB
358 downloads
filedropkartero.git-bbe069d.zip
109.19 KB
334 downloads
filedropkartero.git-02f97e1.tar.bz2
97.76 KB
325 downloads
filedropkartero.git-02f97e1.zip
109.24 KB
424 downloads
filedropkartero.git-d82e393.tar.bz2
97.74 KB
358 downloads
filedropkartero.git-d82e393.zip
109.24 KB
335 downloads
filedropkartero.git-7cdd1f5.tar.bz2
98.03 KB
341 downloads
filedropkartero.git-7cdd1f5.zip
109.24 KB
316 downloads
filedropkartero.git-40825aa.tar.bz2
97.71 KB
340 downloads
filedropkartero.git-40825aa.zip
109.16 KB
353 downloads
filedropkartero.git-3dd941b.tar.bz2
97.69 KB
340 downloads
filedropkartero.git-3dd941b.zip
109.12 KB
326 downloads
filedropkartero.git-50f1e46.tar.bz2
97.65 KB
348 downloads
filedropkartero.git-50f1e46.zip
109.02 KB
330 downloads
filedropkartero.git-fdf9225.tar.bz2
93.19 KB
380 downloads
filedropkartero.git-fdf9225.zip
104.25 KB
339 downloads
filedropkartero.git-21415da.tar.bz2
93.24 KB
336 downloads
filedropkartero.git-21415da.zip
104.22 KB
342 downloads
filedropkartero.git-aff5e89.tar.bz2
93.17 KB
358 downloads
filedropkartero.git-aff5e89.zip
104.22 KB
331 downloads
filedropkartero.git-b27ef39.tar.bz2
91.97 KB
357 downloads
filedropkartero.git-b27ef39.zip
102.80 KB
356 downloads
filedropkartero.git-3d6e8a2.tar.bz2
91.99 KB
341 downloads
filedropkartero.git-3d6e8a2.zip
102.77 KB
352 downloads
filedropkartero.git-1442b69.tar.bz2
91.79 KB
334 downloads
filedropkartero.git-1442b69.zip
102.50 KB
357 downloads
filedropkartero.git-6d15918.tar.bz2
91.56 KB
357 downloads
filedropkartero.git-6d15918.zip
102.28 KB
323 downloads
filedropkartero.git-45140d8.tar.bz2
91.52 KB
360 downloads
filedropkartero.git-45140d8.zip
102.23 KB
329 downloads
filedropkartero.git-d5b48e5.tar.bz2
91.35 KB
347 downloads
filedropkartero.git-d5b48e5.zip
102.01 KB
341 downloads
filedropkartero.git-e007e55.tar.bz2
91.35 KB
358 downloads
filedropkartero.git-e007e55.zip
102.01 KB
314 downloads
filedropkartero.git-30fd7e3.tar.bz2
90.87 KB
334 downloads
filedropkartero.git-30fd7e3.zip
101.44 KB
341 downloads
filedropkartero.git-421a4a7.tar.bz2
88.02 KB
73 downloads
filedropkartero.git-421a4a7.zip
97.96 KB
318 downloads
filedropkartero.git-b49b8bc.tar.bz2
88.09 KB
378 downloads
filedropkartero.git-b49b8bc.zip
97.99 KB
334 downloads
filedropkartero.git-1cc9571.tar.bz2
87.74 KB
355 downloads
filedropkartero.git-1cc9571.zip
97.70 KB
338 downloads
filedropkartero.git-159152f.tar.bz2
87.60 KB
353 downloads
filedropkartero.git-159152f.zip
97.52 KB
344 downloads
filedropkartero.git-35caaf3.tar.bz2
87.74 KB
336 downloads
filedropkartero.git-35caaf3.zip
97.57 KB
327 downloads
filedropkartero.git-3c9d305.zip
96.67 KB
330 downloads
filedropkartero.git-3c9d305.tar.bz2
86.77 KB
344 downloads
filedropkartero.git-14cb2af.tar.bz2
86.41 KB
343 downloads
filedropkartero.git-14cb2af.zip
96.13 KB
333 downloads
filedropkartero.git-e8f00cb.tar.bz2
86.46 KB
359 downloads
filedropkartero.git-e8f00cb.zip
96.21 KB
322 downloads
filedropkartero.git-bdab380.tar.bz2
86.14 KB
356 downloads
filedropkartero.git-bdab380.zip
95.79 KB
327 downloads
filedropkartero.git-48f9134.tar.bz2
85.78 KB
359 downloads
filedropkartero.git-48f9134.zip
95.48 KB
337 downloads
filedropkartero.git-adb9757.tar.bz2
85.67 KB
348 downloads
filedropkartero.git-adb9757.zip
95.37 KB
327 downloads
filedropkartero.git-1601cbd.zip
95.30 KB
339 downloads
filedropkartero.git-1601cbd.tar.bz2
85.69 KB
330 downloads
filedropkartero.git-18a5106.tar.bz2
85.72 KB
331 downloads
filedropkartero.git-18a5106.zip
95.48 KB
343 downloads
filedropkartero.git-a5b1caa.tar.bz2
85.61 KB
366 downloads
filedropkartero.git-a5b1caa.zip
95.36 KB
337 downloads
filedropkartero.git-effff82.zip
97.06 KB
348 downloads
filedropkartero.git-effff82.tar.bz2
87.13 KB
354 downloads
filedropkartero.git-b70d364.tar.bz2
84.09 KB
392 downloads
filedropkartero.git-b70d364.zip
93.67 KB
343 downloads
filedropkartero.git-48f0e53.tar.bz2
84.16 KB
366 downloads
filedropkartero.git-48f0e53.zip
93.66 KB
336 downloads
filedropkartero.git-c17135e.tar.bz2
84.09 KB
347 downloads
filedropkartero.git-c17135e.zip
93.57 KB
322 downloads
filedropkartero.git-a2e2848.tar.bz2
85.59 KB
352 downloads
filedropkartero.git-a2e2848.zip
100.10 KB
335 downloads
filedropkartero.git-1f683db.tar.bz2
83.55 KB
351 downloads
filedropkartero.git-1f683db.zip
93.24 KB
331 downloads
filedropkartero.git-d342596.tar.bz2
83.57 KB
350 downloads
filedropkartero.git-d342596.zip
93.28 KB
323 downloads
filedropkartero.git-e0131d5.tar.bz2
83.55 KB
353 downloads
filedropkartero.git-e0131d5.zip
93.27 KB
339 downloads
filedropkartero.git-ad467e8.tar.bz2
83.13 KB
361 downloads
filedropkartero.git-ad467e8.zip
92.78 KB
328 downloads
filedropkartero.git-b20e27d.tar.bz2
83.46 KB
366 downloads
filedropkartero.git-b20e27d.zip
93.19 KB
356 downloads
filedropkartero.git-eefd8fe.zip
92.67 KB
360 downloads
filedropkartero.git-eefd8fe.tar.bz2
83.01 KB
350 downloads
filedropkartero.git-bea685a.zip
96.88 KB
336 downloads
filedropkartero.git-bea685a.tar.bz2
84.44 KB
346 downloads
filedropkartero.git-a8bd019.tar.bz2
84.25 KB
360 downloads
filedropkartero.git-a8bd019.zip
96.60 KB
330 downloads
filedropkartero.git-cbc914d.tar.bz2
84.38 KB
354 downloads
filedropkartero.git-cbc914d.zip
96.64 KB
320 downloads
filedropkartero.git-09a2e70.tar.bz2
84.40 KB
334 downloads
filedropkartero.git-09a2e70.zip
96.70 KB
342 downloads
filedropkartero.git-641dc05.tar.bz2
84.37 KB
352 downloads
filedropkartero.git-641dc05.zip
96.73 KB
331 downloads
filedropkartero.git-cde49c6.tar.bz2
84.26 KB
363 downloads
filedropkartero.git-cde49c6.zip
96.59 KB
335 downloads
filedropkartero.git-1d004e0.tar.bz2
77.42 KB
365 downloads
filedropkartero.git-1d004e0.zip
87.56 KB
998 downloads
filedropkartero.git-1f0bf17.tar.bz2
77.47 KB
360 downloads
filedropkartero.git-1f0bf17.zip
87.56 KB
329 downloads
filedropkartero.git-265e63c.tar.bz2
77.43 KB
341 downloads
filedropkartero.git-265e63c.zip
87.52 KB
364 downloads
filedropkartero.git-635a5db.zip
87.60 KB
332 downloads
filedropkartero.git-a041f85.tar.bz2
77.37 KB
366 downloads
filedropkartero.git-a041f85.zip
87.52 KB
362 downloads
filedropkartero.git-ae049a7.tar.bz2
77.44 KB
362 downloads
filedropkartero.git-ae049a7.zip
87.52 KB
333 downloads
filedropkartero.git-eef571a.tar.bz2
20.56 KB
473 downloads
filedropkartero.git-eef571a.zip
25.69 KB
461 downloads
filedropkartero.git-0bc16f5.tar.bz2
82.61 KB
378 downloads
filedropkartero.git-0bc16f5.zip
94.75 KB
369 downloads
filedropkartero.git-2afc0f7.tar.bz2
83.61 KB
380 downloads
filedropkartero.git-2afc0f7.zip
96.00 KB
386 downloads
filedropkartero.git-3529bdf.tar.bz2
77.72 KB
346 downloads
filedropkartero.git-3529bdf.zip
87.92 KB
362 downloads
filedropkartero.git-49aac92.tar.bz2
78.98 KB
391 downloads
filedropkartero.git-49aac92.zip
90.01 KB
364 downloads
filedropkartero.git-5d48f21.tar.bz2
78.65 KB
64 downloads
filedropkartero.git-5d48f21.zip
89.51 KB
394 downloads
filedropkartero.git-635a5db.tar.bz2
77.50 KB
401 downloads
filedropkartero.git-6e34786.tar.bz2
77.76 KB
411 downloads
filedropkartero.git-6e34786.zip
88.09 KB
406 downloads
filedropkartero.git-7dc2fd2.tar.bz2
83.51 KB
460 downloads
filedropkartero.git-7dc2fd2.zip
95.99 KB
412 downloads
filedropkartero.git-9cad005.tar.bz2
78.85 KB
457 downloads
filedropkartero.git-9cad005.zip
90.00 KB
453 downloads
filedropkartero.git-b303f61.tar.bz2
82.57 KB
492 downloads
filedropkartero.git-b303f61.zip
94.78 KB
129 downloads
filedropkartero.git-c15ef85.tar.bz2
77.76 KB
147 downloads
filedropkartero.git-c15ef85.zip
88.16 KB
147 downloads
filedropkartero.git-c99e84d.tar.bz2
83.58 KB
169 downloads
filedropkartero.git-c99e84d.zip
96.01 KB
161 downloads
filedropkartero.git-e5009e6.tar.bz2
78.73 KB
177 downloads
filedropkartero.git-e5009e6.zip
89.69 KB
173 downloads
filedropkartero.git-0502d01.tar.bz2
83.54 KB
192 downloads
filedropkartero.git-0502d01.zip
96.00 KB
186 downloads
filedropkartero.git-44ca46d.tar.bz2
83.73 KB
205 downloads
filedropkartero.git-44ca46d.zip
96.20 KB
195 downloads
filedropkartero.git-834f923.tar.bz2
83.75 KB
210 downloads
filedropkartero.git-834f923.zip
96.14 KB
203 downloads