<script type="text/javascript"> function changeTimeZone(zone) { idx = zone.selectedIndex; document.getElementById('timeZoneForm').submit(); } </script> <form id="timeZoneForm"> <?php include_once 'utils.inc'; if (array_key_exists('edited_user_timezone', $_REQUEST) && !empty($_REQUEST['edited_user_timezone'])) { $_SESSION['ls_timezone'] = $_REQUEST['edited_user_timezone']; } else { if (!isset($_SESSION['ls_timezone'])) { $_SESSION['ls_timezone'] = 'GMT'; } } date_default_timezone_set($_SESSION['ls_timezone']); print date('m/d/Y H:i:s') . "<br>Timezone: "; print get_tz_options(date_default_timezone_get(), "edited_user_timezone", "Timezone", "", "changeTimeZone(this);"); ?> </form>
<?php require "login/login.php"; include_once 'monitor.inc'; $tzone = "GMT"; if ($_SESSION['ls_admin']) { if (isset($_REQUEST['user_id'])) { $user_id = $_REQUEST['user_id']; } } else { $user_id = $_SESSION['ls_id']; } if (isset($user_id)) { $userTable = Doctrine_Core::getTable('User'); $user = $userTable->find($user_id); $tzone = $user['TimeZone']; } else { $user = new User(); } $smarty->assign('tzselect', get_tz_options($tzone, 'timezone')); $smarty->assign('user', $user); $smarty->display('user/addUser.tpl');
" method="post"> <div style="text-align:left;padding:20px;width:220px;"> <label>User:<br /> <input type="text" name="ls_user" value="" class="text" /></label><br /> <label>First Name:<br /> <input type="text" name="ls_first" value="" class="text" /></label><br /> <label>Last Name:<br /> <input type="text" name="ls_last" value="" class="text" /></label><br /> <label>Email Address:<br /> <input type="text" name="ls_email" value="" class="text" /></label><br /> <label>Password: <input type="password" name="ls_pass" value="" class="text" /></label><br /> <label>Password Repeat: <input type="password" name="ls_repeat" value="" class="text" /></label><br /> <label>Timezone</label><?php echo get_tz_options('America/Chicago', "Time Zone"); ?> <br /> <div style="text-align:center;margin:20px 0px 0px 0px;"> <input type="submit" name="ls_reg" value="Register" class="btn" /> </div> <div style="text-align:right;"><a href="<?php echo $_SERVER['PHP_SELF']; ?> " rel="">Log In</a></div> </div> </form> </div> <div id="foot"><a href="http://www.myphpscripts.net" rel="">myPHPscripts</a> Login Session <?php echo $version; ?>
</div> </form> </div> </div> </div> <div class="col-md-6"> <!--<div class="panel panel-default"> <div class="panel-heading"> Time Zone </div> <div class="panel-body"> <form id="formTimezone" class="form-search"> <div class="row"> <div class="col-md-9"> <div class="form-group"> <?php get_tz_options($TIMEZONE); ?> </div> </div> <div class="col-md-2"> <button id="saveTimezone" type="button" class="btn btn-default"> Save </button> </div> </div> </form> </div> </div>--> </div> </div>