当前位置: 首页>>代码示例>>PHP>>正文


PHP sfWebRequest::getGetParameters方法代码示例

本文整理汇总了PHP中sfWebRequest::getGetParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP sfWebRequest::getGetParameters方法的具体用法?PHP sfWebRequest::getGetParameters怎么用?PHP sfWebRequest::getGetParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sfWebRequest的用法示例。


在下文中一共展示了sfWebRequest::getGetParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeReturn

 public function executeReturn(sfWebRequest $request)
 {
     //--------------------------------------------------------------------------
     // if txn_id is posted, we can assume that PDT (Payment Data Transfer) is
     // inactive and return method has been set to 2
     // PDT is not tested yet and requires additional investigation
     //--------------------------------------------------------------------------
     if ($request->getPostParameter('txn_id')) {
         //--------------------------------------------------------------------------
         // instanciate application specific Paypal Interface
         //--------------------------------------------------------------------------
         $pp_class = sfConfig::get('app_es_paypal_plugin_handler', 'esPaypalHandler');
         $pp = new $pp_class();
         //--------------------------------------------------------------------------
         // handle data posted by Paypal (store as transaction)
         //--------------------------------------------------------------------------
         $transaction = $pp->handleReturn($request->getPostParameters());
         $this->data = $request->getPostParameters();
         $this->relatedEntity = $pp->getRelatedEntity();
         $this->transaction = $transaction;
     } else {
         $this->data = $request->getGetParameters();
     }
     $this->handleReturn($this->data);
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:25,代码来源:BaseesPaypalActions.class.php

示例2: save

 public function save(sfWebRequest $request)
 {
     $options = base64_decode($request->getParameter("options"));
     $options = unserialize($options);
     $options = array_merge(array('save_to' => null, 'target_vars' => true), $options);
     $state = $request->getParameter("state");
     $url = $request->getParameter("image");
     $extension = $request->getParameter("type");
     if ($state != "fetched") {
         throw new sfException("Unknown pixlr state: {$state}");
     }
     if (substr($url, 0, strlen(sfPixlrTools::PIXLR_URL)) != sfPixlrTools::PIXLR_URL) {
         throw new sfException("Unrecognized url: {$url}");
     }
     if ($options['target_vars']) {
         $target_parts = explode("#", $options['target'], 2);
         $options['target'] = $target_parts[0] . (strpos($options['target'], "?") === FALSE ? "?" : "&") . http_build_query($request->getGetParameters(), '', '&');
         if (isset($target_parts[1])) {
             $options['target'] .= "#" . $target_parts[1];
         }
     }
     if ($options['save_to']) {
         $full_path = sfConfig::get('app_pixlr_upload_dir', sfConfig::get('sf_upload_dir'));
         if (is_string($options['save_to'])) {
             $options['save_to'] = preg_replace('/(^|[\\/\\\\]??)([\\.\\s]+)($|[\\/\\\\])/', '/', $options['save_to']);
             $full_path .= "/" . $options['save_to'];
         }
         $name = $this->getUniqueFilename($request->getParameter("title") . "." . $extension, $full_path);
         $this->copyFromUrl($url, "{$full_path}/{$name}");
     }
     //$this->redirect($options['target']);
 }
开发者ID:theolymp,项目名称:diem,代码行数:32,代码来源:dmPixlr.php

示例3: executeSelect

 public function executeSelect(sfWebRequest $request)
 {
     if ($request->isXmlHttpRequest()) {
         // steps 1-3 requests & restart
         $this->setLayout(false);
         sfProjectConfiguration::getActive()->loadHelpers('Partial');
         $agent = new CircuitBreakerSelectionAgent($request->getGetParameters());
         if ($data = $agent->executeStep()) {
             $partial = 'filter' . ucfirst($request->getParameter('step')) . 'Step';
             $html = get_partial($partial, array('selection' => $request->getParameter($request->getParameter('step'), NULL), 'back_qs' => $data['back_qs'], 'data' => $data['data'], 'results_so_far' => $data['results_so_far'], 'search_params' => $agent->getSearchParameters()));
         } else {
             /*
              * Would only get here if LWS DB is incomplete.
              * In this case we need to use the query string to retrieve the relevant
              * data set from teh DB and then fill in the missing values.
              * 
              * Do not throw 404 from Ajax request, 
              * just send error messgae back to user.
              * 
              * !! I should log the query string in these cases to facilitate
              * updating of DB.
              */
             $html = "<p id='tech_prob'>Sorry, we our experiencing technical difficulties. Please contact technical support at <a href='mailto:webmaster@livewiresupply.com'>webmaster@livewiresupply.com</a></p>";
         }
         $response = $this->getResponse();
         $response->addCacheControlHttpHeader('no-cache');
         $response->setContentType('text/html');
         $response->sendHttpHeaders();
         return $this->renderText($html);
     } else {
         // ONLY FOR VOLTS/LAST STEP, or graceful degradation for non JavaScript enabled browsers
         $this->manuf_slug = LWS::getManufSlug($request->getParameter('manuf_id'));
         $this->manuf = LWS::unslugify($this->manuf_slug, true);
         $template = 'Filter' . ucfirst($request->getParameter('step')) . 'Step';
         $this->selection = $request->getParameter($request->getParameter('step'));
         $agent = new CircuitBreakerSelectionAgent($request->getGetParameters());
         /*
          * $agent would not return data only if LWS DB is incomplete.
          * Sequence of steps dictate that once LWS DB is complete,
          * server should throw a 404.  User may have be url surfing.
          * 
          * !!! be sure to update DB if necessary.
          */
         $this->forward404Unless($this->data = $agent->executeStep());
         if ($request->getParameter('step') == 'volts') {
             $this->redirect("@part?cat_slug=circuit-breakers&manuf_slug={$this->manuf_slug}&part_no=" . LWS::encode($this->data[0]['part']['part_no']));
         } else {
             // remove unecessary ajax 'back a step' query string from end of data array
             unset($this->data['back_qs']);
             $this->results_so_far = $this->data['results_so_far'];
             $this->data = $this->data['data'];
             $this->search_params = $agent->getSearchParameters();
             $response = $this->getResponse();
             $response->setTitle("{$this->manuf} Circuit Breakers Selection Process");
             $response->setSlot('body_class', 'cb_manuf');
             return $template;
         }
     }
 }
开发者ID:morganney,项目名称:livewire,代码行数:59,代码来源:actions.class.php

示例4: executeIndex

 /**
  * Показываем вики в обвязке EasyFinance
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     $wikiURL = $request->getParameter('wikiURL');
     $querySrting = http_build_query($request->getGetParameters());
     $this->setVar('wikiURL', "{$wikiURL}?{$querySrting}");
     $this->setLayout('layoutClear');
     return sfView::SUCCESS;
 }
开发者ID:ru-easyfinance,项目名称:EasyFinance,代码行数:13,代码来源:actions.class.php

示例5: executeVerify

 /**
  * Executes verify action
  *
  * @param sfWebRequest $request A request object
  */
 public function executeVerify(sfWebRequest $request)
 {
     if (false === ($properties = $this->verify($request->getGetParameters()))) {
         $this->getUser()->setFlash('sf_openid.error', 'Can\'t verify your OpenID');
     } else {
         $this->getUser()->setFlash('sf_openid.success', 'You\'ve successfully logged in');
         $this->processSregProperties($properties);
     }
     $this->redirect($this->generateUrl('sf_openid_consumer_login'));
 }
开发者ID:everzet,项目名称:sfOpenIDConsumerPlugin,代码行数:15,代码来源:sfOpenIDConsumerBaseActions.class.php

示例6: executeTransition_for

 public function executeTransition_for(sfWebRequest $request)
 {
     $this->getResponse()->setContentType('application/json');
     $lParams = $request->getGetParameters();
     $lDeal = DealTable::getInstance()->find($lParams['deal_id']);
     $lError = "";
     if ($lDeal->canTransitionFor($lParams['event'])) {
         $lDeal->transitionFor($lParams['event']);
     } else {
         $lError = "Cannot transition for: " . $lParams['event'];
     }
     return $this->redirect('deal/index');
 }
开发者ID:42medien,项目名称:spreadly,代码行数:13,代码来源:actions.class.php

示例7: executeConvert

 public function executeConvert(sfWebRequest $request)
 {
     // Check for additional get parameters
     if (count(array_diff(array_keys($request->getGetParameters()), sfConfig::get('app_convert_' . $request->getRequestFormat() . '_params')))) {
         return $this->setError(1200);
     }
     // Check for missing parameters
     if (!$request->hasParameter('amnt') || !$request->hasParameter('from') || !$request->hasParameter('to')) {
         return $this->setError(1100);
     }
     $currency = Doctrine::getTable('Currency');
     /* @var $currency Doctrine_Table */
     $this->from = $currency->findOneByCode($request->getParameter('from'));
     $this->to = $currency->findOneByCode($request->getParameter('to'));
     $this->amount = $request->getParameter('amnt');
     // Check for recognised currencies
     if (!$this->from instanceof Currency || !$this->to instanceof Currency) {
         return $this->setError(2000);
     }
     // Check the currencies are not the same
     if ($this->from == $this->to) {
         return $this->setError(1300);
     }
     // Check if amount contains >2 decimal digits.
     if (!is_numeric($this->amount) || strlen(substr(strrchr($this->amount, '.'), 1)) > sfConfig::get('app_convert_decimal_amount')) {
         return $this->setError(2100);
     }
     // Find cached currency rate
     $currency_rate = Doctrine::getTable('CurrencyRate')->getCurrencyRate($this->from, $this->to);
     /* @var $currency_rate CurrencyRate */
     // Check if currency rate needs updating
     if ($currency_rate->isNew() || $currency_rate->isOutdated()) {
         $currency_rate->setRate($this->getMoneyConverterRate());
         if (!$currency_rate->getRate()) {
             // Fallback functionality for rates not surved by themoneyconverter
             $currency_rate->setRate($this->getBloombergRate());
         }
         if ($currency_rate->getRate() > 0) {
             $currency_rate->setUpdatedAt(date('Y-m-d H:i:s'));
             $currency_rate->save();
         } else {
             return $this->setError(3200);
         }
     }
     // We want to be precise for currencies like ZWD where rates are often miniscule, but for other currencies 5 dp is fine
     $this->rate = $currency_rate->getRate() < 1.0E-5 ? number_format($currency_rate->getRate(), sfConfig::get('app_convert_decimal_stored')) : round($currency_rate->getRate(), sfConfig::get('app_convert_decimal_result'));
     $this->result = sprintf('%0.' . sfConfig::get('app_convert_decimal_result') . 'f', $this->amount * $this->rate);
     $this->at = $currency_rate->getDateTimeObject('updated_at')->format('d F Y H:i');
 }
开发者ID:asaraf28,项目名称:CurrencyConverter,代码行数:49,代码来源:actions.class.php

示例8: extractParameters

 /**
  *
  * @param sfWebRequest $request 
  * @return WSRequestParameters
  */
 public function extractParameters(sfWebRequest $request)
 {
     $webRequestParameters = new WSRequestParameters();
     $logger = Logger::getLogger('core.webservices');
     $requestMethod = $request->getMethod();
     $contentType = $request->getContentType();
     $logger->debug("HTTP Method: {$requestMethod}, Content-Type: {$contentType}");
     $requestParameters = $request->getRequestParameters();
     $logger->debug("Request Parameters: " . print_r($requestParameters, true));
     if (!isset($requestParameters['ws_method'])) {
         throw new WebServiceException('Web service method is not specified', 400);
     }
     $webServiceMethod = $requestParameters['ws_method'];
     $methodParameters = array();
     // Checking for deprecated method of sending parameters using an http header
     $header = $request->getHttpHeader('ohrm_ws_method_parameters');
     if (!empty($header)) {
         $methodParameters = json_decode($header, true);
         if (!is_array($methodParameters)) {
             throw new WebServiceException("header ohrm_ws_method_parameters should be json encoded", 400);
         }
     } else {
         // get request parameters in URL (eg: /empNumber/11) after removing the default parameters
         $methodParameters = array_diff_key($requestParameters, array_flip(array('action', 'module', 'ws_method', '_sf_route')));
         // Merge with GET parameters
         $methodParameters = array_merge($methodParameters, $request->getGetParameters());
         // Check for JSON encoded body
         if ($contentType === 'application/json') {
             $postParams = json_decode(file_get_contents('php://input'), true);
             $methodParameters = array_merge($methodParameters, $postParams);
         } else {
             if ($requestMethod === 'POST') {
                 $methodParameters = array_merge($methodParameters, $request->getPostParameters());
             }
         }
     }
     //        $arrayName = $this->getArrayNameForFunction($function);
     //        if(!array_key_exists($arrayName, $methodParameters)) {
     //            throw new WebServiceException('Required array name not provided', 404);
     //        }
     $webRequestParameters->setRequestMethod($requestMethod);
     $webRequestParameters->setMethod($webServiceMethod);
     $webRequestParameters->setParameters($methodParameters);
     //        $webRequestParameters->setAppId($authenticationParamerters['app_id']);
     //        $webRequestParameters->setAppToken($authenticationParamerters['app_token']);
     //        $webRequestParameters->setSessionToken($authenticationParamerters['session_token']);
     return $webRequestParameters;
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:53,代码来源:WSHelper.php

示例9: executeView

 public function executeView(sfWebRequest $request)
 {
     global $CFG;
     $CFG->current_app->requireMahara();
     $this->params = $request->getGetParameters();
     $this->course = false;
     if (isset($this->params['course']) && isset($this->params['catalog'])) {
         $eschool = GcrEschoolTable::getEschool($this->params['catalog'], true);
         if ($eschool) {
             $course = $eschool->getCourse($this->params['course']);
             if ($course) {
                 $this->course = $course;
             }
         }
     }
     $this->getResponse()->setTitle('Courses');
     sfConfig::set('sf_escaping_strategy', false);
 }
开发者ID:nanda555,项目名称:TestAppFromAWS,代码行数:18,代码来源:actions.class.php

示例10: executeList

 public function executeList(sfWebRequest $request)
 {
     $requested_dir = urldecode($request->getParameter('dir'));
     $relative_dir = $this->isPathSecured($this->root_path, $this->web_path . '/' . $requested_dir) ? $requested_dir : $this->root_dir;
     // browser dir relative to sf_web_dir
     $this->relative_dir = $relative_dir;
     // User dispay dir
     $this->display_dir = preg_replace('`^(' . $this->root_dir . ')`', '', $relative_dir);
     // browser parent dir
     $this->parent_dir = $this->relative_dir != $this->root_dir ? dirname($this->relative_dir) : '';
     // system path for current dir
     $this->path = $this->web_path . $relative_dir;
     // list of sub-directories in current dir
     $this->dirs = $this->getDirectories($this->path);
     // list of files in current dir
     $this->files = $this->getFiles($this->path);
     $this->current_route = $this->getContext()->getRouting()->getCurrentRouteName();
     $this->current_params = $request->getGetParameters();
     // forms
     $this->upload_form = new sfMediaBrowserUploadForm(array('directory' => $relative_dir));
     $this->dir_form = new sfMediaBrowserDirectoryForm(array('directory' => $relative_dir));
 }
开发者ID:GrifiS,项目名称:SyrexCMS,代码行数:22,代码来源:BasesfMediaBrowserActions.class.php

示例11: executeList

 public function executeList(sfWebRequest $request)
 {
     $display_dir = preg_replace('`^(' . $this->root_dir . ')`', '', $this->requested_dir);
     // dir relative to root_dir
     $this->relative_dir = $this->requested_dir;
     // dir relative to /web
     $this->relative_url = $this->root_dir . $this->requested_dir;
     // User dispay dir
     $this->display_dir = $display_dir ? $display_dir : '/';
     // browser parent dir
     $this->parent_dir = dirname($this->relative_dir) && dirname($this->relative_dir) != $this->relative_dir ? dirname($this->relative_dir) : null;
     // system path for current dir
     $this->path = $this->root_path . $this->requested_dir;
     // list of sub-directories in current dir
     $this->dirs = $this->getDirectories($this->path);
     // list of files in current dir
     $this->files = $this->getFiles($this->path);
     $this->current_route = $this->getContext()->getRouting()->getCurrentRouteName();
     $this->current_params = $request->getGetParameters();
     // forms
     $this->upload_form = new sfMediaBrowserUploadForm(array('directory' => $this->display_dir));
     $this->dir_form = new sfMediaBrowserDirectoryForm(array('directory' => $this->display_dir));
 }
开发者ID:vinyll,项目名称:sfMediaBrowserPlugin,代码行数:23,代码来源:BasesfMediaBrowserActions.class.php

示例12: executeGetUserStorageFile

 public function executeGetUserStorageFile(sfWebRequest $request)
 {
     global $CFG;
     $get_params = $request->getGetParameters();
     $signed_request = new GcrSignedRequest($get_params);
     if (!$signed_request->validateSignature()) {
         $CFG->current_app->gcError('Signature Invalid', 'gcpageaccessdenied');
     }
     $file = $get_params[GcrStorageAccessS3::FILE_GET_PARAMETER];
     if ($file) {
         if (!isset($get_params['app'])) {
             $app = $CFG->current_app->getInstitution();
         } else {
             $app = GcrInstitutionTable::getApp($get_params['app']);
         }
         $s3_storage = new GcrStorageAccessS3($app);
         if (!$s3_storage->isPublicObject($file)) {
             $CFG->current_app->requireLogin();
             $current_user = $CFG->current_app->getCurrentUser();
             $role_manager = $current_user->getRoleManager();
             if (isset($get_params['course_id']) && !$role_manager->hasPrivilege('EschoolAdmin')) {
                 // make sure the current user has access to this course
                 $flag = false;
                 $mdl_course = $CFG->current_app->getCourse($get_params['course_id']);
                 if ($mdl_course) {
                     // For new course instances, we want to maintain access to
                     // Cloud Storage URLs with course id signed to parent course.
                     $course_collection = $mdl_course->getCourseCollection();
                     if ($course_collection) {
                         foreach ($course_collection->getCourses() as $course_instance) {
                             if ($role_manager->hasCourseAccess($course_instance)) {
                                 $flag = true;
                                 break;
                             }
                         }
                     } else {
                         $flag = $role_manager->hasCourseAccess($mdl_course);
                     }
                 } else {
                     $CFG->current_app->gcError('course_id parameter ' . $get_params['course_id'] . 'does not exist', 'gcdatabaseerror');
                 }
                 if (!$flag) {
                     $CFG->current_app->gcError('User Does Not Have Course Access', 'gcpageaccessdenied');
                 }
             }
         }
         $url = $s3_storage->getObjectUrl($file);
     } else {
         $url = $CFG->current_app->getUrl();
     }
     $this->redirect($url);
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:52,代码来源:actions.class.php

示例13: executeCronUpdateCoursesCount

 public function executeCronUpdateCoursesCount(sfWebRequest $request)
 {
     global $CFG;
     $CFG->current_app->requireMahara();
     $this->params = $request->getGetParameters();
     $platform_short_name = $CFG->current_app->getShortName();
     $product_type = isset($this->params['type']) ? $this->params['type'] : "";
     // gets all available schools
     $eschool_array = array();
     $catalog_courses_count = array();
     foreach ($CFG->current_app->getMnetEschools() as $eschool) {
         //if (GcrEschoolTable::authorizeEschoolAccess($eschool, true)) {
         $eschool_array[$eschool->getFullName()] = $eschool;
         //}
     }
     ksort($eschool_array);
     // gets catalog-wise courses count
     foreach ($eschool_array as $eschool) {
         $catalog_courses_count[$eschool->getShortName()] = $this->getHTMLCoursesCount($eschool->getShortName());
     }
     // gets all products list
     $all_products = GcrProductsTable::getAllProducts($platform_short_name, $product_type);
     $all_products_details = array();
     foreach ($all_products as $product) {
         $all_products_details[$product->getShortName()]["id"] = $product->getId();
         $all_products_details[$product->getShortName()]["product_type_id"] = $product->getProductTypeId();
         $all_products_details[$product->getShortName()]["short_name"] = $product->getShortName();
         $all_products_details[$product->getShortName()]["institution_short_name"] = $product->getInstitutionShortName();
         $all_products_details[$product->getShortName()]["catalog_short_name"] = $product->getCatalogShortName();
         $all_products_details[$product->getShortName()]["platform_short_name"] = $product->getPlatformShortName();
         if ($product->getProductTypeId() == 2 || $product->getProductTypeId() == 3) {
             $is_exist = GcrInstitutionCatalogCoursesTable::checkIsExist($product->getInstitutionShortName(), $product->getCatalogShortName(), $product->getPlatformShortName());
             $ctlg_crses_count = isset($catalog_courses_count[$product->getCatalogShortName()]) ? $catalog_courses_count[$product->getCatalogShortName()] : 0;
             if ($is_exist == 0) {
                 $cron_obj = new GcrInstitutionCatalogCourses();
                 $cron_obj->setPlatformShortName($product->getPlatformShortName());
                 $cron_obj->setInstitutionShortName($product->getInstitutionShortName());
                 $cron_obj->setCatalogShortName($product->getCatalogShortName());
                 $cron_obj->setProductTypeId($product->getProductTypeId());
                 $cron_obj->setCoursesCount($ctlg_crses_count);
                 $cron_obj->save();
             } else {
                 Doctrine_Query::create()->update('GcrInstitutionCatalogCourses')->set('courses_count', '?', $ctlg_crses_count)->where('institution_short_name = ?', $product->getInstitutionShortName())->andWhere('platform_short_name = ?', $product->getPlatformShortName())->andWhere('catalog_short_name = ?', $product->getCatalogShortName())->andWhere('product_type_id = ?', $product->getProductTypeId())->execute();
             }
         } else {
             if ($product->getProductTypeId() == 1) {
                 $institution_name = $product->getInstitutionShortName();
                 $mhr_institution_obj = $CFG->current_app->selectFromMhrTable('institution', 'name', $institution_name, true);
                 if ($mhr_institution_obj) {
                     $mhr_institution = new GcrMhrInstitution($mhr_institution_obj, $CFG->current_app);
                     $current_eschools = array();
                     $eschools = $mhr_institution->getEschools();
                     if ($eschools) {
                         foreach ($eschools as $eschool) {
                             $current_eschools[$eschool->getShortName()] = $eschool->getFullName();
                         }
                     }
                     asort($current_eschools);
                     foreach ($current_eschools as $current_eschool_key => $current_eschool_val) {
                         if (stripos(strtolower($current_eschool_val), "(*)") === false && stripos(strtolower($current_eschool_val), "(\$)") === false) {
                             $params = array();
                             $params["start_index"] = 0;
                             $params["mode"] = "Eschool";
                             $params["mode_id"] = $current_eschool_key;
                             $this->course_list = new GcrCourseList($params, $CFG->current_app);
                             $catalog_courses_count[$current_eschool_key] = $this->course_list->getCoursesCount();
                             $is_exist = GcrInstitutionCatalogCoursesTable::checkIsExist($product->getInstitutionShortName(), $current_eschool_key, $product->getPlatformShortName());
                             $ctlg_crses_count = isset($catalog_courses_count[$current_eschool_key]) ? $catalog_courses_count[$current_eschool_key] : 0;
                             if ($is_exist == 0) {
                                 $cron_obj = new GcrInstitutionCatalogCourses();
                                 $cron_obj->setPlatformShortName($product->getPlatformShortName());
                                 $cron_obj->setInstitutionShortName($product->getInstitutionShortName());
                                 $cron_obj->setCatalogShortName($current_eschool_key);
                                 $cron_obj->setProductTypeId($product->getProductTypeId());
                                 $cron_obj->setCoursesCount($ctlg_crses_count);
                                 $cron_obj->save();
                             } else {
                                 Doctrine_Query::create()->update('GcrInstitutionCatalogCourses')->set('courses_count', '?', $ctlg_crses_count)->where('institution_short_name = ?', $product->getInstitutionShortName())->andWhere('platform_short_name = ?', $product->getPlatformShortName())->andWhere('catalog_short_name = ?', $current_eschool_key)->andWhere('product_type_id = ?', $product->getProductTypeId())->execute();
                             }
                         }
                     }
                 }
             }
         }
     }
     /* 		print "<pre>";
     		print_r($catalog_courses_count);
     		//print_r($all_products_details);
     		print "</pre>"; */
     echo "<br>Completed<br>";
     exit;
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:92,代码来源:actions.class.php

示例14: executeSubscriptions

 /**
  * executes subscriptions list mahara
  *
  * @param sfWebRequest $request_object
  * @param returns products details along with courses.
  * gets values from get method
  */
 public function executeSubscriptions(sfWebRequest $request)
 {
     global $CFG;
     $CFG->current_app->requireMahara();
     $this->params = $request->getGetParameters();
     $this->course = false;
     $this->current_app_short_name = $CFG->current_app->getShortName();
     // gets all available schools
     /* 		$eschool_array = array();
     		$catalog_courses_count = array();
     		foreach($CFG->current_app->getMnetEschools() as $eschool) {
     			//if (GcrEschoolTable::authorizeEschoolAccess($eschool, true)) {
     				$eschool_array[$eschool->getFullName()] = $eschool;
     			//}
     		} 
     		ksort($eschool_array);
     		// gets catalog-wise courses count
     		foreach($eschool_array as $eschool) {
     			//$catalog_courses_count[$eschool->getShortName()] = $eschool->getFullName();
     			$ctlg_courses_list = $this->getHTMLCoursesCount($eschool->getShortName());
     			$catalog_courses_count[$eschool->getShortName()] = $ctlg_courses_list;
     		}
     		$this->catalog_courses_count = $catalog_courses_count; */
     // gets subscriptions products
     $products = GcrProductsTable::getProductLibraries($this->current_app_short_name);
     //$ins_prod_orders = GcrInstitutionProductOrdersTable::get_orders("lcrcconline", "microsoft", 6);
     $products_list = array();
     $products_list_institution = array();
     $products_details = array();
     foreach ($products as $product) {
         $products_list[$product->getShortName()] = $product->getFullName();
         $products_list_institution[$product->getShortName()] = $product->getInstitutionShortName();
         $products_details[$product->getShortName()]["id"] = $product->getId();
         $products_details[$product->getShortName()]["short_name"] = $product->getShortName();
         $products_details[$product->getShortName()]["full_name"] = $product->getFullName();
         $products_details[$product->getShortName()]["institution_short_name"] = $product->getInstitutionShortName();
         $products_details[$product->getShortName()]["description"] = $product->getDescription();
         $products_details[$product->getShortName()]["cost"] = $product->getCost();
         $products_details[$product->getShortName()]["pricing_html"] = $product->getPricingHtml();
         $products_details[$product->getShortName()]["icon"] = $product->getIcon();
     }
     $this->libraries_list = $products_list;
     $this->products_list_institution = $products_list_institution;
     $this->products_details = $products_details;
     $this->getResponse()->setTitle('Subscriptions');
     sfConfig::set('sf_escaping_strategy', false);
 }
开发者ID:janaece,项目名称:globalclassroom4_clean_backup,代码行数:54,代码来源:actions.class.php

示例15: executeSubscriptions

 public function executeSubscriptions(sfWebRequest $request)
 {
     global $CFG;
     $CFG->current_app->requireMahara();
     $this->params = $request->getGetParameters();
     $this->course = false;
     if (isset($this->params['course']) && isset($this->params['catalog'])) {
         $eschool = GcrEschoolTable::getEschool($this->params['catalog'], true);
         if ($eschool) {
             $course = $eschool->getCourse($this->params['course']);
             if ($course) {
                 $this->course = $course;
             }
         }
     }
     $eschool_array = array();
     $catalog_courses_count = array();
     foreach ($CFG->current_app->getMnetEschools() as $eschool) {
         if (GcrEschoolTable::authorizeEschoolAccess($eschool, true)) {
             $eschool_array[$eschool->getFullName()] = $eschool;
         }
     }
     ksort($eschool_array);
     foreach ($eschool_array as $eschool) {
         //$catalog_courses_count[$eschool->getShortName()] = $eschool->getFullName();
         $catalog_courses_count[$eschool->getShortName()] = $this->getHTMLCoursesCount($eschool->getShortName());
     }
     $this->catalog_courses_count = $catalog_courses_count;
     $products = GcrProductsTable::getProductLibraries();
     $products_list = array();
     $products_details = array();
     foreach ($products as $product) {
         $products_list[$product->getShortName()] = $product->getFullName();
         $products_details[$product->getShortName()]["id"] = $product->getId();
         $products_details[$product->getShortName()]["short_name"] = $product->getShortName();
         $products_details[$product->getShortName()]["full_name"] = $product->getFullName();
         $products_details[$product->getShortName()]["description"] = $product->getDescription();
         $products_details[$product->getShortName()]["cost"] = $product->getCost();
         $products_details[$product->getShortName()]["pricing_html"] = $product->getPricingHtml();
         $products_details[$product->getShortName()]["icon"] = $product->getIcon();
     }
     $this->libraries_list = $products_list;
     $this->products_details = $products_details;
     $this->getResponse()->setTitle('Courses');
     sfConfig::set('sf_escaping_strategy', false);
 }
开发者ID:nanda555,项目名称:TestAppFromAWS,代码行数:46,代码来源:actions.class_2015_07_11.php


注:本文中的sfWebRequest::getGetParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。