Merge branch 'master' into momentjs
This commit is contained in:
commit
74c0c8e4e8
|
@ -25,19 +25,26 @@ echo ' [+] Setting up config.ini'
|
||||||
echo "[GENERAL]" > /var/www/opentrashmail/config.ini
|
echo "[GENERAL]" > /var/www/opentrashmail/config.ini
|
||||||
if [ "$DOMAINS" != "" ]; then
|
if [ "$DOMAINS" != "" ]; then
|
||||||
echo "DOMAINS=$DOMAINS" >> /var/www/opentrashmail/config.ini
|
echo "DOMAINS=$DOMAINS" >> /var/www/opentrashmail/config.ini
|
||||||
echo " [i] Active Domain(s): $DOMAINS"
|
echo " [i] Active Domain(s): $DOMAINS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ADMIN" != "" ]; then
|
if [ "$ADMIN" != "" ]; then
|
||||||
echo "ADMIN=$ADMIN" >> /var/www/opentrashmail/config.ini
|
echo "ADMIN=$ADMIN" >> /var/www/opentrashmail/config.ini
|
||||||
echo " [i] Set admin to: $ADMIN"
|
echo " [i] Set admin to: $ADMIN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[MAILSERVER]" >> /var/www/opentrashmail/config.ini
|
echo "[MAILSERVER]" >> /var/www/opentrashmail/config.ini
|
||||||
echo "MAILPORT=25" >> /var/www/opentrashmail/config.ini
|
echo "MAILPORT=25" >> /var/www/opentrashmail/config.ini
|
||||||
|
|
||||||
echo "[DATETIME]" >> /var/www/opentrashmail/config.ini
|
echo "[DATETIME]" >> /var/www/opentrashmail/config.ini
|
||||||
echo "DATEFORMAT='D.M.YYYY HH:mm'" >> /var/www/opentrashmail/config.ini
|
if [ "$DATEFORMAT" != "" ]; then
|
||||||
|
echo "DATEFORMAT=$DATEFORMAT" >> /var/www/opentrashmail/config.ini
|
||||||
|
echo " [i] Setting up dateformat to: $DATEFORMAT"
|
||||||
|
else
|
||||||
|
echo "DATEFORMAT='D.M.YYYY HH:mm'" >> /var/www/opentrashmail/config.ini
|
||||||
|
echo " [i] Using default dateformat"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cd /var/www/opentrashmail/python
|
cd /var/www/opentrashmail/python
|
||||||
|
|
||||||
|
@ -45,4 +52,4 @@ echo ' [+] Starting Mailserver'
|
||||||
python mailserver.py
|
python mailserver.py
|
||||||
#nohup python /var/www/opentrashmail/python/mailserver.py &
|
#nohup python /var/www/opentrashmail/python/mailserver.py &
|
||||||
|
|
||||||
#tail -n 1 -f /var/log/nginx/*.log
|
#tail -n 1 -f /var/log/nginx/*.log
|
||||||
|
|
|
@ -124,7 +124,7 @@ if __name__ == '__main__':
|
||||||
else :
|
else :
|
||||||
Config = ConfigParser.ConfigParser()
|
Config = ConfigParser.ConfigParser()
|
||||||
Config.read("../config.ini")
|
Config.read("../config.ini")
|
||||||
port = int(Config.get("MAILSERVER","PORT"))
|
port = int(Config.get("MAILSERVER","MAILPORT"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ switch($action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(is_array($emaillist))
|
if(is_array($emaillist))
|
||||||
ksort($emaillist);
|
krsort($emaillist);
|
||||||
$data = (count($emaillist)?$emaillist:array());
|
$data = (count($emaillist)?$emaillist:array());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,11 +89,16 @@ function updateEmailTable()
|
||||||
var admin=false;
|
var admin=false;
|
||||||
if(data.type=="admin")
|
if(data.type=="admin")
|
||||||
{
|
{
|
||||||
clearInterval(timer);
|
//clearInterval(timer);
|
||||||
admin = true;
|
admin = true;
|
||||||
$('#tableheader').children(':eq(1)').after('<th scope="col">To</th>');
|
// Do not add the To header if one with the "to" class already exists
|
||||||
|
if ( $('#tableheader').children(':eq(2)').hasClass("to") === false )
|
||||||
|
{
|
||||||
|
$('#tableheader').children(':eq(1)').after('<th scope="col" class="to">To</th>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#emailtable tr").remove(); // Empty all <tr> from the table so we don't stack
|
||||||
if(Object.keys(data.emails).length>0)
|
if(Object.keys(data.emails).length>0)
|
||||||
for(em in data.emails)
|
for(em in data.emails)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue