コード例 #1
0
function forgot_pass_req($uuid = '', $tablename)
{
    if ($uuid > 0) {
        $after_10sec = date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s") - 10, date("d"), date("m"), date("Y")));
        $pass_request = sel_rec($tablename, "id", "req_datetime>='{$after_10sec}' AND uuid='{$uuid}'", "1", "desc", "", false);
        if ($pass_request != false) {
            return false;
        }
    }
    return true;
}
コード例 #2
0
function state_selected($tab, $where, $selected, $field_id = '', $field_name = '')
{
    $list_field = sel_rec($tab, "*", $where, "Region", "asc", "", $disp = false);
    if ($list_field != false) {
        $opt_list = "<option value='0'>Select State</option>";
        while ($val_country = mysql_fetch_array($list_field)) {
            $id = $val_country['RegionID'];
            $name = $val_country['Region'];
            $sel_count = '';
            if ($selected == $id) {
                $sel_count = "selected='selected'";
            }
            $opt_list .= "<option value='" . $val_country['RegionID'] . "' {$sel_count}>" . $name . "</option>";
        }
    }
    return $opt_list;
}