当前位置: 首页>>代码示例>>PHP>>正文


PHP Picture::isClicked方法代码示例

本文整理汇总了PHP中Picture::isClicked方法的典型用法代码示例。如果您正苦于以下问题:PHP Picture::isClicked方法的具体用法?PHP Picture::isClicked怎么用?PHP Picture::isClicked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Picture的用法示例。


在下文中一共展示了Picture::isClicked方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Loaded

 public function Loaded()
 {
     $nb_banned_visitors = 0;
     foreach ($this->array_wsp_banned_users as $ip => $array_ip_info) {
         if ($array_ip_info['cnt'] >= MAX_BAD_URL_BEFORE_BANNED) {
             $btn_authorize = new Picture("img/wsp-admin/button_ok_16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE, __(AUTHORIZE));
             $btn_authorize->onClick($this, "onAuthorizeVisitor", $ip)->setAjaxEvent();
             if (!$btn_authorize->isClicked()) {
                 $link_ip = new Link("http://www.infosniper.net/index.php?ip_address=" . $ip, Link::TARGET_BLANK, $ip);
                 $row = $this->table_ban->addRowColumns($link_ip, $array_ip_info['dte'], $array_ip_info['len'], $btn_authorize);
                 $row->setColumnAlign(3, RowTable::ALIGN_CENTER);
                 $nb_banned_visitors++;
             }
         }
     }
     if ($nb_banned_visitors == 0) {
         $this->table_ban->addRowColumns(" ", __(NO_BANNED_VISITORS), " ", " ");
     }
 }
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:19,代码来源:configure-banned-visitors.php

示例2: loadFromSqlDataView


//.........这里部分代码省略.........
         $row_table->add();
     }
     if ($insert || $delete) {
         $row_table->add();
     }
     $row_table->setStyle("display:none;");
     $this->addRow($row_table);
     // Create insert row
     if ($insert) {
         $row_table = new RowTable();
         $row_table->setId($this->id . "_row_");
         for ($i = 0; $i < sizeof($list_attribute); $i++) {
             // get property display
             if (isset($this->from_sql_data_view_properties[$list_attribute[$i]]["display"]) && $this->from_sql_data_view_properties[$list_attribute[$i]]["display"] == false) {
                 continue;
             }
             if ($list_attribute[$i] != $auto_increment_id) {
                 $input_obj = $this->createDbAttributeObject(null, $list_attribute, $list_attribute_type, $i, "", $key_attributes);
                 $row_table->add($input_obj);
             } else {
                 $row_table->add();
             }
         }
         $this->from_sql_data_view_add_button = new Button($this->table_form_object, $this->id . "_btnadd__ind_");
         $this->from_sql_data_view_add_button->setPrimaryIcon("img/wsp-admin/button_ok_16.png");
         $this->from_sql_data_view_add_button->onClick("onChangeTableFromSqlDataView")->setAjaxEvent()->disableAjaxWaitMessage();
         $row_table->add($this->from_sql_data_view_add_button);
         if ($is_table_defined_style) {
             $row_table->setBorderPredefinedStyle($this->class);
         }
         $this->addRow($row_table);
     } else {
         if ($this->is_advance_table) {
             $row_table = clone $row_table;
             $this->addRow($row_table);
         }
     }
     // create reload button
     if ($insert || $update) {
         $this->from_sql_data_view_reload_pic = new Picture("wsp/img/reload_16x16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE, "Please reload");
         $this->from_sql_data_view_reload_pic->setId($this->id . "_btnreload__ind_");
         $this->from_sql_data_view_reload_pic->onClick($this->getPage(), "onChangeTableFromSqlDataView")->setAjaxEvent()->disableAjaxWaitMessage();
     }
     // Check if a delete button is clicked (if no primary key defined in table)
     $deleted_ind = -1;
     $is_delete_action = false;
     $it = $sql->retrieve();
     if ($this->from_sql_data_view_delete && sizeof($key_attributes) == 0) {
         for ($i = 0; $i < $it->getRowsNum(); $i++) {
             $delete_pic = new Picture("img/wsp-admin/delete_16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
             $delete_pic->setId($this->id . "_btndel__ind_" . $i);
             $delete_pic->onClickJs("if (!confirm('" . __(TABLE_CONFIME_DEL_ROW) . "')) { return false; }");
             $delete_pic->onClick($this->getPage(), "onChangeTableFromSqlDataView")->setAjaxEvent()->disableAjaxWaitMessage();
             if ($delete_pic->isClicked()) {
                 $is_delete_action = true;
                 $deleted_ind = $i;
                 break;
             }
         }
     }
     // Generate table data
     $ind = 0;
     $this->sql_data_view_object = $sql;
     $this->data_row_iterator_object = $it;
     while ($it->hasNext()) {
         $row = $it->next();
         $key_str = "";
         if (sizeof($key_attributes) == 0) {
             $key_str = $ind;
         } else {
             try {
                 for ($i = 0; $i < sizeof($key_attributes); $i++) {
                     if ($i > 0) {
                         $key_str .= "-";
                     }
                     $key_str .= $row->getValue($key_attributes[$i]);
                 }
                 $key_str = strtolower(url_rewrite_format($key_str));
             } catch (Exception $ex) {
                 if ($insert || $update || $delete) {
                     throw new NewException(get_class($this) . "->loadFromSqlDataView() error: \$properties need to include primary key of the table if you want to use insert, update or delete feature", 0, getDebugBacktrace(1));
                 } else {
                     $key_str = $ind;
                 }
             }
             if ($key_str == "") {
                 throw new NewException(get_class($this) . "->loadFromSqlDataView() error: The system can't create empty key for row (key is created by the attribute(s): " . implode(", ", $key_attributes) . ")", 0, getDebugBacktrace(1));
             }
         }
         $this->from_sql_data_view_data_row_array[$key_str] = $row;
         if ($deleted_ind == $ind) {
             // if no primary key defined in table
             $deleted_ind = -1;
             $ind--;
         } else {
             $this->addRowLoadFromSqlDataView($row, $list_attribute, $list_attribute_type, $key_attributes, $key_str, $is_delete_action, $ind);
         }
         $ind++;
     }
 }
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:101,代码来源:Table.class.php

示例3: Loaded

 public function Loaded()
 {
     $users_table = new Table();
     $users_table->setId("users_table")->activateAdvanceTable()->activateSort(1)->setWidth(400);
     $users_table->addRowColumns(__(LOGIN), __(RIGHTS), __(MODIFY), __(DELETE))->setHeaderClass(0);
     $this->old_passwd_row->hide();
     $this->validate_btn->show();
     $this->modify_btn->hide();
     $this->cancel_btn->hide();
     $is_modify_mode = false;
     $array_users = getAllWspUsers();
     for ($i = 0; $i < sizeof($array_users); $i++) {
         $edit_user = new Picture("img/wsp-admin/edit_16.png", 16, 16);
         $edit_user->onClick($this, "refresh")->setAjaxEvent()->disableAjaxWaitMessage();
         if ($edit_user->isClicked() && !$is_modify_mode) {
             $this->old_passwd_row->show();
             $this->validate_btn->hide();
             $this->modify_btn->show();
             $this->cancel_btn->show();
             $this->edt_login->setValue($array_users[$i]['login']);
             $this->edt_old_password->forceEmpty();
             $this->edt_password->forceEmpty();
             $this->edt_confirm_passwd->forceEmpty();
             $is_modify_mode = true;
         }
         if ($array_users[$i]['login'] == $_SESSION['wsp-login']) {
             $del_user = new Object();
         } else {
             $del_user = new Picture("img/wsp-admin/delete_16.png", 16, 16);
             $del_user->setId("user_" . $array_users[$i]['login']);
             $del_user->onClickJs("if (!confirm('" . __(DEL_CONFIRM) . "')) { return false; }");
             $del_user->onClick($this, "removeWspUser", $array_users[$i]['login'])->setAjaxEvent();
             if ($del_user->isClicked()) {
                 continue;
             }
         }
         $users_table->addRowColumns($array_users[$i]['login'], $array_users[$i]['rights'], $edit_user, $del_user)->setColumnAlign(3, RowTable::ALIGN_CENTER)->setColumnAlign(4, RowTable::ALIGN_CENTER);
     }
     $this->users_table_obj->add($users_table);
 }
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:40,代码来源:configure-users.php


注:本文中的Picture::isClicked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。