\"+tkrCurr+\"\"; setTimeout('newsticker()',100); return; } tkrPtr= 0; if (tkrCtr < tkrTitle.length-1) { tkrCtr++; } else { tkrCtr=0; } setTimeout('newsticker()',5000); } "; return $js_source; } function get_current_entries() { $ctr = 0; $entries = ''; $pws = get_pwspath(); // load config file $config = $pws . "/conf/config.php"; file_exists($config) or die("Error loading page!"); require($config); // connect to db $conn = "$dbversion://$dbuser:$dbpass@$dbhost/$dbname"; require_once('DB.php'); $db = DB::connect($conn); $sql = "SELECT id, title, updated_date FROM ". $table_prefix; $sql .= "mod_article ORDER BY updated_date DESC LIMIT 10"; $res = $db->query($sql); while($data = $res->fetchRow(DB_FETCHMODE_ASSOC)) { $id = $data['id']; $title = $data['title']; $entries .= "tkrTitle[$ctr] = \"$title\";"; $entries .= "tkrLink[$ctr] = \"http://${source_http}index.php?module=article&view=$id\";"; $ctr = $ctr+1; } $db->disconnect(); return $entries; } function print_ticker_script() { $tkr = "
Ticker inactive.
"; $tkr .= ""; return $tkr; } ?>