Esempio n. 1
0
function getTimezoneInputField()
{
    $html = '';
    $serverZone = '';
    try {
        $serverZone = @date_default_timezone_get();
        if (empty($serverZone)) {
            $serverZone = 'UTC';
        }
        $allZones = timezoneList();
        if (!empty($allZones)) {
            foreach ($allZones as $name) {
                if ($name == $serverZone) {
                    $html .= '<option selected="selected">' . $name . '</option>';
                } else {
                    $html .= '<option>' . $name . '</option>';
                }
            }
        }
    } catch (Exception $ex) {
        $html = '';
    }
    if (!empty($html)) {
        return '<select id="timezone">' . $html . '</select>';
    }
    // sometimes fetching the list of timezones seems to fail
    // see https://github.com/kimai/kimai/issues/579
    return '<input type="text" value="' . $serverZone . '" id="timezone">';
}
Esempio n. 2
0
 public function timeZoneSelect($name, $value = null, $attribs = null, $options = null, $listsep = "<br />\n")
 {
     if ($options === null) {
         $options = array();
         $timezones = timezoneList();
         foreach ($timezones as $zoneName) {
             $options[$zoneName] = $zoneName;
         }
     }
     return $this->formSelect($name, $value, $attribs, $options, $listsep);
 }
Esempio n. 3
0
     #dbrecover {
     }
  
  </style>
</head>
<body>
  <div  align="center">
       <FORM action="" method="post">
         <h1> <?=$kga['lang']['timezone']?></h1>
         <?=$kga['lang']['updater']['timezone'] ?>
         <br/><br/>
         <select name="timezone">
          <?php
          $serverZone = @date_default_timezone_get();

          foreach (timezoneList() as $name) {
            if ($name == $serverZone)
              echo "<option selected=\"selected\">$name</option>";
            else
              echo "<option>$name</option>";
          }
          ?>
          </select>
         <br /><br />
         <INPUT type="hidden" name="a" value="1">
         <INPUT type="submit" value="START UPDATE">
     
       </FORM>
  </div>
</body>
</html>
Esempio n. 4
0
         $tpl->display("security_warning.tpl");
     }
     break;
     /**
      * Display the preferences dialog.
      */
 /**
  * Display the preferences dialog.
  */
 case 'prefs':
     if (isset($kga['customer'])) {
         die;
     }
     $tpl->assign('skins', ls("../skins"));
     $tpl->assign('langs', langs());
     $tpl->assign('timezones', timezoneList());
     $tpl->assign('usr', $kga['usr']);
     $tpl->assign('rate', get_rate($kga['usr']['usr_ID'], NULL, NULL));
     $tpl->display("preferences.tpl");
     break;
     /**
      * Display the dialog to add or edit a customer.
      */
 /**
  * Display the dialog to add or edit a customer.
  */
 case 'add_edit_knd':
     if (isset($kga['customer']) || $kga['usr']['usr_sts'] == 2) {
         die;
     }
     if ($id) {
Esempio n. 5
0
File: init.php Progetto: cljk/kimai
}
$view->users = $users;
// ==============================
// = display global roles table =
// ==============================
$view->globalRoles = $database->global_roles();
$view->globalRoles_display = $view->render("globalRoles.php");
// ==================================
// = display membership roles table =
// ==================================
$view->membershipRoles = $database->membership_roles();
$view->membershipRoles_display = $view->render("membershipRoles.php");
$view->showDeletedGroups = get_cookie('adminPanel_extension_show_deleted_groups', 0);
$view->showDeletedUsers = get_cookie('adminPanel_extension_show_deleted_users', 0);
$view->languages = Translations::langs();
$view->timezones = timezoneList();
$status = $database->get_statuses();
$view->arr_status = $status;
$admin['users'] = $view->render("users.php");
$admin['groups'] = $view->render("groups.php");
$admin['status'] = $view->render("status.php");
if ($kga['conf']['editLimit'] != '-') {
    $view->editLimitEnabled = true;
    $editLimit = $kga['conf']['editLimit'] / (60 * 60);
    // convert to hours
    $view->editLimitDays = (int) ($editLimit / 24);
    $view->editLimitHours = (int) ($editLimit % 24);
} else {
    $view->editLimitEnabled = false;
    $view->editLimitDays = '';
    $view->editLimitHours = '';
Esempio n. 6
0
<?php

return ['site_title' => ['type' => 'text', 'title' => 'Site title', 'description' => 'This is your site title', 'value' => 'creA8Social'], 'site_description' => ['type' => 'textarea', 'description' => 'This is a short description of your site which is readable by search engines for listing', 'title' => 'Your site description', 'value' => 'creA8Social is a social networking platform that provide you with great unique features that you can\'t find anywhere'], 'site_keywords' => ['type' => 'textarea', 'description' => 'This is your site keywords needed by search engines for listing, seperate them by comma (,)', 'title' => 'Your site keywords', 'value' => 'social networking platform, php script, php software, php social networking script'], 'site_email' => ['type' => 'text', 'description' => 'Set your site email use to send mail to your members', 'title' => 'Site Email Address', 'value' => ''], 'realtime-check-interval' => ['type' => 'dropdown', 'title' => 'Set RealTime Check Interval ', 'description' => 'Set realtime check interval', 'value' => '30', 'data' => ['10000' => '10 Seconds', '20000' => '20 Seconds', '30000' => '30 Seconds', '40000' => '40 Seconds', '50000' => '50 Seconds', '60000' => '1 Minute', '120000' => '2 Minutes', '180000' => '3 Minutes', '240000' => '4 Minutes', '300000' => '5 Minutes']], 'enable-https' => ['type' => 'boolean', 'description' => 'Option to enable secure url for your website through HTTPS', 'title' => 'Enable HTTPS', 'value' => '0'], 'timezone' => ['type' => 'dropdown', 'title' => 'TimeZone', 'description' => 'Set your prefer timezone by checking', 'value' => 'UTC', 'data' => timezoneList()], 'predefined-words' => ['type' => 'textarea', 'title' => 'Predefined Words', 'description' => 'Prevent your members from using certain words, list them by separating them with comma (,), <strong>Note: all in small letter</strong>', 'value' => 'themes,app,vendor,f**k,games,admin,administrator,config,workbench,uploads,upgrade-info,bootstrap,guest'], 'google-analytics-code' => ['type' => 'textarea', 'description' => 'Set your google analytics code here', 'title' => 'Add Google Analytics Code', 'value' => ''], 'enable-debug' => ['type' => 'boolean', 'title' => 'Enable Debug Mode', 'description' => 'Enable debug to detect the cause of errors ', 'value' => '0'], 'maintenance-mode' => ['type' => 'boolean', 'title' => 'Enable Maintenance Mode', 'description' => 'Enable maintenance mode for your frontend visitors, only admin pages will be accessible', 'value' => '0'], 'maintenance-mode-text' => ['type' => 'textarea', 'title' => 'Maintenance Mode Status Text', 'description' => 'Additional maintenance mode status text for your frontend visitors, only admin pages will be accessible', 'value' => 'We should be back shortly, Thanks for your patience'], 'ajaxify_frontend' => ['type' => 'boolean', 'title' => 'Ajaxify Frontend', 'description' => 'Ajaxify frontend, user frontend pages will be loaded using ajax technology', 'value' => 1], 'minify-assets' => ['type' => 'boolean', 'title' => 'Use Compressed Assets', 'description' => 'Compressing assets increases page load speed', 'value' => '1'], 'remove-search-bar-from-home' => ['type' => 'boolean', 'title' => 'Remove search box from Homepage', 'description' => 'With this setting you can easily remove the header search box from homepage', 'value' => 0]];
Esempio n. 7
0
File: init.php Progetto: kimai/kimai
// = display membership roles table =
// ==================================
$view->assign('membershipRoles', $database->membership_roles());
$view->assign('tab_membershiprole', $view->render("membershipRoles.php"));
// ========================
// = display status table =
// ========================
$view->assign('statuses', $database->get_statuses());
$view->assign('tab_status', $view->render("status.php"));
// ========================
// = display advanced tab =
// ========================
$showAdvancedTab = $database->global_role_allows($kga['user']['globalRoleID'], 'adminPanel_extension-editAdvanced');
if ($showAdvancedTab) {
    $view->assign('languages', Kimai_Translation_Service::getAvailableLanguages());
    $view->assign('timezones', timezoneList());
    $view->assign('editLimitEnabled', false);
    $view->assign('editLimitDays', '');
    $view->assign('editLimitHours', '');
    if ($kga->isEditLimit()) {
        $view->assign('editLimitEnabled', true);
        $editLimit = $kga->getEditLimit() / (60 * 60);
        // convert to hours
        $view->assign('editLimitDays', (int) ($editLimit / 24));
        $view->assign('editLimitHours', (int) ($editLimit % 24));
    }
    $view->assign('roundTimesheetEntries', false);
    $view->assign('roundMinutes', '');
    $view->assign('roundSeconds', '');
    if ($kga['conf']['roundTimesheetEntries'] != '') {
        $view->assign('roundTimesheetEntries', true);
Esempio n. 8
0
            ?>
<br /><br />
						<?php 
            echo $langsetting11;
            ?>
 :
						<form action="<?php 
            echo $aksi;
            ?>
" method="post">
							<div class="form-group">
								<input type="hidden" name="mod" value="setting">
								<input type="hidden" name="act" value="timezone">
								<select id="example-chosen" class="select-chosen" name="timezone" onChange="submit()">
									<?php 
            $timezoneList = timezoneList();
            foreach ($timezoneList as $value => $label) {
                echo "<option value='{$value}'>{$label}</option>";
            }
            ?>
								</select>
							</div>
						</form>
					</td>
				</tr>
				<tr>
					<td><?php 
            echo $langsetting18;
            ?>
</td>
					<td>
Esempio n. 9
0
function settings_form($errors = '')
{
    global $_SERVER, $data;
    $pathinfo = pathinfo(__FILE__);
    $self = $pathinfo['basename'];
    $host = !isset($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST'];
    $phpself = !isset($_SERVER['PHP_SELF']) ? '' : htmlentities($_SERVER['PHP_SELF']);
    $path = "http://" . $host . $phpself;
    $path = substr($path, 0, -strlen($self));
    $dir = $data['system_dir'] == '' ? 'system' : $data['system_dir'];
    $cp_url = $data['cp_url'] == '' ? $path . $dir . '/' : $data['cp_url'];
    $site_url = ($data['site_url'] == '' or $data['site_url'] == '/') ? $path : $data['site_url'];
    $db_hostname = $data['db_hostname'] == '' ? 'localhost' : stripslashes($data['db_hostname']);
    $db_username = $data['db_username'] == '' ? '' : stripslashes($data['db_username']);
    $db_password = $data['db_password'] == '' ? '' : stripslashes($data['db_password']);
    $db_name = $data['db_name'] == '' ? '' : stripslashes($data['db_name']);
    $db_conntype = $data['db_conntype'] == '' ? '0' : stripslashes($data['db_conntype']);
    $username = $data['username'] == '' ? '' : stripslashes($data['username']);
    $password = $data['password'] == '' ? '' : stripslashes($data['password']);
    $deft_lang = $data['deft_lang'] == '' ? 'english' : stripslashes($data['deft_lang']);
    if ($db_conntype == 1) {
        $persistent = 'checked="checked"';
        $nonpersistent = '';
    } else {
        $persistent = '';
        $nonpersistent = 'checked="checked"';
    }
    ?>
<div id='innercontent'>

<h1>Smart Restaurant Installation Wizard</h1>

<?php 
    if ($errors != '') {
        echo $errors;
    } else {
        echo "<h2>Enter Your Settings</h2>";
    }
    ?>

<p><span class="red"><b>Note: </b> If you are not sure what any of these settings should be, please contact your hosting provider and ask them.</span></p>

<form method='post' action='install.php?page=5'>
<input type='hidden' name='system_dir' value='<?php 
    echo $dir;
    ?>
'>


<div class="shade">
<div class="settingHead">Server Settings</div>

<h5>URL to the directory where the above index page is located</h5>
<p>Typically this will be the root of your site (http://www.yourdomain.com/)
<br />Do not include the index page in the URL</p>

<p><input type='text' name='site_url' value='<?php 
    echo $site_url;
    ?>
' size='60'  class='input'></p>


<h5>URL to your "<?php 
    echo $dir;
    ?>
" directory</h5> 
<p><input type='text' name='cp_url' value='<?php 
    echo $cp_url;
    ?>
' size='60'  class='input'></p>

</div>

<div class="shade">
<div class="settingHead">Database Settings</div>

<h5>MySQL Server Address</h5>
<p>Usually you will use 'localhost', but your hosting provider may require something else</p>

<p><input type='text' name='db_hostname' value='<?php 
    echo $db_hostname;
    ?>
' size='40' maxlength='60' class='input' /></p>


<h5>MySQL Username</h5>
<p>The username you use to access your MySQL database</p>
<p><input type='text' name='db_username' value='<?php 
    echo $db_username;
    ?>
' size='40'  maxlength='60' class='input' /></p>


<h5>MySQL Password</h5>
<p>The password you use to access your MySQL database</p>
<p><input type='text' name='db_password' value='<?php 
    echo $db_password;
    ?>
' size='40'  maxlength='65' class='input' /></p>


<h5>MySQL Database Name</h5>
<p>The name of the database where you want Smart Restaurant installed.</p>
<p class="red">Note: The installation wizard will not create the database for you so you must specify the name of a database that exists.</p>
<p><input type='text' name='db_name' value='<?php 
    echo $db_name;
    ?>
' size='40' maxlength='60' class='input' /></p>

</div>

<div class="shade">
<div class="settingHead">Timezone Settings</div>

<h5>Timezone Selection</h5>
<p>Select the timezone in which you are located </p>

<p>
<select name='default_timezone' class='input'>
<?php 
    echo timezoneList();
    ?>
</select>
</p>

</div>

<div class="shade">
<div class="settingHead">Administration account</div>

<p>You will use these settings to access your Smart Restaurant control panel</p>

<h5>Username</h5>
<p><span class='red'>Administrator</span></p>

<h5>Password</h5>
<p><span class='red'>password</span></p>

<p>You can change them when you login in the Admistration area.</p>
</div>


<p><input type='submit' value=' Click Here to Smart Restaurant! '  class='submit'></p>

</form>

</div>

<?php 
}