<?php
############################################################################################
####  Name:             style.php			                                              ####
####  Version:          3.0                                                             ####
####  Copyright:        GOAutoDial Inc. - Januarius Manipol <januarius@goautodial.com>  ####
####  Edited by:        GOAutoDial Inc. - Jerico James Milo <james@goautodial.com>      ####
####  License:          AGPLv2                                                          ####
############################################################################################

header("Content-type: text/css");

if (file_exists("/etc/goautodial.conf")) {
	$conf_path = "/etc/goautodial.conf";
} elseif (file_exists("{$_SERVER['DOCUMENT_ROOT']}/goautodial.conf")) {
	$conf_path = "{$_SERVER['DOCUMENT_ROOT']}/goautodial.conf";
} else {
	die ("ERROR: 'goautodial.conf' file not found.");
}

if ( file_exists($conf_path) )
        {
        $DBCagc = file($conf_path);
        foreach ($DBCagc as $DBCline)
                {
                $DBCline = preg_replace("/ |>|\n|\r|\t|\#.*|;.*|\[|\]/","",$DBCline);
                if (ereg("goautodialdbhostname", $DBCline))
                        {$GOdbHostname = $DBCline;   $GOdbHostname = preg_replace("/.*=/","",$GOdbHostname);}
                if (ereg("goautodialdbusername", $DBCline))
                        {$GOdbUsername = $DBCline;   $GOdbUsername = preg_replace("/.*=/","",$GOdbUsername);}
                if (ereg("goautodialdbpassword", $DBCline))
                        {$GOdbPassword = $DBCline;   $GOdbPassword = preg_replace("/.*=/","",$GOdbPassword);}
                if (ereg("goautodialdbdatabase", $DBCline))
                        {$GOdbDatabase = $DBCline;   $GOdbDatabase = preg_replace("/.*=/","",$GOdbDatabase);} 
                }

        }

if (file_exists("/etc/astguiclient.conf")) {
	$conf_path = "/etc/astguiclient.conf";
} elseif (file_exists("{$_SERVER['DOCUMENT_ROOT']}/astguiclient.conf")) {
	$conf_path = "{$_SERVER['DOCUMENT_ROOT']}/astguiclient.conf";
} else {
	die ("ERROR: 'astguiclient.conf' file not found.");
}

if ( file_exists($conf_path) )
        {
        $DBCagc = file($conf_path);
        foreach ($DBCagc as $DBCline)
                {
                $DBCline = preg_replace("/ |>|\n|\r|\t|\#.*|;.*/","",$DBCline);
                if (ereg("^VARDB_port", $DBCline))
                        {$VARDB_port = $DBCline;   $VARDB_port = preg_replace("/.*=/","",$VARDB_port);}
                }
        }


$golink=mysql_connect("$GOdbHostname:$VARDB_port", "$GOdbUsername", "$GOdbPassword");
if (!$golink)
        {
	die('MySQL connect ERROR: ' . mysql_error());
        }
mysql_select_db("$GOdbDatabase");

$stmt = "SELECT theme_color,login_color FROM go_server_settings";
$rslt = mysql_query($stmt, $golink);
$row=mysql_fetch_row($rslt);

$THEMECOLOR = '#'.$row[0];
$LOGINCOLOR = '#'.$row[1];

?>




/* /!\ DO NOT EDIT THIS FILE !!! Please edit custom.css to keep your customizations after an upgrade /!\ */

body { font-family: verdana; padding:0; margin:0; background: #FFF; }
body a { font-family: verdana; color: #6a6363;}
body a:hover { font-family: verdana; color: #6a6363;}


.ce  {font-style: normal; font-family: verdana; font-size: 10px; margin-top: -10px; color: #6a6363;}
.ce a {text-decoration: none; font-style: normal; font-family: verdana; font-size: 10px; margin-top: -10px; color: #6a6363;}
.ce a:hover {text-decoration: underline; color: #428e00;}

tr {text-decoration: none; font-style: normal; font-family: verdana; font-size: 15px; margin-top: -15px; color: #6a6363; }
td {text-decoration: none; font-style: normal; font-family: verdana; font-size: 15px; margin-top: -15px; color: #6a6363; }

div.scroll_list { height: 400px; width: 140px; overflow: scroll; }
div.text_input { overflow: auto; font-size: 10px;  font-family: sans-serif; }
.body_text { font-size: 13px;  font-family: sans-serif; }
.queue_text_red { font-size: 12px;  font-family: sans-serif; font-weight: bold; color: red; }
.queue_text { font-size: 12px;  font-family: sans-serif; color: black; text-decoration:none; }
.preview_text { font-size: 13px;  font-family: sans-serif; background: #CCFFCC; }
.preview_text_red { font-size: 13px;  font-family: sans-serif; background: #FFCCCC; }
.body_small { font-size: 11px;  font-family: sans-serif; }
.body_small_bold { font-size: 11px;  font-family: sans-serif; font-weight: bold; }
.body_tiny { font-size: 10px;  font-family: sans-serif; }
.log_text { font-size: 11px;  font-family: monospace; }
.log_text_red { font-size: 11px;  font-family: monospace; font-weight: bold; background: #FF3333; }
.log_title { font-size: 12px;  font-family: monospace; font-weight: bold; }
.sd_text { font-size: 16px;  font-family: sans-serif; font-weight: bold; }
.sh_text { font-size: 14px;  font-family: sans-serif; font-weight: bold; }
.sb_text { font-size: 12px;  font-family: sans-serif; }
.sk_text { font-size: 11px;  font-family: sans-serif; }
.skb_text { font-size: 13px;  font-family: sans-serif; font-weight: bold; }
.ON_conf { font-size: 11px;  font-family: monospace; color: black; background: #FFFF99; }
.OFF_conf { font-size: 11px;  font-family: monospace; color: black; background: #FFCC77; }
.cust_form { font-family: sans-serif; font-size: 10px; overflow: hidden; }
.cust_form_text { font-family: sans-serif; font-size: 10px; overflow: auto; }
.curvebox {
			width:400px;height:300px;-webkit-border-radius: 7px;
			-moz-border-radius: 7px;
			border-radius: 5px;
			border:1px solid #CACACA;
                        background: <?=$LOGINCOLOR?>; /* for non-css3 browsers */
                        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='<?=$LOGINCOLOR?>', endColorstr='<?=$LOGINCOLOR?>'); /* for EI */
			background:-moz-linear-gradient(center right , <?=$LOGINCOLOR?>, <?=$LOGINCOLOR?>); /* for Firefox 3.6+ */
                        background: -webkit-gradient(linear, left top, left bottom, from(<?=$LOGINCOLOR?>), to(<?=$LOGINCOLOR?>)); /* for webkit browsers */
			-webkit-box-shadow: #CACACA 2px 2px 2px;
			-moz-box-shadow: #CACACA 2px 2px 2px; 
			box-shadow: #CACACA 2px 2px 2px;	
}

.bodybgback {
      background:url(../bg.jpg) repeat-x center top;
      font-family:Arial, Helvetica, sans-serif;
      font-size:20px;
      color: #000000;
      

}

.bodyheader {
    /*background-image: -moz-linear-gradient(bottom,  #77a30a,  #476000);
    background-image: -ms-linear-gradient(bottom,  #77a30a,  #476000);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#77a30a), to(#476000));*/
/*      background-color: #262626; */
        /*background-position: center;*/
        background-repeat: no-repeat;
        color:#FFFFFF;
    	/* background-color:#428e00; */
    	background-color: <?=$THEMECOLOR?>; 
        font-family:Arial, Helvetica;
    /*border-bottom: #000 1px solid!important;*/
    /*box-shadow: 5px 5px 2px #BDBDBD;*/
}

#newElement{
    background: #fff;
    width: auto; 
    height: 25px;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#77a30a', endColorstr='#476000)');
}

input[type="text"] {
        font-size: 15px;
        border:1px solid #cccccc;
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        -moz-border-radius-topleft: 5px;
        -moz-border-radius-bottomleft: 5px;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        -moz-border-radius-topright: 5px;
        -moz-border-radius-bottomright: 5px;
        padding: 5px;
}

.form_input_button {
	font-size: 15px;
	border:1px solid #cccccc;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	-moz-border-radius-topleft: 5px;
	-moz-border-radius-bottomleft: 5px;
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
	-moz-border-radius-topright: 5px;
	-moz-border-radius-bottomright: 5px;
	padding: 5px;
}


.footer { height: 55px; width: 100%;padding: 5px 5px 0px 5px; margin-bottom: 0px; position: fixed; bottom: 0px;
                        border:1px solid #f8f8f5;
			background: #f6ffea;
			/*box-shadow: #bfc5b4 2px 2px 2px;*/	
                        font-family:Verdana, Arial, Helvetica;
                        }

span{font-size:12px;}
#signup-table{font-size:12px;}
