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


PHP Members::delete方法代码示例

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


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

示例1: do_delete_objects

 function do_delete_objects($objects, $permanent = false)
 {
     $err = 0;
     // count errors
     $succ = 0;
     // count files deleted
     foreach ($objects as $object) {
         try {
             $obj = Objects::findObject($object->getId());
             if ($obj instanceof ContentDataObject && $obj->canDelete(logged_user())) {
                 if ($permanent) {
                     if (Plugins::instance()->isActivePlugin('mail') && $obj instanceof MailContent) {
                         $obj->delete(false);
                     } else {
                         $obj->delete();
                         Members::delete(array("conditions" => "object_id = " . $obj->getId()));
                     }
                     ApplicationLogs::createLog($obj, ApplicationLogs::ACTION_DELETE);
                     $succ++;
                 } else {
                     if ($obj->isTrashable()) {
                         $obj->trash();
                         ApplicationLogs::createLog($obj, ApplicationLogs::ACTION_TRASH);
                         $succ++;
                     }
                 }
             }
         } catch (Exception $e) {
             $err++;
         }
     }
     return array($succ, $err);
 }
开发者ID:rorteg,项目名称:fengoffice,代码行数:33,代码来源:ObjectController.class.php

示例2:

 * You should have received a copy of the GNU General Public License
 * along with Pusthaka.  If not, see <http://www.gnu.org/licenses/>.
 */

	$allow = "ADMIN;LIBSTAFF";
//$allow = "ADMIN";
	$PageTitle = "Edit Member";
	require('../inc/init.php');

	$mem = new Members;
	
	// DELETE Member
	if(isset($_REQUEST['BtnDeleteMember'])){
		$mid = $_REQUEST['mid'];
		$member = $mem->getByID($mid);		
		$mem->delete($member);
	}


	// Update member /////////////////////////////////////////////////////
	if(isset($_REQUEST['BtnUpdateMember'])){
		//[Fill a member data object] ------------------------------
		$member['mid'] = $_REQUEST['mid'];
		$member['mem_no'] = $_REQUEST['mem_no'];
		$member['type'] = $_REQUEST['type'];
		$member['surname'] = $_REQUEST['surname'];
		$member['firstnames'] = $_REQUEST['firstnames'];
		$member['title'] = $_REQUEST['title'];
		$member['address'] = $_REQUEST['address'];
		$member['nic'] = $_REQUEST['nic'];
		$member['reg_no'] = $_REQUEST['reg_no'];
开发者ID:nalaka,项目名称:pusthaka1,代码行数:31,代码来源:member_edit.php

示例3: delete

 public function delete($id = '')
 {
     /***********************************
     		Delete members
     		************************************/
     $members = new Members($this->db);
     $this->f3->set('member', $members->read(array('id=?', $id), [])[0]);
     $this->f3->set('SESSION.flash', array());
     if ($_SERVER['QUERY_STRING'] == "execute") {
         $members->delete($this->f3->get('member')->id);
         $this->f3->push('SESSION.flash', array('type' => 'success', 'msg' => 'Member ' . $this->f3->get('member')->name . ' deleted!'));
         $this->f3->reroute('/mytcg/members');
     }
     $this->f3->set('content', 'app/views/mytcg/members_delete.htm');
     echo Template::instance()->render('app/templates/admin.htm');
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:16,代码来源:MyMembersController.php


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