コード例 #1
0
ファイル: event_handler.php プロジェクト: hardikamutech/hammu
 public function onUserUnregister(OW_Event $event)
 {
     $params = $event->getParams();
     $userId = $params['userId'];
     HAMMU_BOL_Service::getInstance()->deleteUserLogHammu($userId);
 }
コード例 #2
0
ファイル: index_4_7_2015.php プロジェクト: bhushansonar/hammu
$QUESTION_VALUE_TYPE_SELECT = BOL_QuestionService::QUESTION_VALUE_TYPE_SELECT;
$QUESTION_PRESENTATION_SELECT = BOL_QuestionService::QUESTION_PRESENTATION_SELECT;
$QUESTION_PRESENTATION_RADIO = BOL_QuestionService::QUESTION_PRESENTATION_RADIO;
$QUESTION_PRESENTATION_MULTICHECKBOX = BOL_QuestionService::QUESTION_PRESENTATION_MULTICHECKBOX;
$QUESTION_PRESENTATION_URL = BOL_QuestionService::QUESTION_PRESENTATION_URL;
$QUESTION_PRESENTATION_TEXT = BOL_QuestionService::QUESTION_PRESENTATION_TEXT;
$QUESTION_PRESENTATION_TEXTAREA = BOL_QuestionService::QUESTION_PRESENTATION_TEXTAREA;
$MYSQL_DATETIME_DATE_FORMAT = UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT;
$USER_LIST_SIZE = BOL_SearchService::USER_LIST_SIZE;
$SEARCH_RESULT_ID_VARIABLE = BOL_SearchService::SEARCH_RESULT_ID_VARIABLE;
$PARAM_OPTION_DEFAULT_VALUE = OW_Route::PARAM_OPTION_DEFAULT_VALUE;
$LIST_ORDER_MATCH_COMPATIBILITY = USEARCH_BOL_Service::LIST_ORDER_MATCH_COMPATIBILITY;
$LIST_ORDER_DISTANCE = USEARCH_BOL_Service::LIST_ORDER_DISTANCE;
$LIST_ORDER_LATEST_ACTIVITY = USEARCH_BOL_Service::LIST_ORDER_LATEST_ACTIVITY;
$LIST_ORDER_NEW = USEARCH_BOL_Service::LIST_ORDER_NEW;
$HAMMU_BOL_Service = HAMMU_BOL_Service::getInstance();
$language = OW::getLanguage();
$OWgetDbo = OW::getDbo();
$SKADATE_BOL_AccountTypeToGenderDao = SKADATE_BOL_AccountTypeToGenderDao::getInstance();
//
//
//$getClassInstance = OW::getClassInstance('USEARCH_CLASS_QuickSearchForm');
//$formatBirthdate = UTIL_DateTime::formatBirthdate;
//$autoLink = UTIL_HtmlTag::autoLink;
//$parseDate = UTIL_DateTime::parseDate;
// POST route
//$app->post('/loginapp', 'loginapp');
//$app->post('/loginapp', 'loginapp');
$app->post('/login', 'login');
$app->post('/forgot_password', 'forgot_password');
$app->post('/getAllServices', 'getAllServices');
コード例 #3
0
ファイル: admin.php プロジェクト: hardikamutech/hammu
 public function exportSelected($ids, $all = false)
 {
     if ($all == false) {
         for ($i = 0; $i < count($ids); $i++) {
             $inIds = array();
             $inIds = explode("_", $ids[$i]);
             $return_data[] = $this->getClientInvitesLog((int) $inIds[0], (int) $inIds[1]);
         }
     } else {
         $alldata = HAMMU_BOL_Service::getInstance()->findAllActiveLogs();
         //            echo '<pre>';
         //            print_r($alldata);
         //            die;
         for ($i = 0; $i < count($alldata); $i++) {
             $return_data[] = $this->getClientInvitesLog((int) $alldata[$i]->inviterId, (int) $alldata[$i]->inviteeId);
         }
     }
     $currentDate = date('Y-m-d_H-i-s');
     $fname = 'log_' . $currentDate . '.xls';
     $plugindir = HAMMU_BOL_Service::getTmpDirPath();
     $filepath = $plugindir . $fname;
     // Write heading row in csv file
     $heading_row = array('Inviter', 'Invitee', 'Logs');
     $header = '';
     $data = '';
     $value = '';
     for ($h = 0; $h < count($heading_row); $h++) {
         $header .= $heading_row[$h] . "\t";
     }
     if (count($return_data) > 0) {
         for ($c = 0; $c < count($return_data); $c++) {
             //                foreach ($return_data[$c] as $key => $value) {
             //                    $return_data[$c][$key] = trim($value);
             //                }
             //                echo "key->" . $return_data[$c][0]['inviter_username'];
             $line = '';
             $inviter_name = !empty($return_data[$c][0]['inviter_username']) ? $return_data[$c][0]['inviter_username'] : "";
             $invitee_name = !empty($return_data[$c][0]['invitee_username']) ? $return_data[$c][0]['invitee_username'] : "";
             $log_message = "";
             $lfcr = ", ";
             for ($log = 0; $log < count($return_data[$c]); $log++) {
                 $log_message .= $return_data[$c][$log]["message"] . $lfcr;
             }
             //$log_message = wordwrap($log_message, 20, "\n");
             $content_row = array();
             $content_row = array($inviter_name, $invitee_name, $log_message);
             for ($a = 0; $a < count($content_row); $a++) {
                 //$data .= trim( $content_row[$a] ) . "\t";
                 if (!isset($content_row[$a]) || $content_row[$a] == "") {
                     $value = "\t";
                 } else {
                     $value = $content_row[$a] . "\t";
                 }
                 $line .= $value;
             }
             $data .= trim($line) . "\n";
         }
     }
     ob_end_clean();
     header("Content-type:application/octet-stream");
     header("Content-Disposition:attachment;filename={$fname}");
     header("Pragma: no-cache");
     header("Expires: 0");
     print "{$header}\n{$data}";
     header("Location: " . $_SERVER["PHP_SELF"]);
 }