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


PHP Activity::deleteActivity方法代码示例

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


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

示例1: removeGroupActivities

 /**
  * Delete all group activities
  * ToDo: Delete just one?
  */
 function removeGroupActivities()
 {
     global $db;
     $act_obj = new Activity();
     //First remove groups activities from activity table
     $allActs = $this->group_activities;
     foreach ($allActs as $id => $garbage) {
         $act_obj->deleteActivity($id);
     }
     //Then remove the associations from social_groups_activities
     $sql = 'DELETE FROM ' . TABLE_PREFIX . "social_groups_activities WHERE group_id=" . $this->group_id;
     $result = mysql_query($sql, $db);
     if ($result) {
         return true;
     }
     return false;
 }
开发者ID:vicentborja,项目名称:ATutor,代码行数:21,代码来源:SocialGroup.class.php

示例2: intval

$privacy_obj = $pc->getPrivacyObject($id);
if ($privacy_obj==null){
	//no such person
	//add error and redirect back to is own page?
//	header('Location: sprofile.php');
//	exit;	
} else {
	$relationship = $pc->getRelationship($id);
	$profile_prefs = $privacy_obj->getProfile();
}

// Delete activities
if (isset($_GET['delete'])){
	$id = intval($_GET['delete']);
	if ($id > 0){
		if ($act_obj->deleteActivity($id)){
			$msg->addFeedBack('ACTIVITY_DELETED');
		} else {
			$msg->addError('ACTIVITY_DELETE_FAILED');
		}
		header('Location: '.url_rewrite(AT_SOCIAL_BASENAME.'sprofile.php', AT_PRETTY_URL_HEADER));
		exit;
	}
}

// Display
include(AT_INCLUDE_PATH.'header.inc.php');

$savant->display('social/pubmenu.tmpl.php');
if (!empty($mutual_friends)){
	$savant->assign('mutual_friends', $mutual_friends);
开发者ID:radiocontrolled,项目名称:ATutor,代码行数:31,代码来源:sprofile.php

示例3: removeGroupActivities

 /**
  * Delete all group activities
  * ToDo: Delete just one?
  */
 function removeGroupActivities()
 {
     $act_obj = new Activity();
     //First remove groups activities from activity table
     $allActs = $this->group_activities;
     foreach ($allActs as $id => $garbage) {
         $act_obj->deleteActivity($id);
     }
     //Then remove the associations from social_groups_activities
     $sql = "DELETE FROM %ssocial_groups_activities WHERE group_id=%d";
     $result = queryDB($sql, array(TABLE_PREFIX, $this->group_id));
     if ($result) {
         return true;
     }
     return false;
 }
开发者ID:genaromendezl,项目名称:ATutor,代码行数:20,代码来源:SocialGroup.class.php


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