分页类,具备ajax分页功能

 

这个类是我经常使用的一个类,配合jquery实现ajax的分页,非常好用

最近在开发一个web2.0网站,纯ajax效果。。。

 

 

PHP代码
  1. <?php   
  2.   
  3. /*  
  4. PAGE CLASS  
  5. Copyright (C) 2004-2005 Harry Wang  
  6. GNU General Public License 321  
  7. This program is free software; you can  
  8. redistribute it and/or modify it under the  
  9. terms of the GNU General Public License as  
  10. published by the Free Software Foundation;  
  11. either version 2 of the License, or  
  12. (at your option) any later version.  
  13. This program is distributed in the hope that  
  14. it will be useful, but WITHOUT ANY WARRANTY;  
  15. without even the implied warranty of  
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR  
  17. PURPOSE. See the GNU General Public License  
  18. for more details.  
  19. You should have received a copy of the GNU  
  20. General Public License along with this  
  21. program; if not, write to the Free Software  
  22. Foundation, Inc., 59 Temple Place, Suite 330,  
  23. Boston, MA 02111-1307 USA  
  24. */  
  25. /**  
  26.  * 數據庫分頁類  
  27.  * 這個數據庫分頁類可以使用在帶有ADODB的數據庫中  
  28.  * @author      Weizhen Wang <harry34010493@gmail.com>  
  29.  * @version $Id: page.inc.php,v 1.19 2007/10/15 10:00:05 nbx Exp $  
  30.  * @example  /inc/example/page.example.php  
  31.  * 使用簡介:  
  32.  * $p = new ShowPage(根据?($DB), 表名字, 分頁條數, 具体sql語句(可選));     //建立新對象  
  33.  * $p->SetPageVar(pagecount);   //設置翻頁的標示,默認是’p’  
  34.  * $pVar = $p->GetPageVar();    //返回當前PageVar  
  35.  * $p->GetTotalPageArray();     //生成下拉菜單  
  36.  * $p->GetTotalPage();          //返回總頁數  
  37.  * $p->GetLeftSide();           //返回向左的箭頭  
  38.  * $p->GetRightSide();          //返回向右的箭頭  
  39.  * $p->GetCurrentPage();        //返回當前頁面  
  40.  * $p->GetLimit();              //返回每頁顯示條數            
  41.  * $p->GetRowFrom();            //返回Select語句用的當前Row的位置    E.G."SELECT * FROM SupplierLogin LIMIT " . $p->GetRowFrom() . ", " . $p->GetLimit();  
  42.  * $p->SetVar();                //設置同時需要傳送的參數  
  43.  */  
  44. class ShowPage   
  45. {   
  46.     /**  
  47.      * 左翻頁  
  48.      * @var string  
  49.      */  
  50.     var $outputLeftSide;   
  51.        
  52.     /**  
  53.      * 右翻頁  
  54.      * @var string  
  55.      */  
  56.     var $outputRightSide;   
  57.     var $file;   
  58.        
  59.     /**  
  60.      * 翻頁參數  
  61.      * @var string  
  62.      */  
  63.   
  64.        
  65.     /**  
  66.      * 當前頁  
  67.      * @var int  
  68.      */  
  69.     var $curr;   
  70.     var $varstr;   
  71.     var $tPage;   
  72.        
  73.     /**  
  74.      * 數據庫對象  
  75.      * @var DB  
  76.      */  
  77.     var $DB;   
  78.        
  79.     /**  
  80.      * 數據庫表名  
  81.      * @var string  
  82.      */  
  83.     var $table;   
  84.        
  85.     /**  
  86.      * 每頁顯示的數據條數  
  87.      * @var string  
  88.      */  
  89.     var $limit;   
  90.        
  91.     /**  
  92.      * SQL語句  
  93.      * @var string  
  94.      */  
  95.     var $sqlQuery;   
  96.     var $tPageArray;   
  97.     var $total;   
  98.     var $tRow;   
  99.     var $target = ‘_self’;   
  100.     var $maxPage = 0;   
  101.     /**  
  102.     * Paging style "option" or "listing"  
  103.     */  
  104.     var $style = "listing";   
  105.   
  106.     function ShowPage($DB$maxpage=0, $limit$sqlQuery = ""$pVar=‘p’) {       
  107.         $this->DB       = $DB;   
  108.         $this->table    = $table;   
  109.         $this->limit    = $limit;   
  110.         $this->sqlQuery = $sqlQuery;   
  111.            
  112.         $this->maxPage = ($maxpage>0)?$maxpage:0;   
  113.         $tmpGET = $_GET;   
  114.         $this->pVar = $pVar;   
  115.         //$this->pVar2 = $pVar;   
  116.         //echo $pVar;   
  117.         unset($tmpGET[$this->pVar]);   
  118.         $this->setVar($tmpGET);   
  119.   
  120.   
  121.         $tmpQuery = $sqlQuery;   
  122.   
  123.         //adodb hack start   
  124.   
  125.         if(DB_DRIVER == ‘pdo’)   
  126.         {   
  127.             $rs = $DB->query($tmpQuery);   
  128.             $rs = $DB->query("SELECT FOUND_ROWS()");   
  129.             $tPage = $rs->fetchColumn();   
  130.         }   
  131.         else  
  132.         {   
  133.             $rs = $DB->execute($tmpQueryor die(print_r($DB->ErrorInfo()));   
  134.             $tPage = $rs->RecordCount();   
  135.         }   
  136.         $this->tRow = $tPage;   
  137.   
  138.         $this->tPage = ($this->maxPage>0)?$this->maxPage:ceil($tPage / $this->limit);   
  139.         if ($this->tPage > 0)   
  140.         {   
  141.             for ($i = 1; $i < $this->tPage + 1; $i++)   
  142.             {   
  143.                 $this->tPageArray[] = $i;   
  144.             }   
  145.         }   
  146.         else  
  147.         {   
  148.             $this->tPageArray[] = 0;   
  149.         }   
  150.     }   
  151.   
  152.   
  153.     /**  
  154.      * 設置翻頁參數  
  155.      * @param string $pvar  翻頁參數  
  156.      */  
  157.     function SetPageVar($pvar = ‘p’)   
  158.     {       
  159.         // set type turnpage parameter (E.G. http://www.aa.com/index.php?p=1)   
  160.         $this->pVar = $pvar;   
  161.     }   
  162.   
  163.     /**  
  164.      * 返回總行數  
  165.      * @return  int  
  166.      */  
  167.   
  168.     function GetTotalRow()   
  169.     {   
  170.         return $this->tRow;   
  171.     }   
  172.   
  173.   
  174.     /**  
  175.      * 返回翻頁參數  
  176.      * @return string  
  177.      */  
  178.     function GetPageVar()   
  179.     {   
  180.         return $this->pVar;   
  181.     }   
  182.   
  183.   
  184.     /**  
  185.      * 返回當前頁數  
  186.      * @return int  
  187.      */  
  188.     function GetCurrentPage()   
  189.     {   
  190.         //echo $this->pVar;   
  191.         return  $_GET[$this->pVar];   
  192.     }   
  193.   
  194.   
  195.     /**  
  196.      * 返回總頁數數組  
  197.      * @return array  
  198.      */  
  199.     function GetTotalPageArray()   
  200.     {   
  201.         return $this->tPageArray;   
  202.     }   
  203.   
  204.   
  205.     /**  
  206.      * 返回總頁數  
  207.      * @return int  
  208.      */  
  209.     function GetTotalPage()   
  210.     {   
  211.         return $this->tPage;   
  212.     }   
  213.   
  214.   
  215.     /**  
  216.      * 返回每頁顯示條數  
  217.      * @return int  
  218.      */  
  219.     function GetLimit()   
  220.     {      
  221.         return $this->limit;   
  222.     }   
  223.   
  224.     /**  
  225.      * 返回數據行數  
  226.      * @return  int  
  227.      */  
  228.     function GetRowFrom()   
  229.     {   
  230.         if ($this->GetCurrentPage() <= 1)   
  231.         {   
  232.             return 0;   
  233.         }   
  234.         else  
  235.         {   
  236.             return ($this->GetCurrentPage() – 1) * $this->GetLimit();   
  237.         }   
  238.     }   
  239.   
  240.   
  241.     /**  
  242.      * 返回朝左翻  
  243.      * @return  string  
  244.      */  
  245.     function GetLeftSide()   
  246.     {   
  247.         $current = $_GET[$this->pVar];   
  248.            
  249.            
  250.         if (!$current)   
  251.         {   
  252.             $current = 1;   
  253.         }   
  254.   
  255.         if ($current<1)   
  256.         {   
  257.             $current = 1;   
  258.         }   
  259.   
  260.         if ($current>$this->tPage)   
  261.         {   
  262.             $current = $this->tPage;   
  263.         }   
  264.   
  265.         if ($this->tPage > 1)   
  266.         {   
  267.             $this->outputLeftSide = ;   
  268.             if ($current > 10)   
  269.             {   
  270.                 $this->outputLeftSide = ‘<a href=’.$this->file.‘?’.$this->pVar.‘=1’.($this->varstr).‘ title="First Page" class="p_num" target=’.$this->target.‘>|<</a> ‘;   
  271.             }   
  272.             if ($current > 1)   
  273.             {   
  274.                 $this->outputLeftSide .= ‘<a href=’.$this->file.‘?’.$this->pVar.‘=’.($current-1).($this->varstr).‘ title="Previous Page" class="p_num" target=’.$this->target.‘>上一页</a> ‘;   
  275.             }   
  276.         }   
  277.            
  278.         return str_replace(‘"’, "‘", $this->outputLeftSide);  
  279.     }  
  280.  
  281.       
  282.     /**  
  283.      * 返回朝右翻  
  284.      * @return  string  
  285.      */  
  286.     function GetRightSide() {  
  287.         $current = $_GET[$this->pVar];  
  288.  
  289.         if (!$current) {  
  290.             $current = 1;  
  291.         }  
  292.  
  293.         if ($current>$this->tPage) {  
  294.             $current = $this->tPage;  
  295.         }  
  296.  
  297.         if ($current<1) {  
  298.             $current = 1;  
  299.         }  
  300.  
  301.         if ($this->tPage > 1) {       
  302.             $this->outputRightSide = ‘‘;  
  303.             if ($current<$this->tPage) {  
  304.                 $this->outputRightSide = ‘<a href=‘.$this->file.’?‘.$this->pVar.’=‘.($current+1).($this->varstr).’ title="Next Page" class="p_num" target="‘.$this->target.’">下一页</a> ‘;  
  305.             }  
  306.             if ($this->tPage>10 && ($this->tPage-$current)>=10 ) {  
  307.                 $this->outputRightSide .= ‘<a href=’.$this->file.’?’.$this->pVar.’=’.$this->tPage.($this->varstr).’ title="Last Page" class="p_num" target="‘.$this->target.’">>|</a>’;  
  308.             }  
  309.         }  
  310.           
  311.         return str_replace(‘"‘, "’", $this->outputRightSide);   
  312.     }   
  313.   
  314.        
  315.     /**  
  316.      * 返回一個完整的翻頁選項  
  317.      * 包含了向左翻(<< <), 直接選擇頁面數字, 向右翻(> >>), 和所需要的Javascript  
  318.      * @return string  
  319.      */  
  320.     function GetFullSide() {   
  321.            
  322.         if($this->style == "options")   
  323.         {   
  324.             $sCenter = "<select onChange=’fnJump(this.value)’ name=’select’>\n";   
  325.             $pages = $this->GetTotalPageArray();   
  326.             foreach($pages as $page) {   
  327.                 $selected = "";   
  328.                 if($page == $this->GetCurrentPage())$selected = "selected";   
  329.                 $sCenter .= "   <option value=\"$page\" $selected>$page</option>\n";   
  330.             }   
  331.             $sCenter .= "</select>\n";   
  332.             $sScript = $this->GetTurnPageScript();   
  333.         }   
  334.         else  
  335.         {   
  336.             $sCenter = "";   
  337.             $pages = $this->GetTotalPageArray();   
  338.             foreach($pages as $page) {   
  339.                 if($this->GetCurrentPage()-$page>=4)continue;   
  340.                 if($page >= $this->GetCurrentPage()+4)break;   
  341.                 $sCenter .= "<a href=\"".$_SERVER[‘PHP_SELF’]."?".$this->GetPageVar()."=$page"."&".($this->varstr). "\" class=’p_num’ target=’$this->target’>";   
  342.                 if($page == $this->GetCurrentPage())   
  343.                 {   
  344.                     $sCenter .= "<strong>".$page."</strong>";   
  345.                 }else $sCenter .= $page;   
  346.                 $sCenter .= "</a>\n";   
  347.             }   
  348.             $sScript = "";   
  349.         }   
  350.         $sLeftSide = $this->GetLeftSide();   
  351.         $sRightSide = $this->GetRightSide();   
  352.         return ($sLeftSide ."\n"$sCenter ."\n"$sRightSide ."\n"$sScript);   
  353.     } // end func   
  354.   
  355.        
  356.     /**  
  357.      * 返回Sql語句  
  358.      * @return string  
  359.      */  
  360.     function GetNewSql() {   
  361.         return $this->sqlQuery . " LIMIT " . $this->GetRowFrom() . ", " . $this->GetLimit();   
  362.     } // end func   
  363.   
  364.        
  365.     /**  
  366.      * 返回翻頁時所需的Javascript  
  367.      * @return string  
  368.      */  
  369.     function GetTurnPageScript() {   
  370.         return  "<SCRIPT LANGUAGE=\"JavaScript\">\n" .    
  371.                 "<!–\n" .    
  372.                 "function fnJump(page)\n" .    
  373.                 "{\n" .   
  374.                 "location.href=’".$_SERVER[‘PHP_SELF‘]."?" . $this->GetPageVar() ."=’+page" . "+’".($this->varstr) . "’;\n" .    
  375.                 "}\n" .    
  376.                 "//–>\n" .    
  377.                 "</SCRIPT>\n";   
  378.     } // end func   
  379.   
  380.        
  381.     /**  
  382.      * 設置其它參數  
  383.      * 設置翻頁時需要通過用GET方法一同傳送過去的其他參數  
  384.      * @param  array $data  
  385.      */  
  386.     function setVar($data) {       
  387.         // set the turnpage addition value need to transfer by get mode   
  388.         foreach ($data as $k=>$v) {   
  389.             $this->varstr.=‘&’.$k.‘=’.urlencode($v);   
  390.         }   
  391.     }   
  392.   
  393.   
  394. }   
  395.   
  396.   
  397.   
  398.   
  399.   
  400. class ajax_ShowPage extends ShowPage   
  401. {   
  402.     var $func;   
  403.     var $currentpage;   
  404.     function ajax_ShowPage($DB$table$limit$sqlQuery = ""$function=‘ShowPage([page])’$currentpage$target=)   
  405.     {   
  406.         $this->ShowPage($DB$table$limit$sqlQuery);   
  407.         $this->func = $function;   
  408.         $this->currentpage = ($currentpage)?$currentpage:1;   
  409.         $this->target = $target;   
  410.     }   
  411.   
  412.   
  413.     function ajaxGetCurrentPage()   
  414.     {   
  415.         return $this->currentpage;   
  416.     }   
  417.   
  418.   
  419.     function ajaxGetRowFrom()   
  420.     {   
  421.         if ($this->ajaxGetCurrentPage() <= 1) {   
  422.             return 0;   
  423.         }   
  424.         else {   
  425.             return ($this->ajaxGetCurrentPage() – 1) * $this->GetLimit();   
  426.         }   
  427.     }   
  428.   
  429.        
  430.   
  431.     function ajaxGetNewSql()   
  432.     {   
  433.         return $this->sqlQuery . " LIMIT " . $this->ajaxGetRowFrom() . ", " . $this->GetLimit();   
  434.     }   
  435.   
  436.     function ajaxLeftSide() {   
  437.         $current = $this->currentpage;   
  438.         //echo $current ;   
  439.            
  440.         if (!$current) {   
  441.             $current = 1;   
  442.         }   
  443.   
  444.         if ($current<1) {   
  445.             $current = 1;   
  446.         }   
  447.   
  448.         if ($current>$this->tPage) {   
  449.             $current = $this->tPage;   
  450.         }   
  451.   
  452.         if ($this->tPage > 0) {               
  453.             //if ($current > 10) {   
  454.                 $this->outputLeftSide = ‘<a href="JavaScript:’.$this->func."(‘1’)".’"  title="" class="p_num" target="_self">第一页</a> ‘;   
  455.             //}   
  456.             if ($current > 1) {   
  457.                 $this->outputLeftSide.= ‘<a href="JavaScript:’.$this->func."(".($current-1).")".’" title="" class="p_num" target="_self">上一页</a> ‘;   
  458.             }else{   
  459.                 $this->outputLeftSide.= ‘<a href="JavaScript:’.$this->func."(".($current).")".’" title="" class="p_num" target="_self">上一页</a> ‘;   
  460.             }   
  461.         }   
  462.            
  463.         return $this->outputLeftSide;   
  464.     }   
  465.   
  466.   
  467.     function ajaxRightSide() {   
  468.         $current = $this->currentpage;   
  469.            
  470.         if (!$current) {   
  471.             $current = 1;   
  472.         }   
  473.   
  474.         if ($current<1) {   
  475.             $current = 1;   
  476.         }   
  477.   
  478.         if ($current>$this->tPage) {   
  479.             $current = $this->tPage;   
  480.         }   
  481.   
  482.         if ($this->tPage > 0) {               
  483.             if ($current<$this->tPage) {   
  484.                 $this->outputRightSide = ‘<a href="JavaScript:’.$this->func.‘(\”.($current+1).‘\’)" title="Next Page" class="p_num" target="_self">下一页</a> ‘;   
  485.             }else{   
  486.                 $this->outputRightSide = ‘<a href="JavaScript:’.$this->func.‘(\”.($current).‘\’)" title="Next Page" class="p_num" target="_self">下一页</a> ‘;   
  487.             }   
  488.            // if ($this->tPage>10 && ($this->tPage-$current)>=10 ) {   
  489.                 $this->outputRightSide .= ‘<a href="JavaScript:’.$this->func.‘(\”.$this->tPage.‘\’)"  title="Next 10 Page" class="p_num" target="_self">最后</a>’;   
  490.             //}   
  491.         }   
  492.            
  493.         return $this->outputRightSide;   
  494.     }   
  495.        
  496.        
  497.     function ajaxGetFullSide() {   
  498.         $sLeftSide = $this->ajaxLeftSide();   
  499.         $sRightSide = $this->ajaxRightSide();   
  500.         if($this->style == "options")   
  501.         {   
  502.             $sCenter = "<select onChange=’fnJump(this.value)’ name=’select’>\n";   
  503.             $pages = $this->GetTotalPageArray();   
  504.             foreach($pages as $page) {   
  505.                 $selected = "";   
  506.                 if($page == $this->ajaxGetCurrentPage())$selected = "selected";   
  507.                 $sCenter .= "   <option value=\"$page\" $selected>$page</option>\n";   
  508.             }   
  509.             $sCenter .= "</select>\n";   
  510.             $sScript = $this->ajaxGetTurnPageScript();   
  511.         }   
  512.         else  
  513.         {   
  514.             $sCenter = "";   
  515.             $pages = $this->GetTotalPageArray();   
  516.             foreach($pages as $page) {   
  517.                 if($this->currentpage-$page>=5)continue;   
  518.                 if($page >= $this->currentpage+5&$this->tPage-$page>2)continue;   
  519.                 $sCenter .= ‘<a href="JavaScript:’.$this->func."(‘".$page."’)".’" class="p_num" target="_self">’;   
  520.                 //echo $this->GetCurrentPage();   
  521.                 if($page ==$this->currentpage)   
  522.                 {   
  523.                     $sCenter .= "<strong><font color=red>".$page."</font></strong>";   
  524.                 }else $sCenter .= $page;   
  525.                 $sCenter .= "</a>\n";   
  526.             }   
  527.             $sScript = "";   
  528.         }   
  529.         return ($sLeftSide ."\n"$sCenter ."\n"$sRightSide ."\n"$sScript);   
  530.     }    
  531.   
  532.   
  533.   
  534.     function ajaxGetTurnPageScript()   
  535.     {   
  536.         return  "<SCRIPT LANGUAGE=\"JavaScript\">\n" .    
  537.                 "<!–\n" .    
  538.                 "function fnJump(page)\n" .    
  539.                 "{\n" .   
  540.                 "   ".$this->func."(page);\n" .    
  541.                 "}\n" .    
  542.                 "//–>\n" .    
  543.                 "</SCRIPT>\n";   
  544.     } // end func   
  545.   
  546. }   
  547. ?>  

一个pdo,session入库的类

 

PHP代码
  1. <?php   
  2. class session {   
  3.     public $lifeTime;   
  4.     private $db;   
  5.     private $table;   
  6.   
  7.     function __construct($db$table)   
  8.     {   
  9.         $this->db=$db;   
  10.         $this->table=$table;   
  11.     }   
  12.   
  13.   
  14.     function open($savePath$sessName)   
  15.     {   
  16.        $this->lifeTime = get_cfg_var("session.gc_maxlifetime");   
  17.        if(!$dbHandle || !$dbSel)return false;   
  18.        return true;   
  19.     }   
  20.   
  21.   
  22.     function close()   
  23.     {   
  24.         $this->gc(ini_get(‘session.gc_maxlifetime’));   
  25.         return ture;   
  26.     }   
  27.   
  28.   
  29.     function read($sessID)   
  30.     {   
  31.         $res = $this->db->query("SELECT session_data AS d FROM $this->table  
  32.                             WHERE session_id = ‘$sessID’  
  33.                             AND session_expires > ".time());   
  34.         if($row = $res->fetch())return $row[‘d’];   
  35.         return "";   
  36.     }   
  37.   
  38.   
  39.     function write($sessID,$sessData)   
  40.     {   
  41.         $newExp = time() + $this->lifeTime;   
  42.         $res = $this->db->query("SELECT count(*) FROM $this->table WHERE session_id = ‘$sessID’");   
  43.         if($res->fetchColumn())   
  44.         {   
  45.             $aff = $this->db->exec("UPDATE $this->table  
  46.                          SET session_expires = ‘$newExp’,  
  47.                          session_data = ‘$sessData’  
  48.                          WHERE session_id = ‘$sessID’");   
  49.             if($aff)return true;   
  50.         }   
  51.         else  
  52.         {   
  53.             $aff = $this->db->exec("INSERT INTO $this->table (  
  54.                          session_id,  
  55.                          session_expires,  
  56.                          session_data)  
  57.                          VALUES(  
  58.                          ‘$sessID’,  
  59.                          ‘$newExp’,  
  60.                          ‘$sessData’)");   
  61.             if($aff)return true;   
  62.         }   
  63.         return false;   
  64.     }   
  65.   
  66.   
  67.     function destroy($sessID)   
  68.     {   
  69.         $aff = $this->db->exec("DELETE FROM $this->table WHERE session_id = ‘$sessID’");   
  70.         if($aff)return true;   
  71.         return false;   
  72.     }   
  73.   
  74.   
  75.     function gc($sessMaxLifeTime)   
  76.     {   
  77.         $aff = $this->db->exec("DELETE FROM $this->table WHERE session_expires < ".time(),$this->dbHandle);   
  78.         return $aff;   
  79.     }   
  80. }   
  81.   
  82.   
  83. $pdo_session = new session($db1‘user_sessions’);   
  84. session_set_save_handler(array($pdo_session,"open"),   
  85.                          array($pdo_session,"close"),   
  86.                          array($pdo_session,"read"),   
  87.                          array($pdo_session,"write"),   
  88.                          array($pdo_session,"destroy"),   
  89.                          array($pdo_session,"gc"));   
  90.   
  91. ?>  

长假后的第一天上班

今天起了个大早,其实平常也都是6点多起床的,这里我要非常感谢小猪,每天都叫我起床,谢谢了!

今天早上下了大雨,终于气温降了些,五月天35度的温度确实有些难受。

来公司首先把放假前的一些没做完的事做完,然后在网上看了下最新的技术方面资讯,现在还在写一个简单的推荐、评论与标签的管理后台。

朋友学PHP,处于入门阶段,写的一个简单例子

朋友初学PHP,对于操作数据库方面有问题,所以写了个最简单的循环输出的例子.

一直以来用的都是自己写的数据库类来操作数据库,突然发现有些mysql函数都打错了,,汗

 

PHP代码
  1. <?php   
  2. $link = mysql_connect(‘localhost’‘root’‘root’)  or die(‘连接数据库出错 ‘ . mysql_error());//   
  3. mysql_select_db(‘mysql’or die(‘没有选取数据库’);   
  4. $sql="select * from `user`";   
  5. $result = mysql_query($sqlor die(‘SQL请求出错’ . mysql_error());   
  6. while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {   
  7.    echo $line[‘User’];   
  8. }   
  9. ?>  

近期业余安排,有得忙了。汗

1、帮深圳一同学整个企业网站。

2、在淘宝开一家店铺,做做电子商务。

3、帮朋友在南昌的一家连锁店整个网站。

4、天与海工作室改名蓝叶工作室,网站要重做。

5、蓝叶休闲网开工。

这几天买个床上用的笔记本桌子,在床上做事应该比较爽。。

找个好点的房子搬家,现在的房子有些小,有点热,有点让人受不了。。。

再买个无线路由器,省得从别人家拉线麻烦,自己单独装宽带也不合算。

昨天游西湖时拍的一些照片

放假放得早,同学在五一前这几天都要上班,就我一个人闲。

无聊闷得慌,就一个人走着公交闲逛,反正公交有空调。凉快

今天上传完图片,继续闲逛

是用手机拍的效果不是很好,moto的摄像头就是差

moto_0010.jpgmoto_0011.jpgmoto_0012.jpgmoto_0013.jpgmoto_0014.jpgmoto_0015.jpgmoto_0016.jpgmoto_0017.jpgmoto_0018.jpgmoto_0019.jpgmoto_0020.jpgmoto_0021.jpgmoto_0022.jpgmoto_0023.jpgmoto_0024.jpgmoto_0025.jpgmoto_0026.jpgmoto_0027.jpgmoto_0028.jpgmoto_0029.jpgmoto_0030.jpgmoto_0031.jpgmoto_0032.jpgmoto_0033.jpgmoto_0034.jpgmoto_0035.jpgmoto_0036.jpgmoto_0037.jpgmoto_0038.jpgmoto_0041.jpgmoto_0042.jpgmoto_0043.jpgmoto_0044.jpgmoto_0045.jpgmoto_0046.jpgmoto_0047.jpgmoto_0049.jpgmoto_0050.jpgmoto_0052.jpgmoto_0053.jpgmoto_0054.jpgmoto_0055.jpgmoto_0056.jpgmoto_0057.jpgmoto_0058.jpgmoto_0059.jpgmoto_0060.jpgmoto_0061.jpgmoto_0062.jpgmoto_0063.jpgmoto_0064.jpgmoto_0065.jpgmoto_0066.jpgmoto_0067.jpgmoto_0069.jpg

想做一个多用户flash的音乐播放器给QQ空间、Blog用户使用

今天在网上想找个可以申请的

音乐播放器都找了N久,没看到哪个比较好用的。

突然觉得自己可以做个这个多用户我音乐播放器系统

准备去网上找些flash的音乐播放器外观。主要利用flash音乐播放器(带播放列表)+XML+php+mysql来做

申请后会自动生成一段代码,直接复制到QQ空间或是blog的模板里就行了。

一句话把人逗乐的经典!(新版)

一句话把人逗乐的经典!(新版)

如果白痴会飞,那我的公司简直是个机场。

  所有的男人生来平等,结婚的除外。

  咱们是否可以找个地方喝上一杯,交个朋友?或者说,还是我直接给把钱包给你?

  我想,只要我再稍微具有一些谦虚的品质,我就是个完美的人了。

  如果您需要咨询或建议,我们将免费提供;如果您需要正确的答案,请您另外付费。

  过去,闹钟响的时候,我常常有把它拍了再继续睡的毛病,但是自从我在闹钟旁边放了三个老鼠夹之后,我的毛病就根除了。

  如果说贝多芬是交响乐之父,那么是不是说贝多芬的父亲是交响乐之爷?

  我做过很多愚蠢的事情,但是我毫不在乎,我的朋友把它叫做自信。

  盲人协会真诚劝告您:千万不要酒后驾车。

  我想我应该去减肥了,上次献血的时候,居然流出了一百毫升的猪油。

  把俩条虫子做实验。威士忌里的那条死了,证明喝威士忌肚子里不长虫子。

  我的创造力高得无法形容,我的工作能力强得无法形容,我的文字能力妙得无法形容。

  假如计算机每重启一次,比尔盖茨都可以得到一元钱,那么他可要发了。

  十年后,法院第二次判杀人犯死刑。

  我假装为老板工作,老板假装付给我薪水。

  我和妻子已经18个月没说话了,我没机会打断她。

  有没有听过大猪说有,小猪说没有的故事?

  我从来不看电视,我只不过是经常核对一下报纸上的电视节目有没有印错。

  你的眼睛就象天上的明月,一只初一;一只十五。

  你这个孩子怎么不懂事啊?舅舅正在这里,你怎么还会想到要去动物园看狗熊?

  我的视力很差,比如说,看见那边墙上那颗图钉没有?你看得见吧,而我就看不见。

  每天我都不断地刷新一项世界纪录"我在世界上已经生活的天数。

  在因特网世界,你的女朋友可能是一位男性,而你的男朋友可能是一位女性,这很痛苦,但你得接受。

  你的射击成绩真是太糟了,我要是你,我就立刻自杀,为以防万一你要多带一些子弹的。

  如果你要和老虎比谁更能挨饿,那你赢定了。

  我把电视遥控器别在腰上,作出一付买了新手机的样子。

  只是有钱并不能让人幸福,所以我还偷些珠宝、邮票、手表什么的

  生活真是没劲儿,上个月我的一个哥们儿向我借了4000块钱,说要去做一个整形手术,结果现在我完全不知道他变成什么模样了

  抢劫者须知:本行职员只懂西班牙语,请您抢劫时一定要有耐心,最好携带翻译一名,谢谢!

  你瞎了眼啊?这么大的盾牌你看不见,偏偏要把石头朝我脑袋上扔!

  各位!今天是我太太30岁生日10周年纪念日!

  钱输光了,家具也输光了,衣服也输光了,我现在出门像一个阿拉伯人.

  我比较健忘,于是老婆常叮嘱我,说下雨天外出办事千万别拉了雨伞,所以家里现在已经有十把雨伞了.

  除了一项,其余栏目填得都挺好,关系这一栏应该填岳母,而不应该填紧张。

  爸爸今天打了我两次,第一次是因为看见了我手里两分的成绩单,第二次是因为成绩单是他小时候的。

  悲剧好比是我不小心切掉了自己的小手指;喜剧好比是你不小心掉进了下水道。

  争吵的时候,男人和女人的区别就像是步枪和机关枪的区别。

  下面,我将公布史密斯先生的遗嘱,在公布遗嘱之前,我想满怀诚意地问一句,史密斯夫人,您是否愿意接受我的求婚?

  别骂自己的孩子是小兔崽子,因为从遗传学的角度来讲,这对家长是不利的。

  老婆,我不该用床单擦皮鞋,不过出差刚回来,一时半会儿还改不过来,我错了。

  为提高产品的安全性,我们决定在可乐瓶子瓶盖上加印:请打开这一端;在瓶底上加印:请打开另一端。

  记者:根据最近一项民意调查显示,国民对国内外时事的关心度很低,议员先生,您对此有何看法?议员:没有看法,我不关心

  玛丽,如果你不答应嫁给我,我就立刻去自杀,这是我的一贯做法。

  选择题:假如律师和政客同时掉进河里,请问你是去喝咖啡还是去看电影?

  如果不是发生在我身上的话,那么这件事可真是太好笑了。

  您想拥有一副好的牙齿吗?这里送给你三点经验:一、饭后漱口早晚刷牙;二、每两年去医院检查一次牙齿;三、少管闲事。

  秀发去无踪,头屑更出众!

  我们总是认为脑子是人体最重要的器官,但是别忘了这个判断是谁做的.

  在教堂听讲经的时候我们应该保持肃静,打扰别人睡觉是很不礼貌的。

  这些不是破烂!是我收集的古董!当然,如果你不喜欢的话,你可以扔掉.

  人工智能和天然愚蠢无法相提并论"因为我们主张纯天然.

  一个人如果面对众人批评仍微笑自如,那么他很可能已经找到了替罪羊.

  昨天我报名参加了一个减肥训练班,他们要我在训练时穿宽松衣服,岂有此理?如果还有宽松衣服,那我还来报名干嘛?