function getformate($Timestamp)
{
    global $db;
    $sql = mysql_query('select `time` from settings where id=1');
    $data = mysql_fetch_array($sql);
    $format = $data['time'];
    $requiredFormat = set_time($Timestamp, $format);
    return $requiredFormat;
}
Example #2
0
if (!file_exists(INI_FILE) || !is_readable(INI_FILE)) {
    $die .= 'File is not found. (INI_FILE)' . "\n";
} else {
    require INI_FILE;
}
if ($die) {
    die_message(nl2br("\n\n" . $die));
}
if ($read_usr_ini_file) {
    require USR_INI_FILE;
    unset($read_usr_ini_file);
}
/////////////////////////////////////////////////
// I18N
set_language();
set_time();
require LIB_DIR . 'public_holiday.php';
// Init Resource(for gettext)
putenv('LC_ALL=' . PO_LANG);
setlocale(LC_ALL, PO_LANG);
bindtextdomain(DOMAIN, LANG_DIR);
bind_textdomain_codeset(DOMAIN, SOURCE_ENCODING);
textdomain(DOMAIN);
/////////////////////////////////////////////////
// リソースファイルの読み込み
require LIB_DIR . 'resource.php';
// Init encoding hint
// define('PKWK_ENCODING_HINT', isset($_LANG['encode_hint']) ? $_LANG['encode_hint'] : '');
define('PKWK_ENCODING_HINT', isset($_LANG['encode_hint']) && $_LANG['encode_hint'] != 'encode_hint' ? $_LANG['encode_hint'] : '');
// unset($_LANG['encode_hint']);
/////////////////////////////////////////////////
Example #3
0
<span class="item" data-item="3180"></span><?php 
    }
    ?>
</td>
                                    <td><span class="player-stats" data-stats="[<?php 
    echo $Characters[$i][7];
    ?>
]" data-bonuses="[0,0,0,0,0,0,0,0]" data-class="<?php 
    echo $Characters[$i][0];
    ?>
" data-level="<?php 
    echo $Characters[$i][1];
    ?>
"></span></td>
                                    <td><span class="timeago" title="<?php 
    echo set_time($Characters[$i][14]);
    ?>
"></span></td>
                                    <td></td>
                                </tr>
                                <?php 
}
?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <link href="/css/select2.css" rel="stylesheet">
        <link href="/css/select2-bootstrap.css" rel="stylesheet">
Example #4
0
    $template = trim(strip_tags($_POST['template']));
    $language = trim(strip_tags($_POST['language']));
    $cookie = isset($_POST['cookie']) ? intval($_POST['cookie']) : 0;
    $ip = isset($_POST['ip']) ? intval($_POST['ip']) : 0;
    $redirect_end = isset($_POST['redirect_end']) ? intval($_POST['redirect_end']) : 0;
    $page_html = isset($_POST['page_html']) ? intval($_POST['page_html']) : 0;
    $w = isset($_POST['w']) ? intval($_POST['w']) : 0;
    $d = isset($_POST['d']) ? intval($_POST['d']) : 0;
    $h = isset($_POST['h']) ? intval($_POST['h']) : 0;
    $i = isset($_POST['i']) ? intval($_POST['i']) : 0;
    $s = isset($_POST['s']) ? intval($_POST['s']) : 0;
    $st = strtotime($date_left);
    $date_left = strtotime($date_left) + set_time(0, $hour_value, $minute, $second);
    $time_left = set_time($time_day, $time_hour, $time_minute, $time_second);
    $special_time = set_time(0, $special_time_hour, $special_time_minute, $special_time_second);
    $repeattime = set_time($cookie_day, $cookie_hour, $cookie_minute, $cookie_second);
    $config['number']++;
    $config_code = <<<PHP
<?php

\$config = array(
\t'type' \t\t\t=> '{$type}', /* date OR time, OR special */
\t'cookie' \t\t=> {$cookie}, /* 1 - On, 0 - Off */
\t'ip' \t\t\t=> {$ip}, /* 1 - On, 0 - Off */
\t'repeat' \t\t=> 1, /* 1 - On, 0 - Off */
\t'repeattime' \t=> {$repeattime}, /* repeattime cookie or ip (sec) */
\t'timezone'\t \t=> '+0', /* repeattime cookie or ip (sec) */
\t
\t'special_type'\t=> {$special_type}, /* 1 - day, 2 - week, 3 - month */
\t'special_time'\t=> {$special_time}, /*  */
\t'special_day'\t=> '{$day_week}', /*  */