public function updateLink() { $this->checkLogin(); if (DomainTheme_Plugin::form('update')->validate()) { $this->response->goBack(); } /** 取出数据 */ //$form_data = $this->request->from(array_keys($_POST)); $form_data = $_POST; $data['id'] = $this->get_data_once($form_data, DomainTheme_Plugin::$FORM_PRE . 'id'); $data['name'] = $this->get_data_once($form_data, DomainTheme_Plugin::$FORM_PRE . 'name'); $data['domain'] = $this->get_data_once($form_data, DomainTheme_Plugin::$FORM_PRE . 'domain'); $data['theme'] = $this->get_data_once($form_data, DomainTheme_Plugin::$FORM_PRE . 'theme'); unset($form_data[DomainTheme_Plugin::$FORM_PRE . 'do']); $data['user'] = json_encode($form_data); /** 更新数据 */ $this->db->query($this->db->update($this->prefix . 'domaintheme')->rows($data)->where('id = ?', $data['id'])); /** 设置高亮 */ $this->widget('Widget_Notice')->highlight('link-' . $data['id']); /** 提示信息 */ $this->widget('Widget_Notice')->set(_t('"%s" => %s 已经被更新', $data['domain'], $data['theme']), NULL, 'success'); /** 转向原页 */ $this->response->redirect(Typecho_Common::url('extending.php?panel=DomainTheme%2Fmanage-domaintheme.php', $this->options->adminUrl)); }
<td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有任何链接'); ?> </h6></td> </tr> <?php } ?> </tbody> </table> </div> </form> </div> <div class="col-mb-12 col-tb-4" role="form"> <?php DomainTheme_Plugin::form()->render(); ?> </div> </div> </div> </div> <?php include 'copyright.php'; include 'common-js.php'; ?> <script type="text/javascript"> (function () { $(document).ready(function () { var table = $('.typecho-list-table').tableDnD({