PageRenderTime 55ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/ZengcodeLive V1.0/application/log/2008-11-11

https://github.com/zengcode/ZengCode-PHP-Framework
#! | 269 lines | 266 code | 3 blank | 0 comment | 0 complexity | fdeb5b8a386c2f22644d6ab296e50ba8 MD5 | raw file
Possible License(s): LGPL-2.1
  1. 09:11:28 : => Insert into comment (content_id,comment_detail,poster_name,posted_date) Values ("6","a
  2. b
  3. c
  4. d
  5. e
  6. f
  7. g","aaaa",now())
  8. 09:11:08 : => Insert into comment (content_id,comment_detail,poster_name,posted_date) Values ("7","นี้ครับโค้ด
  9. $sql = \"SELECT image, title,detail,date From data Where id=\'$id\' \";
  10. $result = mysql_db_query($dbname,$sql);
  11. $record = mysql_fetch_array($result);
  12. $image = $photoDir . mysql_result($result, 0, \'image\') ;
  13. $title = $record[title];
  14. $detail = $record[detail];
  15. $date = $record[date];
  16. $title=htmlspecialchars($title);
  17. $date=displaydate($date);
  18. echo \"<center>\";
  19. echo \"<Title>\". mysql_result($result, 0, \'title\'). \"</title>
  20. <table width=\'96%\' border=\'0\' style=\'font-family:MS Sans Serif;font-size:14;\'>
  21. <tr>
  22. <td width=\'600\' align=\'right\'><b>$date</b></td>
  23. </tr>
  24. <tr>
  25. <td><h3>$title </h3><br><br><br><img src=\'./images/dashline.gif\'></td>
  26. </tr>
  27. <tr>
  28. <td><center><img src=\'$image\'></center><br><br></td>
  29. </tr>
  30. <tr>
  31. <td width=\'600\'> </td>
  32. </tr>
  33. </table>\" ;
  34. echo \"</center><br>\";
  35. mysql_close();
  36. ?>
  37. </td>
  38. <tr>
  39. <td width=\"600\">
  40. <?php
  41. $detail=str_replace(chr(13).chr(10), chr(10), $record[\"detail\"]);
  42. $detail=str_replace(chr(10), chr(32), $detail);
  43. $detail=str_replace(chr(9), chr(32), $detail);
  44. while(strstr($detail, chr(32).chr(32))){
  45. $detail=str_replace(chr(32).chr(32), chr(32), $detail);
  46. }//End while
  47. $detail=wordwrap($detail, 400, \"thisistheendofline\", true);
  48. $detail=htmlspecialchars($detail);
  49. $detail=str_replace(\"thisistheendofline\", \"<br>\".chr(13).chr(10), $detail);
  50. echo $detail;
  51. ?>
  52. อตอนนผมกำลงเขยนเวบขาวอยครบคณสรนคอผมกองไป copy
  53. เอาเนอหาขาวจากเวบขาวเขามาใชยคร แตพอ copy มาวางอกษร
  54. จะออกมาไมสวยเรยงไมเปนระเบยบผมเลยยากไดโคดทเอาไวดเรยง
  55. กษรโดยอตโนมเมอผม copy เอาเนอหาขาวมาวางคร สรนพอ
  56. แกงไงกบโคดนางคร วยความนบถอคร ","pee",now())
  57. 09:11:31 : => Delete From comment Where comment_id = 10
  58. 09:11:36 : => Delete From comment Where comment_id = 10
  59. 09:11:30 : => Delete From comment Where comment_id = 10
  60. 09:11:55 : => Delete From comment Where comment_id = 10
  61. 09:11:47 : => Delete From comment Where comment_id = 10
  62. 09:11:04 : => Delete From comment Where comment_id = 10
  63. 09:11:36 : => Insert into comment (content_id,comment_detail,poster_name,posted_date) Values ("7","<p>a</p>
  64. <p>b</p>
  65. <p><i><b>c</b></i></p>
  66. <p><i><b>d</b></i></p>
  67. <p><i><b>e</b></i></p>
  68. <p><i><b>f</b></i></p>
  69. <p><i><b>g</b></i></p>","aaaaa",now())
  70. 09:11:12 : => Insert into comment (content_id,comment_detail,poster_name,posted_date) Values ("7","<p>...<img height=\"104\" width=\"100\" src=\"http://localhost/files/FckAjaxFileManage/uploaded/image/badtz-maru-toungeout.jpg\" alt=\"\" /></p>","aaa",now())
  71. 10:11:53 : => Insert into comment (content_id,comment_detail,poster_name,posted_date) Values ("7","<p><i><b>...sssssssssssssssssssssssss<br />
  72. dsffffffffffffffffffffffffffffff</b></i></p>","xxxxxxxxx",now())
  73. 11:11:36 : => Update static_content SET content_detail='<p><span style=\"font-family: Arial\"><img style=\"margin-right: 10px\" height=\"164\" alt=\"\" width=\"158\" align=\"left\" src=\"http://localhost/files/FckAjaxFileManage/uploaded/image/badtz-maru-toungeout.jpg\" /></span></p>
  74. <h3><span style=\"font-family: Arial\">&nbsp;สวัสดีครับแฟนๆ Madoogun.com ยินดีต้อนรับสู่บ้านใหม่ครับ</span></h3>
  75. <p><span style=\"font-family: Arial\"><b><span style=\"color: rgb(153,51,0)\">ZengCode Framework</span></b> ขอฝากเนื้อฝากตัวกับชาว Developer ทุกท่านด้วยนะครับ<br />
  76. ฒนาเองไมไดหวงวามนจะใชงานไดขนาดไปเทยบกบจางยทธจกรดานน <br />
  77. ไมาจะเป Prado หรอแมแต Cake งนนเคาระด<b><span style=\"color: rgb(153,51,0)\">เทพเรียกพี่</span></b>แล้วครับ<br />
  78. ผมกเปนแค Developer ธรรมดา คนนงคร<br />
  79. สราง Framework วนนมากเพอศกษา และพฒนาทกษะดาน OOP ของตวเอง</span><span style=\"font-family: Arial\"><br />
  80. กทงปกตวผมเองเขยนโคดไดวซวมาก ไมระเบยบ อยากเขยนอะไรคดออกกเขยน<br />
  81. ไมแบบแผน บางทกลบมาแกโคดตวเอง บอกไดคำเดยวว </span><b><span style=\"color: rgb(153,51,0)\"><span style=\"font-family: Arial\">เซ็งโครต เซ็ง โครต โครต </span></span></b><span style=\"font-family: Arial\"><br />
  82. และนงเปนทมาของช Framework ของผมคร<br />
  83. และอกประเดนกเพอจดประการใหองชาว Developer กทานชวยกนคดพฒนาสงตางๆ เพอวงการดาน IT<br />
  84. ของเราไดดเทยมนานาอารยะประเทศเคานะคร บผมขอเปนจดเลกๆจดนงทพรอมจะมงม<br />
  85. ฒนาผลงานดานนอไปคร นะพองชาว Developer กทาน</span></p>
  86. <p><span style=\"color: rgb(153,51,0)\"><b>ปล.</b></span>มีเรื่องรบกวนครับ หากพี่น้องคนไหนมีความรู้ความสามารถด้านการทำ Logo เกิดนึกสงสารผมขึ้นมา<br />
  87. จะชวยกรณาออกแบบใหผมกจะเปนพระคณมากคร ขอบคณไววงหนานะคร</p>' Where content_key = 'hello'
  88. 11:11:07 : => Update static_content SET content_detail='<p>dyeh yeh yeh</p>
  89. <p><textarea rows=\"10\" cols=\"50\" name=\"a\">aaaaaa</textarea></p>' Where content_key = 'download'
  90. 11:11:11 : => Update static_content SET content_detail='<p>yeh yeh yeh</p>' Where content_key = 'download'
  91. 13:11:05 : => Insert into content (category_id,content_name,content_summary,content_detail,post_date) Values ("1","A Simple Cache with PHP","<p>การทำ Cache แบบง่าย ๆ ด้วย php <br />
  92. ลองดละกนครบวางายดายขนาดไหน</p>","<p><code>&lt;?php<br />
  93. <span class=\"dark-code\">// start the output buffer</span><br />
  94. ob_start(); ?&gt;<br />
  95. <br />
  96. <span class=\"dark-code\">//Your usual PHP script and HTML here ...</span> <br />
  97. <br />
  98. &lt;?php<br />
  99. $cachefile = &quot;cache/home.html&quot;;<br />
  100. <span class=\"dark-code\">// open the cache file &quot;cache/home.html&quot; for writing</span><br />
  101. $fp = fopen($cachefile, \'w\'); <br />
  102. <span class=\"dark-code\">// save the contents of output buffer to the file</span><br />
  103. fwrite($fp, ob_get_contents()); <br />
  104. <span class=\"dark-code\">// close the file</span><br />
  105. fclose($fp); <br />
  106. <span class=\"dark-code\">// Send the output to the browser</span><br />
  107. ob_end_flush(); <br />
  108. ?&gt;</code></p>
  109. <p><code>เปนไงคร ายซะ อยางงหายเซงไปไดกน</code></p>
  110. <p>&nbsp;</p>",now())
  111. 13:11:54 : => Update content SET category_id='1',content_name='A Simple Cache with PHP',content_summary='<p>การทำ Cache แบบง่าย ๆ ด้วย php <br />
  112. ลองดละกนครบวางายดายขนาดไหน</p>',content_detail='<p><code>&lt;?php<br />
  113. <span class=\"dark-code\">// start the output buffer</span><br />
  114. ob_start(); ?&gt;<br />
  115. <br />
  116. <span class=\"dark-code\">//Your usual PHP script and HTML here ...</span> <br />
  117. <br />
  118. &lt;?php<br />
  119. $cachefile = &quot;cache/home.html&quot;;<br />
  120. <span class=\"dark-code\">// open the cache file &quot;cache/home.html&quot; for writing</span><br />
  121. $fp = fopen($cachefile, \'w\'); <br />
  122. <span class=\"dark-code\">// save the contents of output buffer to the file</span><br />
  123. fwrite($fp, ob_get_contents()); <br />
  124. <span class=\"dark-code\">// close the file</span><br />
  125. fclose($fp); <br />
  126. <span class=\"dark-code\">// Send the output to the browser</span><br />
  127. ob_end_flush(); <br />
  128. ?&gt;</code></p>
  129. <p>&nbsp;</p>
  130. <p>เพมเตมอกนดตรวจสอบซะหนอยวามนทำ Cache ไวหรอย</p>
  131. <pre><code>&lt;?php<br /><br />$cachefile = &quot;cache/home.html&quot;;<br /><br />if (file_exists($cachefile)) {<br /><br /> <span class=\"dark-code\">// the page has been cached from an earlier request</span><br /><br /> <span class=\"dark-code\">// output the contents of the cache file</span><br /><br /> include($cachefile); <br /><br /> <span class=\"dark-code\">// exit the script, so that the rest isnt executed</span><br /> exit;<br /><br />}<br /><br />?&gt;<br /><br />กำหนดอายุไขให้มันซะหน่อยมะ <br /></code><code>&lt;?php <br /><br /> <span class=\"dark-code\">// 5 minutes</span><br /> $cachetime = 5 * 60; <br /><br /> <span class=\"dark-code\">// Serve from the cache if it is younger than $cachetime</span><br /><br /> if (file_exists($cachefile) &amp;&amp; <br /> (time() - $cachetime &lt; filemtime($cachefile))) <br /> {<br /><br /> include($cachefile);<br /><br /> echo &quot;&lt;!-- From cache generated &quot;.date(\'H:i\', <br /> filemtime($cachefile)).&quot; <br /> --&gt;\\n&quot;;<br /><br /> exit;<br /><br /> }<br /><br />?&gt;</code></pre>
  132. <p><code>เปนไงคร ายซะ อยางงหายเซงไปไดกน</code></p>
  133. <p>&nbsp;</p>' Where content_id = 8
  134. 13:11:19 : => Update content SET category_id='1',content_name='A Simple Cache with PHP',content_summary='<p>การทำ Cache แบบง่าย ๆ ด้วย php <br />
  135. ลองดละกนครบวางายดายขนาดไหน</p>',content_detail='<h3 style=\"color: Red;\">มามะ</h3>
  136. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>&lt;?php<br />
  137. <span class=\"dark-code\">// start the output buffer</span><br />
  138. ob_start(); ?&gt;<br />
  139. <br />
  140. <span class=\"dark-code\">//Your usual PHP script and HTML here ...</span> <br />
  141. <br />
  142. &lt;?php<br />
  143. $cachefile = &quot;cache/home.html&quot;;<br />
  144. <span class=\"dark-code\">// open the cache file &quot;cache/home.html&quot; for writing</span><br />
  145. $fp = fopen($cachefile, \'w\'); <br />
  146. <span class=\"dark-code\">// save the contents of output buffer to the file</span><br />
  147. fwrite($fp, ob_get_contents()); <br />
  148. <span class=\"dark-code\">// close the file</span><br />
  149. fclose($fp); <br />
  150. <span class=\"dark-code\">// Send the output to the browser</span><br />
  151. ob_end_flush(); <br />
  152. ?&gt;</code></span></span></p>
  153. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">&nbsp;</span></span></p>
  154. <h3 style=\"color: Red;\"><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">เพิ่มเติมอีกนิดตรวจสอบซะหน่อยว่ามันทำ Cache ไว้หรือยัง</span></span></h3>
  155. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>&lt;?php<br />
  156. <br />
  157. $cachefile = &quot;cache/home.html&quot;;<br />
  158. <br />
  159. if (file_exists($cachefile)) {<br />
  160. <br />
  161. <span class=\"dark-code\">// the page has been cached from an earlier request</span><br />
  162. <br />
  163. <span class=\"dark-code\">// output the contents of the cache file</span><br />
  164. <br />
  165. include($cachefile); <br />
  166. <br />
  167. <span class=\"dark-code\">// exit the script, so that the rest isnt executed</span><br />
  168. exit;<br />
  169. <br />
  170. }<br />
  171. <br />
  172. ?&gt;<br />
  173. <br />
  174. กำหนดอายไขใหนซะหนอยมะ</code></span></span></p>
  175. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code> <br />
  176. </code><code>&lt;?php <br />
  177. <br />
  178. <span class=\"dark-code\">// 5 minutes</span><br />
  179. $cachetime = 5 * 60; <br />
  180. <br />
  181. <span class=\"dark-code\">// Serve from the cache if it is younger than $cachetime</span><br />
  182. <br />
  183. if (file_exists($cachefile) &amp;&amp; <br />
  184. (time() - $cachetime &lt; filemtime($cachefile))) <br />
  185. {<br />
  186. <br />
  187. include($cachefile);<br />
  188. <br />
  189. echo &quot;&lt;!-- From cache generated &quot;.date(\'H:i\', <br />
  190. filemtime($cachefile)).&quot; <br />
  191. --&gt;\\n&quot;;<br />
  192. <br />
  193. exit;<br />
  194. <br />
  195. }<br />
  196. <br />
  197. ?&gt;</code></span></span></p>
  198. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>เป็นไงครับ ง่ายซะ อย่างงี้ก็หายเซ็งไปได้อีกนิด</code></span></span></p>
  199. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">&nbsp;</span></span></p>' Where content_id = 8
  200. 20:11:47 : => Update content SET category_id='1',content_name='A Simple Cache with PHP',content_summary='<p>การทำ Cache แบบง่าย ๆ ด้วย php <br />
  201. ลองดละกนครบวางายดายขนาดไหน</p>
  202. <p><img height=\"104\" width=\"100\" src=\"http://localhost/files/FckAjaxFileManage/uploaded/image/badtz-maru-toungeout.jpg\" alt=\"\" /></p>',content_detail='<h3 style=\"color: Red;\">มามะ</h3>
  203. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>&lt;?php<br />
  204. <span class=\"dark-code\">// start the output buffer</span><br />
  205. ob_start(); ?&gt;<br />
  206. <br />
  207. <span class=\"dark-code\">//Your usual PHP script and HTML here ...</span> <br />
  208. <br />
  209. &lt;?php<br />
  210. $cachefile = &quot;cache/home.html&quot;;<br />
  211. <span class=\"dark-code\">// open the cache file &quot;cache/home.html&quot; for writing</span><br />
  212. $fp = fopen($cachefile, \'w\'); <br />
  213. <span class=\"dark-code\">// save the contents of output buffer to the file</span><br />
  214. fwrite($fp, ob_get_contents()); <br />
  215. <span class=\"dark-code\">// close the file</span><br />
  216. fclose($fp); <br />
  217. <span class=\"dark-code\">// Send the output to the browser</span><br />
  218. ob_end_flush(); <br />
  219. ?&gt;</code></span></span></p>
  220. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">&nbsp;</span></span></p>
  221. <h3 style=\"color: Red;\"><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">เพิ่มเติมอีกนิดตรวจสอบซะหน่อยว่ามันทำ Cache ไว้หรือยัง</span></span></h3>
  222. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>&lt;?php<br />
  223. <br />
  224. $cachefile = &quot;cache/home.html&quot;;<br />
  225. <br />
  226. if (file_exists($cachefile)) {<br />
  227. <br />
  228. <span class=\"dark-code\">// the page has been cached from an earlier request</span><br />
  229. <br />
  230. <span class=\"dark-code\">// output the contents of the cache file</span><br />
  231. <br />
  232. include($cachefile); <br />
  233. <br />
  234. <span class=\"dark-code\">// exit the script, so that the rest isnt executed</span><br />
  235. exit;<br />
  236. <br />
  237. }<br />
  238. <br />
  239. ?&gt;<br />
  240. <br />
  241. กำหนดอายไขใหนซะหนอยมะ</code></span></span></p>
  242. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code> <br />
  243. </code><code>&lt;?php <br />
  244. <br />
  245. <span class=\"dark-code\">// 5 minutes</span><br />
  246. $cachetime = 5 * 60; <br />
  247. <br />
  248. <span class=\"dark-code\">// Serve from the cache if it is younger than $cachetime</span><br />
  249. <br />
  250. if (file_exists($cachefile) &amp;&amp; <br />
  251. (time() - $cachetime &lt; filemtime($cachefile))) <br />
  252. {<br />
  253. <br />
  254. include($cachefile);<br />
  255. <br />
  256. echo &quot;&lt;!-- From cache generated &quot;.date(\'H:i\', <br />
  257. filemtime($cachefile)).&quot; <br />
  258. --&gt;\\n&quot;;<br />
  259. <br />
  260. exit;<br />
  261. <br />
  262. }<br />
  263. <br />
  264. ?&gt;</code></span></span></p>
  265. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\"><code>เป็นไงครับ ง่ายซะ อย่างงี้ก็หายเซ็งไปได้อีกนิด</code></span></span></p>
  266. <p><span style=\"font-size: larger;\"><span style=\"font-family: Arial;\">&nbsp;</span></span></p>' Where content_id = 8