本文整理汇总了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;
}
示例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);
示例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;
}