<?php $communityid = isset($_POST['postvalue']) ? $_POST['postvalue'] : 0; include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/communities.php"; $community = new communityclass($dbconnection->dbconnector); include_once CLASSFOLDER . "/catalogs.php"; $catalog = new catalogclass($dbconnection->dbconnector); include_once CLASSFOLDER . "/events.php"; $event = new eventclass($dbconnection->dbconnector); $communitydata = !empty($communityid) ? $community->getcommunitybyid($communityid) : array(); $selectedState = !empty($communityid) ? $community->getSelectedState($communityid) : array(); $selectedZone = !empty($communityid) ? $community->getSelectedZone($communityid) : array(); $selectedEvents = !empty($communityid) ? $event->getSelectedEventByCommunityId($communityid) : array(); ?> <form id="update-communitydetails" name="update-communitydetails" action="" method="post" novalidate="novalidate"> <input type="hidden" id="communityid" name="communityid" value="<?php echo !empty($communityid) ? $communityid : 0; ?> " /> <div class="box box-primary"> <div class="box-body"> <div class="row"> <div class="form-group margin"> <label><span class="text-error">*</span> Community Name</label> <input type="text" id="eventname" name="name" value="<?php echo !empty($communitydata['name']) ? $communitydata['name'] : ''; ?> " maxlength="25" placeholder="Login Name" class="form-control" > </div>
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/communities.php"; $community = new communityclass($dbconnection->dbconnector); $searchObject = isset($_POST['postvalue']) ? $_POST['postvalue'] : null; if (!empty($searchObject)) { $rows = $searchObject['rows']; $page = $searchObject['page']; } else { $rows = 20; $page = 1; } ?> <div id="gridcontent" class ="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Community List</h3> <a title="Create Community" class="btn btn-default pull-right btn-sm " href="javascript:void(0)" onclick="getcontents('pages/events/updatecommunities.php','content');" > <i class="glyphicon glyphicon-plus-sign"></i>Add new community</a> </div> <div class="box-body"> <div id="example2_wrapper" class="dataTables_wrapper form-inline" role="grid"> <?php $totlaCommunities = $community->getTotalCommunities(null); if ($totlaCommunities > 0) { if ($totlaCommunities >= ($page - 1) * $rows) { include_once CLASSFOLDER . "/catalogs.php";
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php"; include_once CLASSFOLDER . "/dbconnection.php"; include_once CLASSFOLDER . "/common.php"; include_once CLASSFOLDER . "/communities.php"; $community = new communityclass($dbconnection->dbconnector); //ob_start("ob_gzhandler"); switch ($_POST['action']) { /*--------------------------------------------------------------*/ case "savecommunity": if (!empty($_POST['communitydetails'])) { $params = array(); parse_str($_POST['communitydetails'], $params); //print_r($params); $eventids = isset($_POST['eventids']) && !empty($_POST['eventids']) ? explode(',', $_POST['eventids']) : null; $response = $community->updatecommunity($params, $eventids); if (empty($response["Exception"])) { $response['Message'] = "Community details updated successfully"; } echo json_encode($response); } else { $response['Exception'] = "Please specify valid community details"; echo json_encode($response); } break; }
function GetAllCommunityNames() { include_once CLASSFOLDER . "/communities.php"; $community = new communityclass($this->internalDB); return $community->getAllCommunityNames(); }