Esempio n. 1
0
 protected function update()
 {
     $sql = "UPDATE {$this->_table} SET ";
     foreach ($this->_fields as $name => $value) {
         if ($name == $this->_idField) {
             continue;
         }
         $updates[] = "{$name} = :{$name}";
     }
     $updates = implode(", ", $updates);
     $query = $this->_db->prepareQuery($sql . $updates . " WHERE {$this->_idField} = :id");
     foreach ($this->_fields as $name => $value) {
         if ($name == $this->_idField) {
             continue;
         }
         $query->bindValue($name, $value);
     }
     $query->bindValue("id", $this->_fields[$this->_idField]);
     pre_print_r($query);
     $query->execute();
 }
Esempio n. 2
0
 function posts_orderby($statement, &$query)
 {
     global $wpdb;
     pre_print_r('hhere');
     pre_print_r($statement);
     pre_print_r($query->get('orderby'));
     $parsed = $query->parse_orderby('post_name');
     pre_print_r($parsed);
     $_orderby = "dp_like_count.meta_value+0 " . $query->get('order');
     if ($orderby) {
         $orderby = $_orderby . ',' . $orderby;
     }
     return $orderby;
 }
Esempio n. 3
0
    foreach ($KingdomDetails['ParkTitles'] as $ParkTitle) {
        if ($ParkTitle['Title'] == $parks->title) {
            $parktitleid = $ParkTitle['ParkTitleId'];
        }
    }
    if ($parks->local == 1 || true) {
        $p = $park->CreatePark(array('Token' => $Token, 'Name' => $parks->name, 'Abbreviation' => $parks->abbreviation, 'KingdomId' => $KingdomId, 'ParkTitleId' => $parktitleid));
        $park_map[$parks->parkpk] = $p['Detail'];
        if ($parks->retired == 1) {
            echo "Retire";
            $r = $park->RetirePark(array('Token' => $Token, 'ParkId' => $park_map[$parks->parkpk]));
        }
    }
} while ($parks->next());
unset($parks);
pre_print_r($park_map);
echo "<h2>Award Init &amp; Map</h2>";
/**
SELECT ifnull(concat("'", awardnames.awardname, "' => '", award.name, "'"), concat("'", awardnames.awardname, "' => ''")) FROM `orkrecords_wlimport`.`awardnames` awardnames left join `orkrecords_dev`.`orkdev_award` award on award.name like concat('%',awardnames.awardname) order by awardnames.awardnamepk

'Tsunami' => ''

**/
$award_namemap = array('Jovius' => 'Order of the Jovius', 'Master Jovius' => 'Master Jovius', 'Dragon' => 'Order of the Dragon', 'Garber' => 'Order of the Garber', 'Mask' => 'Order of the Mask', 'Owl' => 'Order of the Owl', 'Lion' => 'Order of the Lion', 'Rose' => 'Order of the Rose', 'Smith' => 'Order of the Smith', 'Griffin' => 'Order of the Griffin', 'Warrior' => 'Order of the Warrior', 'Hydra' => 'Order of the Hydra', 'Master Dragon' => 'Master Dragon', 'Master Garber' => 'Master Garber', 'Master Mask' => 'Master Mask', 'Master Owl' => 'Master Owl', 'Master Lion' => 'Master Lion', 'Master Rose' => 'Master Rose', 'Master Smith' => 'Master Smith', 'Master Griffin' => 'Master Griffin', 'Warlord' => 'Warlord', 'Master Hydra' => 'Master Hydra', 'Knight of the Crown' => 'Knight of the Crown', 'Knight of the Flame' => 'Knight of the Flame', 'Knight of the Sword' => 'Knight of the Sword', 'Knight of the Serpent' => 'Knight of the Serpent', 'Flame' => 'Order of the Flame', 'Walker in the Middle' => 'Order of the Walker in the Middle', 'Zodiac' => 'Order of the Zodiac', 'Grand Duke' => 'Grand Duke', 'Arch-Duke' => 'Archduke', 'Duke' => 'Duke', 'Marquis' => 'Marquis', 'Count' => 'Count', 'Viscount' => 'Viscount', 'Baron' => 'Baron', 'Baronet' => 'Baronet', 'Lord' => 'Lord', 'Defender' => 'Defender', 'Master Antipaladin' => 'Master Anti-Paladin', 'Master Archer' => 'Master Archer', 'Master Assassin' => 'Master Assassin', 'Master Barbarian' => 'Master Barbarian', 'Master Bard' => 'Master Bard', 'Master Druid' => 'Master Druid', 'Master Monk' => 'Master Monk', 'Master Healer' => 'Master Healer', 'Master Monster' => 'Master Monster', 'Master Paladin' => 'Master Paladin', 'Master Peasant' => 'Master Peasant', 'Master Scout' => 'Master Scout', 'Master Warrior' => 'Master Warrior', 'Master Wizard' => 'Master Wizard', 'Lady' => 'Lady', 'Baroness' => 'Baroness', 'Countess' => 'Countess', 'Viscountess' => 'Viscountess', 'Local Sheriff' => 'Sheriff', 'Local Baron' => 'Provincial Baron', 'Local Duke' => 'Provincial Duke', 'Kingdom Monarch' => 'Kingdom Monarch', 'Local Baroness' => 'Provincial Baroness', 'Local Duchess' => 'Provincial Duchess', 'Local Grand Duke' => 'Provincial Grand Duke', 'Local Grand Duchess' => 'Provincial Grand Duchess', 'Local Ducal Regent' => 'Ducal Regent', 'Local Grand Ducal Regent' => 'Grand Ducal Regent', 'Local Regent' => 'Baronial Regent', 'Local Clerk' => 'Shire Clerk', 'Local Seneschal' => 'Baronial Seneschal', 'Local Chancellor' => 'Ducal Chancellor', 'Local General Minister' => 'Grand Ducal General Minister', 'Kingdom Prime Minister' => 'Kingdom Prime Minister', 'Kingdom Regent' => 'Kingdom Regent', 'Local Champion' => 'Baronial Champion', 'Local Ducal Champion' => 'Ducal Defender', 'Local Grand Ducal Champion' => 'Grand Ducal Defender', 'Kingdom Champion' => 'Kingdom Champion', 'Weaponmaster' => 'Weaponmaster');
$kingdom->CreateAward(array('Token' => $Token, 'KingdomId' => $KingdomId, 'AwardId' => 0, 'Name' => 'Tsunami', 'ReignLimit' => 1, 'MonthLimit' => 0, 'TitleClass' => 0, 'IsTitle' => 0, 'Peerage' => 'None'));
$AwardList = $kingdom->GetAwardList(array('IsLadder' => 'Either', 'IsTitle' => 'Either', 'KingdomId' => $KingdomId));
$awardnames->clear();
$awardnames->find();
$award_map = array();
do {
    foreach ($AwardList['Awards'] as $idx => $awardinfo) {