Come master: php problem, urgent! Urgent! Urgent!

Answers:1   |   LastUpdateAt:2012-03-13 18:22:22  

Question
Spring
Asked at 2012-03-13 18:20:54
Our center, where the work came across a problem is how to modify the list of news sources php title and color that can control various news programs, the number of words in headlines, but to change the font can not be achieve, ask a teacher! Thank you! The code is: function pas_list ($ blockname, $ num = "8", $ zishu = "30", $ class = "", $ front = "" $ new = "", $ append = "" $ more = "0", $ two = "0") {$ db = new DB (), $ db-connect (), $ query = "Select` p_id `,` title `,` postername `,` `modifytime , `type`, `info`, `source` of. '" PASSAGE. "` Where `blockname '='". $ Blockname. "'And` State `= '1' ORDER BY` priority `DESC,` p_id `DESC LIMIT 0, $ num;" / / echo $ query, $ db-query ($ query); $ = $ db-numfetch numRows (); echo "table border = " 0 "width = " 100 % "cellpadding = " 0 "cellspacing = " 0 " n t" if ($ forward == "") {$ front = "li"} else $ front = "img src =" $ front '"/ / $ again no matter / / $ add $ i = 1 while ($ array = $ db-fetchArray ()) {if ($ double == "1") {if ($ i% 2 == "1") echo "tr n t t";} else echo "tr n t t" echo " td. "$ class" a href = '". $ front.". "/ / Since the design of the document hyperlink if ($ array [" type "] ==" 1 ") {echo $ array [" info "];} else {echo ARTICLEPATH." Adisplay.php? id = ". $ Array ['p_id'] ;/ /. $ Array [" type "]." Gsre "} echo" ". $ Class." Title = "Title". $ Array ["title"] " n source:" if ($ array ["source"] == "") {echo $ array ["postername"];}. else {echo $ array ["source"];} echo " n Time:". $ Array ["modifytime"]; echo "" target = _blank ".. substr_cut ($ array [" title "], $ zishu)" / a "if ($ append ==" time ") {/ / echo "span style = " color: blue "[" .. substr ($ array ["publishtime"], 5.5) "] / span" echo "span style = " font-size: 12px; COLOR: # 525252; line-height: 18px; FONT-FAMILY: Verdana, Arial "[" .. substr ($ array ["modifytime"], 5.5) "] / span";} echo "/ td ​​ n t "if ($ double ==" 1 ") {if ($ i% 2 ==" 0 ") echo" / tr n t t ";} else echo" / tr n t t ", $ i + +;} if ($ more ==" 0 ") {if ($ num = $ numfetch) {echo" tr n "echo" td align = right "if ($ double == "1") echo "colspan = 2" if ($ blockname = "dynamic fax") {echo "a href =". ROOTURL. "Model / more.php? name = ". $ blockname" target = "_blank" more / a / td n t. ";} else {echo" a href = ". ROOTURL." Model / picmore.php? target name = Fax dynamic = '_blank' more / a / td n t ";} echo" / tr n ";}} echo" / table n ", $ db-close ();}
Answer1 ● __ Jueban cake relic -Answered at 2012-03-13 18:22:22
{ If ( $ double == " 1") { if ( $ i % 2 == " 1" ) echo "tr n t t"; } elseecho "tr n t t" echo " td ". $ Class . "". $ Front " a href =" " ;/ / design document as a hyperlink if ( $ array [ " type " ] ==" 1 ") { echo $ array [ " info "]; }. More {echo ARTICLEPATH . " adisplay.php ? id = " . $ Array [ ' p_id ' ] ;/ / . $ Array [ " type " ] . " Gsre "} / * In the above code in the" a href "of" a "and " href " , with between the font style you can change the title text style ! * /
Related Questions
1
  • Answer This Question:Come master: php problem, urgent! Urgent! Urgent!