Example #1
0
</td>
                        <td><?php 
        echo $contribution->getDate();
        ?>
</td>
                      <td>
                        <div class="action-icon">
                            <span><a href="<?php 
        echo Route::getAdminDirectory();
        ?>
contributions/view.php?post=<?php 
        echo $contribution->getId();
        ?>
"><i class="fa fa-eye" title="View"></i></a></span>
                            <span><a href="<?php 
        echo Route::getAdminDirectory();
        ?>
contributions/delete.php?post=<?php 
        echo $contribution->getId();
        ?>
">
                                    <i class="fa fa-trash" title="Reject"></i>
                                </a></span>
                          </div>
                      </td>
                    </tr>
                 <?php 
    }
    ?>

              </table>
 $metaController = new MetaController();
 $poiController = new PoiController();
 //get the last date of creation of search file
 $lastCreation = $metaController->getSearchMetaRecent();
 $lastCreationDate = "2014-01-01";
 if ($lastCreation) {
     $lastCreationDate = $lastCreation['date'];
 }
 $poiList = $poiController->getByDate($lastCreationDate);
 if ($poiList) {
     $totalPois = count($poiList);
     //create the file name and the url for the route
     $path = "../../assets/files/search/";
     $filename = "sdf_" . date('Ymd') . ".txt";
     $completePath = $path . $filename;
     $url = Route::getAdminDirectory() . "assets/files/search/" . $filename;
     $outputFile = fopen($completePath, "w");
     if ($outputFile) {
         $insertCount = 0;
         //iterate through the poi list
         foreach ($poiList as $poi) {
             $phone = "NA";
             if ($poi->getPhone() != "") {
                 $phone = $poi->getPhone();
             }
             $email = "NA";
             if ($poi->getEmail() != "") {
                 $email = $poi->getEmail();
             }
             $website = "NA";
             if ($poi->getWebsite() != "") {
Example #3
0
 public static function getBackend($filename = "admin/")
 {
     header("location:" . Route::getAdminDirectory() . $filename);
 }
require_once "../../model/objects/POI.php";
require_once "../../model/objects/User.php";
require_once "../../model/UsersController.php";
require_once "Helpers.php";
header('Content-Type: text/event-stream');
// recommended to prevent caching of event data.
header('Cache-Control: no-cache');
$userController = new UsersController();
$userId = $_SESSION['userId'];
$user = $userController->find($userId);
if ($user->getPrevilege() == 1) {
    $parentController = new ParentCategoryController();
    $categoryController = new CategoryController();
    $poiController = new PoiController();
    /* start extracting the data from file and initialize the data into the database*/
    $inputFile = fopen(Route::getAdminDirectory() . "assets/raw/part4_data.txt", "r");
    $skippedData = "";
    $insertCount = 0;
    if ($inputFile) {
        /* read from the file and write to the database here*/
        while (($line = fgets($inputFile)) !== false) {
            try {
                $row = explode('||', $line);
                if (count($row) == 5) {
                    /* the data has valid number of elements, filter for any abnormalities in the data*/
                    $name = $row[0];
                    $name = str_replace("'", "''", $name);
                    $address = $row[1];
                    $contacts = relinquishContacts($row[2]);
                    $phone = $contacts[0];
                    $email = $contacts[1];
Example #5
0
            echo $meta['url'];
            ?>
"><?php 
            echo $meta['filename'];
            ?>
</a></td>
                                            <td><?php 
            echo $meta['id'];
            ?>
</td>
                                            <td><?php 
            echo $meta['date'];
            ?>
</td>
                                            <td><a href="<?php 
            echo Route::getAdminDirectory() . "service/delete.php?meta=map&id=" . $meta['id'];
            ?>
">
                                                    <i class="fa fa-trash"></i>
                                                </a>
                                            </td>
                                        </tr>
                                    <?php 
        }
    }
    ?>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
Example #6
0
<script type="text/javascript" src="<?php 
            echo Route::getStyleSheetDirectory();
            ?>
js/validator.js"></script>
<script type="text/javascript" src='http://maps.google.com/maps/api/js?sensor=false&libraries=places'></script>
<script type="text/javascript" src="<?php 
            echo Route::getStyleSheetDirectory();
            ?>
js/locationpicker.jquery.js"></script>

  <div class="content-wrapper">

    <section class="content-header">
      <h1>
        Edit location <a class="btn btn-default" href="<?php 
            echo Route::getAdminDirectory() . "locations/delete.php?post=" . $postID;
            ?>
"><i class="fa fa-trash" title="Delete"></i></a>
      </h1>
    </section>


    <section class="content">
      <div class="row">

        <div class="col-md-8">

          <div class="form-body">

          <form role="form" class="form-horizontal" name="poi_form" method="post" action="">
              <input type="text" value="<?php