function write() { global $sg; $this->fin(); $sql = "insert into access_log (log_date,accept_date,proc_time,status,url,uri,from_ip,from_addr,referer,referer_full,ua,\r\ncarrier,ment_flg,option1,option2,option3,option4,option5,option6) values (\r\nsysdate(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; $db = new DBLib($sg); $db->connect(); $db->prepare($sql); $db->bind(date("Y/m/d H:i:s", $this->accept_date / 1000)); $db->bind(floor($this->proc_time)); $db->bind($this->status); $db->bind($this->url); $db->bind($this->uri); $db->bind($this->from_ip); $db->bind($this->from_addr); $db->bind($this->referer); $db->bind($this->referer_full); $db->bind($this->ua); $db->bind($this->carrier); $db->bind($this->ment_flg); $db->bind($this->option1); $db->bind($this->option2); $db->bind($this->option3); $db->bind($this->option4); $db->bind($this->option5); $db->bind($this->nowment); $r = $db->execute_update(false); if (!$r) { print ht(mysql_error()); $db->rollback(); } else { $db->commit(false); } $db->close(); }
<?php if ($sg["TITLE_IMG_OFF"] != 1) { ?> <a href="https://twitter.com/‎" title="twitter" target="_blank"><img src="img/twitter.jpg" border="0"></a> <a href="http://line.naver.jp/ja/" title="line" target="_blank"><img src="img/linex.jpg" height="27px" border="0"></a> <a href="https://ja-jp.facebook.com/" title="facebook" target="_blank"><img src="img/facebook.jpg" border="0"></a> <a href="http://www.youtube.com/?gl=JP&hl=ja" title="YouTube" target="_blank"><img src="img/youtube.jpg" border="0"></a> <a href="http://www.nicovideo.jp/" title="ニコニコ動画" target="_blank"><img src="img/nico.jpg" border="0"></a> <a href="http://www.ustream.tv/new" title="Ustream" target="_blank"><img src="img/ust1.jpg" border="0"></a> <?php $sql = "select id,title,url,img_path, priority\r\n\tfrom link where delete_flg = '0' order by priority asc"; $db = new DBLib($sg); $db->connect(); $db->prepare($sql); $arr = $db->execute(); $db->close(); $fmt = '<a href="%s" title="%s" target="_blank"><img src="%s" border="0"%s></a>' . "\n"; foreach ($arr as $ar) { $img = "img/noimage.jpg"; if ($ar["img_path"] != "") { $img = $ar["img_path"]; if (!file_exists($img)) { $img = "img/noimage.jpg"; } else { } } $v = sprintf($fmt, ht($ar["url"]), ht($ar["title"]), $img, imgsize($img, 120, 20)); print $v; } ?> <br /><br /><img src="img/QRcode.gif" width="100px">