Inspirator: His Divine Holiness Acharya Swamishree Purushottampriyadasji Maharaj  
Updates
News


"; $result = mysql_query($query) or die("Query failed: " . mysql_error()); // print "row count=" .$numrows . "

"; /* Print HTML */ while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if (($row['target'] == "") || ($row['target'] == "_self")) { $target=" "; } else { $target="target='_blank'"; } $pplink = str_replace("www.swaminarayangadi.com",$ppserver,$row['link']); print "" . $row['title'] . "
"; print $row['description'] . "
"; print "" . ppDateConvert($row['pubdate'], "d M Y") . "
"; print "
"; } // calculate max pages $maxPage = ceil($numrows/$rowsPerPage); $self = $_SERVER['PHP_SELF']; // creating 'previous' and 'next' link // plus 'first page' and 'last page' link // print 'previous' link only if we're not // on page one if ($pageNum > 1) { $page = $pageNum - 1; $prev = " [Prev] "; $first = " [First Page] "; } else { $prev = ' [Prev] '; // we're on page one, don't enable 'previous' link $first = ' [First Page] '; // nor 'first page' link } // print 'next' link only if we're not // on the last page if ($pageNum < $maxPage) { $page = $pageNum + 1; $next = " [Next] "; $last = " [Last Page] "; } else { $next = ' [Next] '; // we're on the last page, don't enable 'next' link $last = ' [Last Page] '; // nor 'last page' link } // build page links $maxDisplayPage = 10; $pagelinks = $first . $prev; $counter = 1; while ( $counter <= $maxPage ) { if ($counter==$pageNum) { $pagelinks = $pagelinks . "" . $counter . " "; } else { $pagelinks = $pagelinks . "" . $counter . " "; } $counter = $counter + 1; } echo "

".$pagelinks . $next . $last; "

" ; // print the page navigation link //echo $first . $prev . " $pageNum of $maxPage pages " . $next . $last; include '../../../scripts/dbclose.php'; ?>

© Swamibapa Pipe Band, USA
© Shree Swaminarayan Gadi Sansthan