<!-- /.box-header --> <div class="box-body"> <div class="table-responsive"> <table class="table table-hover no-margin css-serial"> <thead> <tr> <th>S. No.</th> <th>Date</th> <th>Contributions</th> <th>Email</th> <th>Action</th> </tr> </thead> <tbody> <?php $contributionList = $contributionController->getAll(0, 10); if ($contributionList) { foreach ($contributionList as $contribution) { ?> <tr> <td>.</td> <td><?php echo $contribution->getDate(); ?> </td> <td><span><?php echo $contribution->getPoiName(); ?> </span></td> <td><span><?php echo $contribution->getEmail();
} ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Contributions </h1> </section> <?php if ($searchKey != "") { $dataList = $contributionController->search($searchKey, $offset, $rowsPerPage); } else { if ($status == "") { $dataList = $contributionController->getAll($offset, $rowsPerPage); } else { $dataList = $contributionController->getByStatus($status, $offset, $rowsPerPage); } } if ($dataList) { ?> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">All</h3><i> (<?php echo count($dataList);
/** * Created by Yogesh on 11/20/2015. * */ include_once "../model/PoiController.php"; include_once "../model/UsersController.php"; include_once "../model/objects/User.php"; include_once "../model/objects/POI.php"; include_once "../model/objects/Contribution.php"; include_once "../model/objects/Category.php"; include_once "../model/objects/ParentCategory.php"; include_once "../model/CategoryController.php"; include_once "../model/ContributionController.php"; header("Content-Type: text/plain"); $cont = new ContributionController(); $data = $cont->getAll(); print_r($data); exit; $dataArray = array("Pokhara||Gandaki Zone, Kaski District, Nepal||http://en.wikipedia.org/wiki/Pokhara||city||28.2095379,83.9914028", "Hyatt Regency||Nepal||null||bus station||27.7193693,85.3541166", "Ason||Nepal||null||neighbourhood||27.7075079,85.3122521", "Lainchour Chowk Bus Stop||Nepal||null||bus station||27.7169967,85.316039", "Airport Bus Station||Nepal||null||bus station||27.7007168,85.3537173", "Dillibazaar stop||Nepal||null||bus station||27.7053698,85.3267594"); $currentUser = $userController->find(3); $poiIdDummy = 56; foreach ($dataArray as $key => $value) { $row = $value; $data = explode("||", $row); $category = new Category(); $category->setUser($currentUser); $category->setSubCategory($data[3]); $poi = new POI(); $poi->init($poiIdDummy, $data[0], $data[1], $data[4], $category, "", "", "", "", $currentUser); $contributionController->add($poi); $poiIdDummy++;