$Links->user_id = $_SESSION['user']['id']; $Links->category_id = $_POST['category_id']; for ($counter = 0; $counter < $link_count; $counter++) { $Links->title = $_POST['title_updated'][$counter]; $Links->link_id = $_POST['link_id_updated'][$counter]; $Links->url = $_POST['url_updated'][$counter]; try { $Links->update_link(); ++$updated_links_count; } catch (PAException $e) { $message[] = 'Link with title ' . $_POST['title_updated'][$counter] . ' already exists'; } } $json_string = '{ "errors" : "' . uihelper_plural($updated_links_count, ' link') . ' out of ' . $link_count . ' updated successfully,' . implode(",", $message) . '", "updated_category_id" : ' . $_POST['category_id'] . '}'; $message[] = array('category_id' => $_POST['category_id']); array_unshift($message, uihelper_plural($updated_links_count, ' link') . ' out of ' . $link_count . ' updated successfully'); print_r($json_string); /** * Code for displaying the selected links for editing. */ } else { if (!empty($_GET['action']) && $_GET['action'] == 'edit_list_link') { if (!empty($_GET['link_ids'])) { $Links = new Links(); $Links->user_id = $_SESSION['user']['id']; $Links->link_id = explode("_", $_GET['link_ids']); $links = $Links->load_link(); $edit_form = '<fieldset class="center_box"> <legend>Edit links</legend>'; $links_count = count($links); $category_id = null;
//Deleting all the activities of this group from activities table for rivers of people module Activities::delete_for_group($gid); $message = __("Group deleted successfully"); unset($_GET['delete_gid']); } } if (!empty($_POST['gid'])) { $group_ids = $_POST['gid']; foreach ($group_ids as $i => $delete_gid) { $group = ContentCollection::load_collection((int) $delete_gid, $login_uid); $group->delete(); //Deleting all the activities of this group from activities table for rivers of people module Activities::delete_for_group($delete_gid); unset($_POST['gid']); } $msg = uihelper_plural(count($group_ids), 'group'); $message = sprintf(__("%s groups deleted successfully"), $msg); } function setup_module($column, $module, $obj) { switch ($module) { case 'ManageGroupsModule': if (!empty($_GET['sort_by'])) { $obj->set_sort_by($_GET['sort_by']); } if (!empty($_GET['sort_dir'])) { $obj->set_sort_dir($_GET['sort_dir']); } if (!empty($_GET['search_str'])) { $obj->search_str = $_GET['search_str']; }
"> <?php echo uihelper_resize_mk_img($link['picture'], 125, 125, "files/img/image_not_available.png", 'alt="Group image"', RESIZE_CROP); ?> </a> <a href="<?php echo PA::$url . PA_ROUTE_GROUP . "/gid=" . $link['id']; ?> "> <?php echo chop_string(stripslashes($link['title']), 17); ?> </a> <span class="users-list-date"> <?php echo uihelper_plural($link['members'], '' . __('Member') . ''); ?> </span> </li> <?php } } else { ?> <?php if ($mode == 'private' || !empty($user_name)) { ?> <li class="list-group-item"> <?php echo sprintf(__('You haven\'t <a href="%s">created</a> or <a href="%s">joined</a> any groups yet.'), PA::$url . "/cnaddgroup.php", PA::$url . PA_ROUTE_GROUPS); ?> </li>
$cnt = count($links); for ($counter = 0; $counter < $cnt; $counter++) { ?> <li class="list-group-item"> <a href="http://<? echo $links[$counter]->address .'.' . PA::$domain_suffix . BASE_URL_REL . PA_ROUTE_HOME_PAGE?>" ><?php echo uihelper_resize_mk_img(trim($links[$counter]->inner_logo_image), 250, 250, PA::$theme_rel . "/img/default-network-image.gif"); ?> </a> <hr/> <a href="http://<? echo $links[$counter]->address . '.' . PA::$domain_suffix . BASE_URL_REL . PA_ROUTE_HOME_PAGE?>" ><?php echo chop_string(stripslashes($links[$counter]->name), 16); ?> </a> <span class="badge"> <?php echo uihelper_plural($links[$counter]->member_count, "Member"); ?> </span> </li> <?php } } else { ?> <li><?php echo __('No network created yet.'); ?> </li> <?php } ?>
$network_owner_name = chop_string($owner_info[$network->network_id]['name'], 25); ?> <td valign="top" width="415"> <h2><a href="http://<? echo $network->address .'.' . PA::$domain_suffix.BASE_URL_REL . PA_ROUTE_HOME_PAGE?>"><?php echo strip_tags(stripslashes($network->network_name)); ?> </a></h2> <?php echo wordwrap($network->description, 75, " ", 1); ?> <div class="post_info"> <?php echo uihelper_plural($network->member_count, ' Member'); ?> | Created <?php echo date("F d, Y ", $network->created); ?> | Moderated By <a href="<?php echo PA::$url . PA_ROUTE_USER_PUBLIC . '/' . $network->owner_id; ?> "><?php echo $network_owner_name; ?> </a> </div> </td> <?php
$group = ContentCollection::load_collection((int) $gid, $login_uid); $group->delete(); //Deleting all the activities of this group from activities table for rivers of people module Activities::delete_for_group($gid); $message = "Group deleted successfully"; } if (!empty($_POST['gid'])) { $group_ids = $_POST['gid']; $cnt = count($group_ids); for ($i = 0; $i < $cnt; $i++) { $group = ContentCollection::load_collection((int) $group_ids[$i], $login_uid); $group->delete(); //Deleting all the activities of this group from activities table for rivers of people module Activities::delete_for_group($group_ids[$i]); } $msg = uihelper_plural($cnt, 'group'); $message = $msg . " deleted successfully"; } } function setup_module($column, $module, $obj) { global $configure_permission; switch ($module) { case 'ManageGroupsModule': if (!$configure_permission) { return 'skip'; } } } $page = new PageRenderer("setup_module", PAGE_NETWORK_MANAGE_GROUPS, "Manage Groups", 'container_two_column.tpl', 'header.tpl', PUB, HOMEPAGE, $network_info); uihelper_error_msg(@$message);
echo uihelper_resize_mk_img($family['picture'], 35, 35, "files/img/image_not_available.png", 'alt="Group image"', RESIZE_CROP); ?> </a> <span> <b> <a href="<?php echo PA::$url . PA_ROUTE_FAMILY . "/gid=" . $family['id']; ?> "> <?php echo chop_string(stripslashes($family['title']), 17); ?> </a> </b><br/> <?php echo uihelper_plural($family['members'], '' . __('member') . ''); ?> </span> </li> <?php } // End of For ?> </ul> </div> <?php } else { //End of If condition ?> <div class="module_browse_groups"> <ul>
<td valign="top" width="415"> <h2><a href="<?php echo PA::$url . PA_ROUTE_GROUP . '/gid=' . $links[$i]['group_id']; ?> "><?php echo $links[$i]['title']; ?> </a></h2> <?php echo stripslashes($links[$i]['description']); ?> <div class="post_info"> <?php echo uihelper_plural($links[$i]['members'], ' Member'); ?> | Created <?php echo date("F d, Y ", $links[$i]['created']); ?> | Moderated By <a href="<?php echo PA::$url . PA_ROUTE_USER_PUBLIC . '/' . $links[$i]['owner_id']; ?> "><?php echo $links[$i]['owner_login_name']; ?> </a> </div> </td> </tr>