예제 #1
0
파일: regional.php 프로젝트: ajaboa/crmpuan
<?php

require 'header.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (\GO\Base\Html\Error::checkRequired()) {
        foreach ($_POST as $key => $value) {
            \GO::config()->{$key} = $value;
        }
        \GO::config()->save();
        redirect("smtp.php");
    }
}
printHead();
?>
<h1>Regional settings</h1>

<?php 
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Country', 'value' => \GO::config()->default_country, 'name' => "default_country", 'options' => \GO::language()->getCountries()));
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Language', 'value' => \GO::config()->language, 'name' => "language", 'options' => \GO::language()->getLanguages()));
$tz = array();
foreach (DateTimeZone::listIdentifiers() as $id) {
    $tz[$id] = $id;
}
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Timezone', 'value' => \GO::config()->default_timezone, 'name' => "default_timezone", 'options' => $tz));
$dateFormats = array();
foreach (\GO::config()->date_formats as $format) {
    $dateFormats[$format] = str_replace(array('Y', 'm', 'd'), array('Year ', 'Month ', 'Day '), $format);
}
\GO\Base\Html\Select::render(array("required" => true, 'label' => 'Date format', 'value' => \GO::config()->default_date_format, 'name' => "default_date_format", 'options' => $dateFormats));
\GO\Base\Html\Input::render(array("required" => true, "label" => "Date separator", "name" => "default_date_separator", "value" => \GO::config()->default_date_separator));
$timeFormats = array();
예제 #2
0
파일: smtp.php 프로젝트: ajaboa/crmpuan
<?php

require 'header.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST' && \GO\Base\Html\Error::checkRequired()) {
    foreach ($_POST as $key => $value) {
        \GO::config()->{$key} = $value;
    }
    \GO::config()->save();
    header('Location: database.php');
}
printHead();
if (isset($error)) {
    errorMessage($error);
}
?>
<h1>SMTP server</h1>
<p>
	<?php 
echo \GO::config()->product_name;
?>
 needs to connect to an SMTP server to send e-mail. Please fill in the details for your SMTP server.
</p>

<?php 
\GO\Base\Html\Input::render(array("label" => "SMTP server", "name" => "smtp_server", "value" => \GO::config()->smtp_server, "required" => true));
\GO\Base\Html\Input::render(array("label" => "Port", "name" => "smtp_port", "value" => \GO::config()->smtp_port, "required" => true));
?>
<p>
If your SMTP server requires authentication please fill in the username and password.
</p>
<?php