public function updateLink() { if (Links_Plugin::form('update')->validate()) { $this->response->goBack(); } /** 取出数据 */ $link = $this->request->from('lid', 'name', 'sort', 'image', 'url', 'description', 'user'); /** 更新数据 */ $this->db->query($this->db->update($this->prefix . 'links')->rows($link)->where('lid = ?', $link['lid'])); /** 设置高亮 */ $this->widget('Widget_Notice')->highlight('link-' . $link['lid']); /** 提示信息 */ $this->widget('Widget_Notice')->set(_t('链接 <a href="%s">%s</a> 已经被更新', $link['url'], $link['name']), NULL, 'success'); /** 转向原页 */ $this->response->redirect(Typecho_Common::url('extending.php?panel=Links%2Fmanage-links.php', $this->options->adminUrl)); }
_e('没有任何链接'); ?> </h6></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="do" value="delete" /> </form> </div> <div class="column-08 typecho-mini-panel typecho-radius-topleft typecho-radius-topright typecho-radius-bottomleft typecho-radius-bottomright"> <?php Links_Plugin::form()->render(); ?> </div> </div> </div> </div> <?php include 'copyright.php'; include 'common-js.php'; ?> <script type="text/javascript"> (function () { window.addEvent('domready', function() {