Exemple #1
0
             if ($perCityAction->CheckRigts($cityId, $admin)) {
                 if (!isset($_GET['monthsel'])) {
                     $cur_month = $perCityAction->GetCurrentDate(true);
                     rcms_redirect(PerCityAction::MODULE_NAME . "&action=city_payments&citysearch=" . $_GET['citysearch'] . "&monthsel=" . $cur_month);
                 } else {
                     $cur_month = $_GET['monthsel'];
                 }
                 if (isset($_GET['year'])) {
                     $year = $_GET['year'];
                 } else {
                     $year = $perCityAction->GetCurrentDate(false, true);
                 }
                 $currentDate = $year . '-' . $cur_month;
                 $perCityAction->LoadAllCredited($currentDate);
                 $perCityAction->LoadAllData($currentDate, $cityId, 'payments');
                 show_window(__('Payments by city'), $perCityAction->PaymentsShow());
             } else {
                 show_error(__('You cant control this module'));
             }
         }
     }
 }
 if ($action == 'permission') {
     if (cfr('CITYPERMISSION')) {
         if (isset($_GET['edit'])) {
             show_window(__('Cities'), $perCityAction->CityChecker($_GET['edit']));
             if (isset($_POST['city'])) {
                 $adminsPermission = '';
                 foreach ($_POST['city'] as $eachCity) {
                     if ($eachCity == end($_POST['city'])) {
                         $adminsPermission .= $eachCity;