protected function putServerNow($wstring) { if (is_resource($this->socket)) { if (fputs($this->socket, jtrim($wstring) . "\n") !== FALSE) { return true; } } return false; }
fwrite($handle, $filed_format); break; case 'wp': $filed_format = 'csv_post_title,csv_post_post,csv_post_categories,csv_post_tags,csv_post_excerpt,csv_post_date,csv_post_author,csv_post_slug' . "\n"; fwrite($handle, $filed_format); break; } $products = $db->Execute("\n\tSELECT *\n\tFROM " . TABLE_PRODUCTS . " p JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id=pd.products_id AND pd.language_id={$lang_id})\n\tORDER BY p.products_id ASC\n\t" . $limit); while (!$products->EOF) { //$r = $products->fields; $meta = getMetatags($products->fields['products_id'], $lang_id); $categores = getCategorys($products->fields['master_categories_id'], $lang_id); $image = $products->fields['products_image']; switch ($_GET['f']) { case 'zc': $fields = array($products->fields['products_model'], $image, $products->fields['products_name'], jtrim_desc($products->fields['products_description']), $products->fields['products_url'], zen_get_products_special_price($products->fields['products_id'], true), date('Y-m-d H:i:s'), '2035-12-21 12:35:21', $products->fields['products_price'], $products->fields['products_weight'], $products->fields['products_last_modified'], $products->fields['products_date_added'], $products->fields['products_quantity'], '', jtrim($categores[0]['name']), jtrim($categores[1]['name']), jtrim($categores[2]['name']), jtrim($categores[3]['name']), jtrim($categores[4]['name']), jtrim($categores[5]['name']), jtrim($categores[6]['name']), '--なし--', $products->fields['products_status'], $products->fields['metatags_products_name_status'], $products->fields['metatags_title_status'], $products->fields['metatags_model_status'], $products->fields['metatags_price_status'], $products->fields['metatags_title_tagline_status'], $meta['metatag_title'], $meta['metatag_key'], $meta['metatag_desc']); //v_property_1 $fields[] = getProperty($products->fields['products_id'], $lang_id); break; case 'wp': $description = jtrim_desc($products->fields['products_description']); // $images = array( // getImagePath($products->fields['products_image']) // ); // if (preg_match_all('~src=["\'](.+?)["\']~i', $description, $matchImages)) // { // if ($matchImages[1]) // foreach ($matchImages[1] as $mI) // { // $mI = trim($mI, '"\' '); // $mI = ltrim($mI, '/');
public function start() { //First, load the scripts. $this->rehash(); $this->callBinds('evnt', 'rehash', array('rehash')); if (!$this->network->connect()) { return 1; } // We are connected. Hurray! Lets call the binded functions. $this->callBinds('evnt', 'connect-server', array('connect-server')); $this->continue = true; while ($this->continue) { while ($line = $this->network->getLine()) { $line = jtrim($line); $args = explode(" ", $line); // Ping pong if ($args[0] == "PING") { $this->network->putServerQuick("PONG " . $args[1]); $this->callBinds('raw', 'PING', array("PING", $args[1])); } else { //Not ping pong switch ($args[1]) { case 01: $this->botnick = $args[2]; break; case 396: $this->bothost = $args[3]; break; case "PRIVMSG": // First we build the array of arguments to callback. $attribs = $this->getAttrFromSource($args[0]); if (ischannel($args[2])) { $attribs[2] = $args[2]; $attribs[3] = substr(implode(" ", array_slice($args, 3)), 1); $this->callBinds('pub', $attribs[3], $attribs); } else { $attribs[2] = substr(implode(" ", array_slice($args, 3)), 1); $this->callBinds('msg', $attribs[2], $attribs); } break; } if (is_numeric($args[1])) { $this->callBinds('raw', $args[1], array($args[1], implode(" ", array_slice($args, 3)))); } } } } return 0; }