Exemplo n.º 1
0
function getProducts()
{
    global $mysqli;
    $query = "SELECT * FROM " . TABLE_PRODUCTS . " WHERE tags != 'Keywords' AND is_read = 0";
    $result = $mysqli->query($query);
    $products = array();
    if ($mysqli->affected_rows) {
        while ($row = $result->fetch_array()) {
            $products[] = createMapping($row);
        }
        return $products;
    } else {
        return false;
    }
}
 /**
  * Set a GFC-Discuz! mapping.
  * @param $gfcid : id on GFC
  * @param $uid: id on Discuz!
  * @param $username: username on Discuz!
  * @param $password: password on Discuz!
  * */
 public function SetGFCMapping($gfcid, $uid, $username, $password)
 {
     $m = createMapping($gfcid, $uid, $username, $password);
     $this->mapping[] = $m;
 }