str = ''; //Unmodified string $this->oldStr = ''; ///// // The below member variables define the link formatting // for example, for an email address, the default format ('mail:')would // produce a regular email link, as in estrabd@mvdev.com, // but say you had a page called 'contact.php' that produced a form using 'sendTo' in the query // string which you used to pass the email address, you would set the email format below // to './contact.php?sendTo=' . This produces a link such as // //// //URL link format $this->urlFormat = 'href='; //URL link target $this->urlTarget = '_new'; //Email link format $this->emailFormat = './contact.php?sendTo='; // Query string example: //$this->emailFormat='./contact.php?sendTo='; //Email link target $this->emailTarget = '_new'; } /** * Main method --> does parsing and replacing. */ function format($str = '') { $this->str = $str; $this->oldStr = $str; if (! $this->str == '') { //These regular expressions were borrowed from http://www.phpwizard.net . Thanks, guys! $this->str = eregi_replace("([^\"[[:alpha:]]|^)([[:alpha:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1urlFormat."\"\\2://\\3\\4\" target=\"".$this->urlTarget."\">\\3\\4", $this->str); $this->str = eregi_replace("(([A-Za-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", "emailFormat."\\1\" target=\"".$this->emailTarget."\">\\1", $this->str); # $this->str = eregi_replace("([^\:A-Za-z0-9]|^)(([A-Za-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", "\\1emailFormat."\\2\" target=\"".$this->emailTarget."\">\\2", $this->str); return $this->str; } } /** * Returns original string that was parsed. */ function getOldStr() { return $this->oldStr; } } class http_var { var $classname = "http_vars"; var $var; function set($variable,$value) { $this->var["$variable"] = $value; } function p($variable) { print $this->var["$variable"]; } function f($variable) { return $this->var["$variable"]; } } function updateCount($id) { $qid = new DB_Pecknet; $sql="select readCount from news where id='$id'"; $qid->query($sql); $qid->next_record(); $readCount=$qid->f("readCount")+1; $sql="update news set readCount='$readCount' where id='$id'"; $qid->query($sql); $qid->next_record(); } function box_open($title,$width,$bgcolor) { ?>
View Results query($sql); box_open('Latest Comments',100,'#ffffff'); while($qeid->next_record()) { ?>
  • f("id"));?> ">p("topic"); ?>
    by p("name"); ?> f("datestamp"); } box_close(); } function printnews($item,$limit) { box_open("
    " . $item->f("topic") . "" . date("l dS of F Y h:i:s A ",$item->f("datestamp")) . "
    ",100,'#FFFFFF'); ?> Posted by - p("name");?>

    f("image")) # { # $image = new Image("icons", basename($item->f("image"))); # $image->resize(93,70); # print "filename . "\" BORDER=0 VALIGN=TOP ALIGN=RIGHT " . $image->size . ">\n"; # } $linkObj = new Linker(); $body=$linkObj->format($item->f("body")); # Convert http:// into Hyper Links.. #$body=eregi_replace("([^\"]http://[a-zA-Z0-9_%=#&?\./\-]*[^\"])","\\1",$body); #$body=eregi_replace("([^/]+www.[a-zA-Z0-9_%=#&?\./\-]*[^\"])","\\1",$body); if($limit!=0) { if(eregi("(.*)",$body,$teaser)) { $summary=$teaser[1]; $diff=17; } else { $tmp=substr($body,0,$limit); $summary=ereg_replace("([\.?!])[^\.?!]*$","\\1",$tmp); $diff=0; } print $summary; if(strlen($summary)+$diff < strlen($item->f("body"))) { print "

    Continued...
    \n"; } } else { print "$body"; } box_close(); } function login($sess) { box_open('Login',0,'#ffffff'); ?>
    Username auth["uname"]?>">
    Password
    Forgot your password? Enter your email address and it will be emailed to you.
    ">
    Don't have an account? ">Apply online.
    ">Preferences
    ">Logout
    query($sql); if($q->num_rows()>0) { ?> ">
  • p("topic"); ?> by p("name")?> f("datestamp"));?> EST

    format($item->f("body")); ?>

    " . $body . ""; } else { $body = ereg_replace("\n\r\n","

    ",$body); } return($body); } function nav_thread($datestamp) { global $sess,$category; $q = new DB_Pecknet; ?>
    query($sqlprev); if($q->num_rows()>0) { $q->next_record(); printf ("purl($q->f(0) . ".html"); print "\">"; printf ("< %s",$q->f(4)); } else { echo " "; } ?> ">Back to Index $datestamp and parent = 0 order by datestamp limit 1"; } else { $sqlnext="select * from news where datestamp > $datestamp and parent = 0 and category=$category order by datestamp limit 1"; } $q->query($sqlnext); if($q->num_rows()>0) { $q->next_record(); printf ("purl($q->f(0) . ".html"); print "\">"; printf ("%s >",$q->f(4)); } else { echo " "; } ?>
    f("name") == $auth->auth["fullname"]) || ($perm->have_perm("admin"))) { ?> ">Edit | have_perm("admin")) { ?> ">Delete | purl("/reply.php3?eid=" . $item->f("id") . "&parent=" . $item->f("id") . "&topic=" . urlencode($item->f("topic"))); } else { $sess->purl("/reply.php3?eid=" . $item->f("id") . "&parent=" . $item->f("parent") . "&topic=" . urlencode($item->f("topic"))); } ?> ">Reply f("body") != "") { $datestamp = date("U"); $body = $array->f("body"); if($array->f("http")) { $array->set("body",preprocess($body,$array->f("method"))); } if($array->f("parent")==0) { printnews($array,0); } else { printcomment($array,preview); } ?> Here is a Preview of what your Post will look like. If you are satisfied then just hit the submit button. You can hit the preview button as many times as you like to see your changes.


    "> "> "> "> f("parent") == 0) { ?> have_perm("admin")) { ?>
    Name : p("name"); ?>
    Icon :
    Category
    Topic : " TYPE=TEXT SIZE=30>
    Post as