コード例 #1
0
ファイル: style.php プロジェクト: WineWorld/joomlatrialcmbg
 /**
  * Method to delete rows.
  *
  * @param   array  &$pks  An array of item ids.
  *
  * @return  boolean  Returns true on success, false on failure.
  */
 public function delete(&$pks)
 {
     $pks = (array) $pks;
     $user = JFactory::getUser();
     $table = $this->getTable();
     // Iterate the items to delete each one.
     foreach ($pks as $pk) {
         if ($table->load($pk)) {
             // Access checks.
             if (!$user->authorise('core.delete', 'com_templates')) {
                 throw new Exception(JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
             }
             // You should not delete a default style
             if ($table->home != '0') {
                 JError::raiseWarning(SOME_ERROR_NUMBER, Jtext::_('COM_TEMPLATES_STYLE_CANNOT_DELETE_DEFAULT_STYLE'));
                 return false;
             }
             if (!$table->delete($pk)) {
                 $this->setError($table->getError());
                 return false;
             }
         } else {
             $this->setError($table->getError());
             return false;
         }
     }
     // Clean cache
     $this->cleanCache();
     return true;
 }
コード例 #2
0
ファイル: twitterprofile.php プロジェクト: juanferden/adoperp
 public static function postMessage($params, $data)
 {
     $attachment = array('message' => $data['message']);
     $message = array();
     if (!class_exists('TwitterOAuth')) {
         require_once dirname(__FILE__) . '/elements/twitter/twitteroauth.php';
     }
     $user = $params->params->get('groupid');
     $checked = 0;
     $log = '';
     $publish = 1;
     if (isset($user->checked)) {
         $checked = 1;
         $twitter = unserialize($params->params->get('access_token'));
         $connection = new TwitterOAuth($params->params->get('app_appid'), $params->params->get('app_secret'), $twitter['oauth_token'], $twitter['oauth_token_secret']);
         $parameters = array('status' => $attachment['message']);
         $status = $connection->post('statuses/update', $parameters);
         if (isset($status->errors)) {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . $status->errors[0]->message . ' <br/>';
             $publish = 0;
         } else {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . JTEXT::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE_SUCCESSFULL') . '<br/>';
             $publish = 1;
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'twitter';
     return $message;
 }
コード例 #3
0
ファイル: pagination.php プロジェクト: ronildo/minima
function pagination_list_footer($list)
{
    static $instancetest = 0;

    // Initialise variables.
    $lang = JFactory::getLanguage();
    $html = "<div class=\"list-footer\">\n";

    //$html .= "\n<div class=\"limit\">".JText::_('JGLOBAL_DISPLAY_NUM').$list['limitfield']."</div>";

    $html .= $list['pageslinks'];
    $html .= "<span>".Jtext::_('TPL_MINIMA_TOTAL')." ".$list['total']." ".Jtext::_('TPL_MINIMA_ITEMS')."</span>";

    //$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";

    //$html .= "\n<input id=\"limit\" type=\"hidden\" name=\"limit\" value=\"15\" />";

    if ($instancetest == 0) {
        $html .= "\n<input type=\"hidden\" name=\"" . $list['prefix'] . "limitstart\" value=\"".$list['limitstart']."\" />";
    }

    $instancetest = 1;

    $html .= "\n</div>";

    return $html;
}
コード例 #4
0
ファイル: payments.php プロジェクト: jaanusnurmoja/redjoomla
 function check()
 {
     if (empty($this->submit_key)) {
         $this->setError(Jtext::_('COM_REDFORM_PAYMENT_TABLE_SUBMIT_KEY_IS_REQUIRED'));
         return false;
     }
     return true;
 }
コード例 #5
0
ファイル: toolbar.php プロジェクト: dark452/db8locate
 public function renderSubmenu($vName = null)
 {
     if (is_null($vName)) {
         $vName = $this->input->getCmd('view', 'cpanel');
     }
     $this->input->set('view', $vName);
     parent::renderSubmenu();
     $toolbar = FOFToolbar::getAnInstance($this->input->getCmd('option', 'com_db8locate'), $this->config);
     $toolbar->appendLink(Jtext::_('COM_DB8LOCATE_SUBMENU_CATEGORIES'), 'index.php?option=com_categories&extension=com_db8locate', $vName == 'categories');
 }
コード例 #6
0
ファイル: linkedingroup.php プロジェクト: juanferden/adoperp
 public static function postMessage($params, $data)
 {
     $attachment = array('comment' => $data['message'], 'content' => array('title' => $data['name'], 'description' => $data['description'], 'submittedUrl' => $data['link'], 'submitted-image-url' => $data['picture']), 'visibility' => array('code' => 'anyone'));
     $body = $attachment;
     $newArray = array('title' => $body['comment'], 'summary' => '', 'content' => $body['content']);
     $body = $newArray;
     $message = array();
     $groupid = $params->params->get('groupid');
     $access_token = $params->params->get('access_token');
     $log = '';
     $publish = 1;
     $checked = 0;
     foreach ($groupid as $key => $linkedID) {
         $id = $linkedID->id;
         if (isset($linkedID->checked)) {
             $checked = 1;
             $config = array('oauth2_access_token' => $access_token, 'format' => 'json');
             $urlInfo = parse_url('http://api.linkedin.com/v1/groups/' . $id . '/posts?');
             if (isset($urlInfo['query'])) {
                 $query = parse_str($urlInfo['query']);
                 $config = array_merge($config, $query);
             }
             $url = 'https://api.linkedin.com' . $urlInfo['path'] . '?' . http_build_query($config);
             if (!is_string($body)) {
                 $body = json_encode($body);
             }
             $ch = curl_init();
             curl_setopt($ch, CURLOPT_URL, $url);
             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
             curl_setopt($ch, CURLOPT_POST, true);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
             curl_setopt($ch, CURLOPT_HEADER, 0);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
             $go = curl_exec($ch);
             $page = json_decode($go);
             if (isset($page->message)) {
                 $log .= Jtext::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE') . ' <a href="http://www.linkedin.com/groups/Fan-torres-5162538?home=&gid=' . $id . '" target="_blank" style="text-decoration: underline;">' . $linkedID->name . '</a>  - ' . $page->message . ' <br/>';
                 $publish = 0;
             } else {
                 $log .= Jtext::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE') . ' <a href="http://www.linkedin.com/groups/Fan-torres-5162538?home=&gid=' . $id . '" style="text-decoration: underline;" target="_blank">' . $linkedID->name . '</a> - ' . JTEXT::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE_SUCCESSFULL') . '<br/>';
                 $publish = 1;
             }
             curl_close($ch);
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'linkedin';
     return $message;
 }
コード例 #7
0
 function submitinfo()
 {
     jimport('joomla.mail.helper');
     $app =& JFactory::getApplication();
     $params = JComponentHelper::getParams('com_redevent');
     if (!$params->get('enable_moreinfo', 1)) {
         echo Jtext::_('COM_REDEVENT_MOREINFO_ERROR_DISABLED_BY_ADMIN');
         $app->close(403);
     }
     $xref = JRequest::getInt('xref');
     $email = JRequest::getVar('email');
     $model = $this->getModel('details');
     $details = $model->getDetails();
     if ($xref && $email && JMailHelper::isEmailAddress($email)) {
         $mailer =& JFactory::getMailer();
         $mailer->IsHTML(true);
         $mailer->setSubject(JText::sprintf('COM_REDEVENT_MOREINFO_MAIL_SUBJECT', $details->full_title));
         $mailer->AddAddress($app->getCfg('mailfrom'), $app->getCfg('sitename'));
         $mailer->AddReplyTo(array($email, JRequest::getVar('name')));
         $data = array();
         if ($d = JRequest::getVar('name')) {
             $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_NAME'), $d);
         }
         if ($d = JRequest::getVar('email')) {
             $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_EMAIL'), $d);
         }
         if ($d = JRequest::getVar('company')) {
             $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_COMPANY'), $d);
         }
         if ($d = JRequest::getVar('phonenumber')) {
             $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_PHONENUMBER'), $d);
         }
         if ($d = JRequest::getVar('comments')) {
             $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_COMMENTS'), str_replace("\n", "<br/>", $d));
         }
         $table = '<table>';
         foreach ($data as $d) {
             $table .= '<tr><td>' . $d[0] . '</td><td>' . $d[1] . '</td></tr>';
         }
         $table .= '</table>';
         $link = JRoute::_(JURI::base() . RedeventHelperRoute::getDetailsRoute($details->did, $details->xslug));
         $link = JHTML::link($link, $details->full_title);
         $body = JText::sprintf('COM_REDEVENT_MOREINFO_MAIL_BODY', $link, $table);
         $mailer->setBody($body);
         $mailer->send();
     }
     // confirm sending
     JRequest::setVar('view', 'moreinfo');
     Jrequest::setVar('layout', 'final');
     $this->display();
 }
コード例 #8
0
ファイル: ingredients.php プロジェクト: rutvikd/ak-recipes
 /**
  * Method to clone existing Ingredients
  *
  * @return void
  */
 public function duplicate()
 {
     // Check for request forgeries
     Jsession::checkToken() or jexit(JText::_("JINVALID_TOKEN"));
     // Get id(s)
     $pks = $this->input->post->get("cid", array(), "array");
     try {
         if (empty($pks)) {
             throw new Exception(JText::_("COM_AKRECIPES_NO_ELEMENT_SELECTED"));
         }
         ArrayHelper::toInteger($pks);
         $model = $this->getModel();
         $model->duplicate($pks);
         $this->setMessage(Jtext::_("COM_AKRECIPES_ITEMS_SUCCESS_DUPLICATED"));
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), "warning");
     }
     $this->setRedirect("index.php?option=com_akrecipes&view=ingredients");
 }
コード例 #9
0
ファイル: helper.php プロジェクト: NicholasJohn16/forums
 public function threads($thread, $createNew = true)
 {
     $html = $this->_template->getHelper('html');
     $options = array();
     $entities = $this->getService('repos://site/forums.thread')->getQuery()->where('parent_id', '=', $thread->parent->id)->order('last_comment_on', 'DESC')->limit('20')->fetchSet();
     $parameters = array();
     if ($createNew) {
         $options[] = JText::_('COM-FORUMS-POST-CREATE-NEW-THREAD');
         $parameters['selected'] = $thread->id;
     } else {
         $options[] = JText::_('COM-FORUMS-THREAD-SELECT-THREAD');
     }
     $options[-1] = Jtext::_('COM-FORUMS-POST-SPECIFY-THREAD');
     foreach ($entities as $entity) {
         $options[$entity->id] = $entity->title;
     }
     $parameters['options'] = $options;
     return $html->select('tid', $parameters)->class('input-xlarge');
 }
コード例 #10
0
ファイル: categories.php プロジェクト: brianteeman/cam
 /**
  * Method to clone existing Categories
  *
  * @return void
  */
 public function duplicate()
 {
     // Check for request forgeries
     Jsession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     // Get id(s)
     $pks = $this->input->post->get('cid', array(), 'array');
     try {
         if (empty($pks)) {
             throw new Exception(JText::_('COM_VOCAB_NO_ELEMENT_SELECTED'));
         }
         ArrayHelper::toInteger($pks);
         $model = $this->getModel();
         $model->duplicate($pks);
         $this->setMessage(Jtext::_('COM_VOCAB_ITEMS_SUCCESS_DUPLICATED'));
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
     }
     $this->setRedirect('index.php?option=com_vocab&view=categories');
 }
コード例 #11
0
ファイル: view.html.php プロジェクト: jputz12/OneNow-Vshop
    protected function addMenuSelection()
    {
        require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
        $canDo = MaximenuckHelper::getActions($this->state->get('filter.parent_id'));
        $menushtml = '';
        // Add a batch button
        if ($canDo->get('core.edit')) {
            $menushtml .= '<div id="toolbar-menu" class="btn-wrapper">';
            foreach ($this->get('Menus') as $menu) {
                $active = $menu->menutype == JFactory::getApplication()->input->get('menutype') ? ' active' : '';
                $menushtml .= '<a href="index.php?option=com_maximenuck&view=migration&menutype=' . $menu->menutype . '"><button class="btn btn-small btn-primary' . $active . '">
						<i class="icon-list-view"></i>
						' . $menu->title . '</button></a>';
            }
        } else {
            $menushtml = Jtext::_('COM_MENUMANAGERCK_NOT_HAVE_RIGHT_TO_EDIT');
        }
        return $menushtml;
    }
コード例 #12
0
ファイル: uploadimage.php プロジェクト: juanferden/adoperp
 protected function getInput()
 {
     if ($this->value != '') {
         $avatar = '<img src="' . JURI::root() . 'images/bt_socialconnect/avatar/' . $this->value . '"/>';
         $html = '<div class=\'imageupload\'>';
         $html .= '<span class="editlinktip hasTip" title="' . htmlspecialchars($avatar) . '">';
         $html .= '<img src=' . JURI::root() . 'images/bt_socialconnect/avatar/' . $this->value . '   style="height:30px"  />';
         $html .= '</span>';
         $html .= '<input type="file" name="upload_image"  class="inputbox" size="22"/>';
         $html .= '</div>';
         $html .= '<div class="clr"></div>';
         $html .= '<label></label>';
         $html .= '<input type="checkbox" class="textbook" name="jform[default_values]" value="">' . Jtext::_('COM_BT_SOCIALCONNECT_DELETE_IMAGE');
         $html .= '<div class="clr"></div>';
     } else {
         $html = '<div class=\'inputupload\'>';
         $html .= '<input type="file" name="upload_image" style="width:230px"  class="inputbox" size="30"/>';
         $html .= '</div>';
     }
     return $html;
 }
コード例 #13
0
 /**
  * ResponseReceived()
  * From the payment page, the user returns to the shop. The order email is sent, and the cart emptied.
  *
  * @author Valerie Isaksen
  *
  */
 function PaymentResponseReceived()
 {
     if (!class_exists('vmPSPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
     }
     JPluginHelper::importPlugin('vmpayment');
     $return_context = "";
     $dispatcher = JDispatcher::getInstance();
     $html = "";
     $paymentResponse = Jtext::_('COM_VIRTUEMART_CART_THANKYOU');
     $returnValues = $dispatcher->trigger('plgVmOnPaymentResponseReceived', array('html' => &$html, &$paymentResponse));
     // 	JRequest::setVar('paymentResponse', Jtext::_('COM_VIRTUEMART_CART_THANKYOU'));
     // 	JRequest::setVar('paymentResponseHtml', $html);
     $view = $this->getView('pluginresponse', 'html');
     $layoutName = JRequest::getVar('layout', 'default');
     $view->setLayout($layoutName);
     $view->assignRef('paymentResponse', $paymentResponse);
     $view->assignRef('paymentResponseHtml', $html);
     // Display it all
     $view->display();
 }
コード例 #14
0
ファイル: facebookpage.php プロジェクト: juanferden/adoperp
 public static function postMessage($params, $data)
 {
     $attachment = array('access_token' => $data['access_token'], 'message' => $data['message'], 'name' => $data['name'], 'link' => $data['link'], 'description' => $data['description'], 'picture' => $data['picture']);
     $message = array();
     $fbpages = $params->params->get('groupid');
     $log = '';
     $publish = 1;
     $checked = 0;
     foreach ($fbpages as $key => $pages) {
         $id = $pages->id;
         //Replace accesstoken to fanpage
         $attachment['access_token'] = $pages->access_token;
         if (isset($pages->checked)) {
             $checked = 1;
             $url = "https://graph.facebook.com/{$id}/feed";
             $ch = curl_init();
             curl_setopt($ch, CURLOPT_URL, $url);
             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
             curl_setopt($ch, CURLOPT_POST, true);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
             curl_setopt($ch, CURLOPT_HEADER, 0);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             $go = curl_exec($ch);
             $page = json_decode($go);
             if (isset($page->error)) {
                 $log .= Jtext::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE') . ' <a href="https://www.facebook.com/' . $id . '" target="_blank" style="text-decoration: underline;">' . $pages->name . '</a>  - ' . $page->error->message . ' <br/>';
                 $publish = 0;
             } else {
                 $log .= Jtext::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE') . ' <a href="https://www.facebook.com/' . $id . '" target="_blank" style="text-decoration: underline;">' . $pages->name . '</a>  - ' . JTEXT::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE_SUCCESSFULL') . '<br/>';
             }
             curl_close($ch);
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'facebook';
     return $message;
 }
コード例 #15
0
ファイル: quickadd.php プロジェクト: julienV/Joomla-Tracks
 public function add()
 {
     $mainframe = JFactory::getApplication();
     $option = $this->input->getCmd('option', 'com_tracks');
     $db = JFactory::getDBO();
     $individualid = $this->input->getInt("individualid", 0);
     $name = $this->input->get("quickadd", '', 'request', 'string');
     $srid = $this->input->getInt("subround_id", 0);
     $projectid = $mainframe->getUserState($option . "project");
     // add the new individual as their name was sent through.
     if (!$individualid) {
         $model = FOFModel::getAnInstance('Individuals', 'TracksModel');
         $name = explode(" ", $name);
         $firstname = ucfirst(array_shift($name));
         $lastname = ucfirst(implode(" ", $name));
         $data = array("first_name" => $firstname, "last_name" => $lastname);
         $res = $model->save($data);
         if (!$res) {
             $msg = Jtext::_('COM_TRACKS_Error_adding_individual') . ': ' . $model->getError();
             $this->setRedirect("index.php?option=com_tracks&view=subroundresults&subround_id=" . $srid, $msg, 'error');
         }
         $individualid = $model->getId();
     }
     // check if indivual belongs to project
     $query = ' SELECT individual_id FROM #__tracks_projects_individuals ' . ' WHERE project_id = ' . $db->Quote($projectid) . '   AND individual_id = ' . $db->Quote($individualid);
     $db->setQuery($query);
     $res = $db->loadResult();
     if (!$res) {
         $db->setQuery("INSERT INTO #__tracks_projects_individuals (individual_id, project_id) VALUES (" . $individualid . ", " . $projectid . ")");
         $db->query();
     }
     // assign the individual to the subround.
     if ($individualid && $srid) {
         $db->setQuery("INSERT INTO #__tracks_rounds_results (individual_id, subround_id) VALUES (" . $individualid . ", " . $srid . ")");
         $db->query();
     }
     $this->setRedirect("index.php?option=com_tracks&view=subroundresults&subround_id=" . $srid);
 }
コード例 #16
0
 function ShipmentResponseReceived()
 {
     // TODO: not ready yet
     JPluginHelper::importPlugin('vmshipment');
     $return_context = "";
     $dispatcher = JDispatcher::getInstance();
     $html = "";
     $shipmentResponse = Jtext::_('COM_VIRTUEMART_CART_THANKYOU');
     $dispatcher->trigger('plgVmOnShipmentResponseReceived', array('html' => &$html, &$shipmentResponse));
     /*
     // 	JRequest::setVar('paymentResponse', Jtext::_('COM_VIRTUEMART_CART_THANKYOU'));
     // 	JRequest::setVar('paymentResponseHtml', $html);
     $view = $this->getView('pluginresponse', 'html');
     $layoutName = JRequest::getVar('layout', 'default');
     $view->setLayout($layoutName);
     
     $view->assignRef('shipmentResponse', $shipmentResponse);
     $view->assignRef('shipmentResponseHtml', $html);
     
     // Display it all
     $view->display();
     */
 }
コード例 #17
0
 /**
  * Creates the output
  *
  * @since 0.5
  * @param int $tpl
  */
 function display($tpl = null)
 {
     $params = JComponentHelper::getParams('com_redevent');
     if (!$params->get('enable_moreinfo', 1)) {
         echo Jtext::_('COM_REDEVENT_MOREINFO_ERROR_DISABLED_BY_ADMIN');
         return;
     }
     if ($this->getLayout() == 'final') {
         return $this->_displayFinal($tpl);
     }
     $xref = JRequest::getInt('xref');
     $uri =& JFactory::getUri();
     $document = JFactory::getDocument();
     $user =& Jfactory::getUser();
     if (!$xref) {
         echo JText::_('COM_REDEVENT_MOREINFO_ERROR_MISSING_XREF');
     }
     $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/moreinfo.css');
     $this->assign('xref', $xref);
     $this->assign('action', JRoute::_(RedeventHelperRoute::getMoreInfoRoute($xref)));
     $this->assignRef('user', $user);
     parent::display($tpl);
 }
コード例 #18
0
ファイル: paypal.php プロジェクト: SeventF/ikea.com
 /**
  * @return bool|null
  */
 function plgVmOnUserPaymentCancel()
 {
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $order_number = JRequest::getString('on', '');
     $virtuemart_paymentmethod_id = JRequest::getInt('pm', '');
     if (empty($order_number) or empty($virtuemart_paymentmethod_id) or !$this->selectedThisByMethodId($virtuemart_paymentmethod_id)) {
         return NULL;
     }
     if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
         return NULL;
     }
     if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {
         return NULL;
     }
     VmInfo(Jtext::_('VMPAYMENT_PAYPAL_PAYMENT_CANCELLED'));
     $session = JFactory::getSession();
     $return_context = $session->getId();
     if (strcmp($paymentTable->paypal_custom, $return_context) === 0) {
         $this->handlePaymentUserCancel($virtuemart_order_id);
     }
     return TRUE;
 }
コード例 #19
0
 function renderMailLayout()
 {
     $this->setLayout('mail_html_question');
     $this->comment = JRequest::getString('comment');
     $vendorModel = VmModel::getModel('vendor');
     $this->vendor = $vendorModel->getVendor();
     $this->subject = Jtext::_('COM_VIRTUEMART_QUESTION_ABOUT') . $this->product->product_name;
     $this->vendorEmail = $this->user['email'];
     // in this particular case, overwrite the value for fix the recipient name
     $this->vendor->vendor_name = $this->user['name'];
     //$this->vendorName= $this->user['email'];
     if (VmConfig::get('order_mail_html')) {
         $tpl = 'mail_html_question';
     } else {
         $tpl = 'mail_raw_question';
     }
     $this->setLayout($tpl);
     parent::display();
 }
コード例 #20
0
    function getDisplayTab($tab, $user, $ui) {

        $my = JFactory::getUser();
        $database = &JFactory::getDBO();

        if ($my->id != $user->user_id || !$my->id) {
            return;
        }

        $componentPath = JPATH_SITE . DS . 'components' . DS . 'com_bids';

        require_once($componentPath.DS.'options.php');
        $cfg = new BidConfig();

        require_once($componentPath . DS . 'helpers' . DS . 'tools.php');
        require_once($componentPath . DS . 'thefactory' . DS . 'front.userprofile.php');
        require_once($componentPath . DS . 'helpers' . DS . 'profile.php');


        JModel::addIncludePath($componentPath . DS . 'models');

        $bidsUserModel = JModel::getInstance('user','bidsModel');
        $bidsUserModel->loadUser($my->id);
        $bidsProfile = $bidsUserModel->get('profile');

        $balance = $bidsUserModel->getBalance();

        //here begins output
        $html =
        '<div>
            <table width="100%">
                <tr>
                    <td colspan="4">';

                        if($cfg->bid_opt_enable_acl) {
                            $sellerImg = JURI::root() . 'components/com_bids/images/f_can_sell'.( !empty($bidsProfile->isSeller) ? '1':'2').'.gif';
                            $html .= '<div style="width:120px;float:left;">'.
                                           JHTML::image($sellerImg,'','style="margin-right:50px;" border="0"').
                                       '</div>';
                            $bidderImg = JURI::root() . 'components/com_bids/images/f_can_buy'.( !empty($bidsProfile->isBidder) ? '1':'2').'.gif';
                            $html .= '<div style="width:120px;float:left;">'.
                                           JHTML::image($bidderImg,'','style="margin-right:60px;" border="0"').
                                       '</div>';
                        }
                        elseif(!empty($bidsProfile->powerseller)) {
                            $sellerImg = JURI::root() . 'components/com_bids/images/f_can_sell'.( !empty($bidsProfile->isSeller) ? '1':'2').'.gif';
                            $html .= '<div style="width:120px;float:left;">'.
                                           JHTML::image($sellerImg,'','style="margin-right:50px;" border="0"').
                                       '</div>';
                        }

                        $verifiedImg = JURI::root() . 'components/com_bids/images/verified_'.( !empty($bidsProfile->verified) ? '1':'0').'.gif';
                        $html .= '<div style="width:120px;float:left;">'.
                                       JHTML::image($verifiedImg,'','style="margin-right:50px;" border="0"').
                                   '</div>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">';

                        if($cfg->bid_opt_enable_acl) {
                            if (!empty($bidsProfile->isSeller)){
                                $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->powerseller ? JText::_('Powerseller') : JText::_('Seller'))  . "</div>";
                            } else {
                                $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->isSeller ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>";
                            }
                            $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_bidder') . ":" . ($bidsProfile->isBidder ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>";
                        }
                        elseif(!empty($bidsProfile->powerseller)) {
                            $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_acl_group_seller') . ":" . ($bidsProfile->powerseller ? JText::_('Powerseller') : JText::_('Seller'))  . "</div>";
                        }
                        $html .= "<div style='width:120px;float:left;'>" . Jtext::_('COM_BIDS_user_verified') . ":" . ( (isset($bidsProfile->verified) && $bidsProfile->verified) ? Jtext::_('COM_BIDS_YES') : Jtext::_('COM_BIDS_no') ) . "</div>".

                    '</td>
                </tr>
                <tr>
                    <td colspan="4">';

        $tasklist = array(
            'newauction' => 'f_newauction.png',
            'myauctions' => 'f_myauctions.png ',
            'mybids' => 'f_mybids.png',
            'mywonbids' => 'f_mywonbids.png',
            'mywatchlist' => 'f_mywatchlist.png',
            'listcats' => 'f_listcats.png',
            'listauctions' => 'f_listauctions.png',
            'search' => 'f_search.png'
        );
        $keys = array_keys($tasklist);

        $html .= '<table width="100%">
                    <tr>';
                    for ($i = 0; $i < count($keys) / 2; $i++) {
                        $f_task = JRoute::_("index.php?option=com_bids&task=" . $keys[$i]);
                        $html .= "<td width='100'><a href='$f_task'><img src='" . JURI::root() . "components/com_bids/images/menu/" . $tasklist[$keys[$i]] . "' border=0></a></td>";
                    }
        $html .=    '</tr>
                    <tr>';

                    for ($i = count($keys) / 2; $i < count($keys); $i++) {
                        $f_task = JRoute::_("index.php?option=com_bids&task=" . $keys[$i]);
                        $html .= "<td width='100'><a href='$f_task'><img src='" . JURI::root() . "components/com_bids/images/menu/" . $tasklist[$keys[$i]] . "' border=0></a></td>";
                    }
        $html .=    '</tr>
                </table>
            </td>
        </tr>';

        $html .= '<tr>
            <td>
                <div class="auction_credits">'.
                    JText::_('COM_BIDS_YOUR_CURRENT_BALANCE_IS').'&nbsp'.
                    $balance->balance.'&nbsp;'.$balance->currency.
                '</div>
                <div>
                    <a href="'.BidsHelperRoute::getAddFundsRoute().'">'.
                     JText::_('COM_BIDS_ADD_FUNDS_TO_YOUR_BALANCE').
                     '</a>
                </div>
                 <div>
                     <a href="'.BidsHelperRoute::getPaymentsHistoryRoute().'">'.
                      JText::_('COM_BIDS_SEE_MY_PAYMENTS_HISTORY').
                      '</a>
                 </div>
            </td>
        </tr>';


        $html .=
            '</table>
        </div>';

        return $html;
    }
コード例 #21
0
ファイル: main.php プロジェクト: kosmosby/medicine-prof
			<div id="div_awd_attached_img">		
			</div>
			<div id="div_awd_attached_info">
				<span class="editable" id="awd_attached_title"></span><br>
				<span id="awd_attached_file"></span><br>
				<span class="editable" id="awd_attached_des"></span>
				<br>
				<br>
				<div class="awd_attached_attribute">
					<label style="float:left"><img src="<?php echo JURI::base();?>components/com_awdwall/images/prev.png" id="prev" onclick="prev_img();" alt="" /><img src="<?php echo JURI::base();?>components/com_awdwall/images/next.png" id="next" onclick="next_img();" alt="" /></label>				
					<div id="count_text">
						<span id="count_img_active">1</span> <?php echo Jtext::_('of'); ?> <span id="sum_img"></span>
					</div>
					<br/>
					<br/>
					<input onclick="no_img()" type="checkbox" value="check" id="hidden_img" name="hidden_img" /> <?php echo Jtext::_('Hidden image thumb'); ?>
				</div>
			</div>
			<input type="hidden" id="count_img" />
			<input type="hidden" name="url_root" value="<?php echo JURI::base();?>" id="url_root" />
			<div style="display:none;" id="txtHint"></div>
		</div>
		<!-- video form -->
		<div class="attach_link clearfix message info" style="display:none;" id="awd_video_form" >

		<span class="close"><a href="javascript:void(0);" onClick="closeVideoBox();">x</a></span>
<BR />
		<div style="float:left; width:100%;">
		
		<div style="float:left;padding-right:20px;  ">
			<div class="vicons"><a href="http://www.youtube.com/" title="<?php echo JText::_('YouTube');?>" alt="<?php echo JText::_('YouTube');?>" target="_blank"><img src="<?php echo JURI::base();?>components/com_awdwall/images/vicons/youtube.png" /></a></div>
コード例 #22
0
ファイル: authorizenet.php プロジェクト: Gskflute/joomla25
 function _validate_creditcard_data($enqueueMessage = TRUE)
 {
     $html = '';
     $this->_cc_valid = TRUE;
     if (!Creditcard::validate_credit_card_number($this->_cc_type, $this->_cc_number)) {
         $this->_errormessage[] = 'VMPAYMENT_AUTHORIZENET_CARD_NUMBER_INVALID';
         $this->_cc_valid = FALSE;
     }
     if (!Creditcard::validate_credit_card_cvv($this->_cc_type, $this->_cc_cvv)) {
         $this->_errormessage[] = 'VMPAYMENT_AUTHORIZENET_CARD_CVV_INVALID';
         $this->_cc_valid = FALSE;
     }
     if (!Creditcard::validate_credit_card_date($this->_cc_type, $this->_cc_expire_month, $this->_cc_expire_year)) {
         $this->_errormessage[] = 'VMPAYMENT_AUTHORIZENET_CARD_CVV_INVALID';
         $this->_cc_valid = FALSE;
     }
     if (!$this->_cc_valid) {
         //$html.= "<ul>";
         foreach ($this->_errormessage as $msg) {
             //$html .= "<li>" . Jtext::_($msg) . "</li>";
             $html .= Jtext::_($msg) . "<br/>";
         }
         //$html.= "</ul>";
     }
     if (!$this->_cc_valid && $enqueueMessage) {
         $app = JFactory::getApplication();
         $app->enqueueMessage($html);
     }
     return $this->_cc_valid;
 }
コード例 #23
0
function addSportsType()
{
    $result = false;
    $db = JFactory::getDbo();
    echo JText::sprintf('Adding the sports-type [%1$s] to table [%2$s] if it does not exist yet!', '<strong>' . 'Soccer' . '</strong>', '<strong>' . '#__joomleague_sports_type' . '</strong>');
    $query = "SELECT id FROM #__joomleague_sports_type WHERE name='Soccer'";
    $db->setQuery($query);
    if (!($dbresult = $db->loadObject())) {
        // Add new sportstype Soccer to #__joomleague_sports_type
        $queryAdd = "INSERT INTO #__joomleague_sports_type (`name`) VALUES ('Soccer')";
        $db->setQuery($queryAdd);
        $result = $db->execute();
    }
    echo PrintStepResult($result) . '<br />';
    if (!$result) {
        echo Jtext::_('DO NOT WORRY... Surely the sports-type soccer was already existing in your database!!!') . '<br />';
    }
    return '';
}
コード例 #24
0
ファイル: view.html.php プロジェクト: lenard112/cms
 function renderMailLayout()
 {
     $this->setLayout('mail_html_question');
     $this->comment = vRequest::getString('comment');
     $this->user = JFactory::getUser();
     if (empty($this->user->id)) {
         $fromMail = vRequest::getVar('email');
         //is sanitized then
         $fromName = vRequest::getVar('name', '');
         //is sanitized then
         $fromMail = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
         $fromName = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
     } else {
         $fromMail = $this->user->email;
         $fromName = $this->user->name;
     }
     $vars['user'] = array('name' => $fromName, 'email' => $fromMail);
     $vendorModel = VmModel::getModel('vendor');
     if (empty($this->vendor)) {
         $this->vendor = $vendorModel->getVendor();
         $this->vendor->vendor_store_name = $fromName;
     }
     $vendorModel->addImages($this->vendor);
     $virtuemart_product_id = vRequest::getInt('virtuemart_product_id', 0);
     $productModel = VmModel::getModel('product');
     if (empty($this->product)) {
         $this->product = $productModel->getProduct($virtuemart_product_id);
     }
     $productModel->addImages($this->product);
     $this->subject = Jtext::_('COM_VIRTUEMART_QUESTION_ABOUT') . $this->product->product_name;
     $this->vendorEmail = $this->user['email'];
     // in this particular case, overwrite the value for fix the recipient name
     $this->vendor->vendor_name = $this->user['name'];
     if (VmConfig::get('order_mail_html')) {
         $tpl = 'mail_html_question';
     } else {
         $tpl = 'mail_raw_question';
     }
     $this->setLayout($tpl);
     parent::display();
 }
コード例 #25
0
ファイル: ytfieldset.php プロジェクト: educakanchay/educa
    protected function getInput()
    {
        $status = (string) $this->element['status'];
        $className = $this->element['class'];
        $html = '';
        if ($status == 1) {
            $html .= '<fieldset class="yt-fieldset ' . $className . '">';
            if (!empty($this->element['legend'])) {
                $html .= '<legend>' . JText::_($this->element['legend']) . '</legend>';
            }
            if (!empty($this->element['description'])) {
                $html .= '<div class="yt-fielddesc">' . JText::_($this->element['description']) . '</div>';
            }
            if ($this->element['legend'] == 'FIELDSET_CSS') {
                $html .= '<div class =\'less2css\'>';
                $html .= '<div class =\'less2css-info\'><span class=\'fa fa-info-circle\'></span>  ' . JText::_('LESS2CSS_INFO');
                $html .= '<a href=\'#myModal\' id=\'less2css_modal\' role=\'button\' class=\'link\' data-toggle=\'modal\'>Click here</a>';
                $html .= '</div>';
                $html .= '</div>';
                $html .= '
			    <div id=\'myModal\' class=\'modal hide fade\' tabindex=\'-1\' role=\'dialog\' aria-labelledby=\'myModalLabel\' aria-hidden=\'true\'>
				    <div class=\'modal-header\'>
				    <button type=\'button\' class=\'close\' data-dismiss=\'modal\' aria-hidden=\'true\'>×</button>
				    <h4 id=\'myModalLabel\'>' . Jtext::_('LESS2CSS_TITLE') . '</h4>
				    <div class =\'less2css-warning\'><span class=\'icon-warning\'></span>  ' . JText::_('LESS2CSS_WARNING') . '</div>
				    </div>
				    <div class=\'modal-body\'>
				    <p style=\'text-align:center\' id=\'less2css_result\'></p>
				    <div style=\'text-align:center\'>
				    <span class=\'btn btn-primary less2css\'>Yes</span>
				    <span class=\'btn\' data-dismiss=\'modal\' aria-hidden=\'true\'>No</span>
				    </div>
			   		</div>
			    </div>
			    <script language=\'javascript\' type=\'text/javascript\'>
					jQuery(document).ready(function($){
						$(\'a#less2css_modal\').click(function(){
							$(\'p#less2css_result\').html(\' \');
						})
						$(\'.less2css.btn\').click(function(){
							$(\'p#less2css_result\').html(\'Converting...\');
							new Request({url: \'../index.php?less2css=all&compile=server\', method:\'post\',
								onSuccess: function(result){
									$(\'p#less2css_result\').html(\'Convert successful!\');
								},
								onFailure: function(){
									$(\'p#less2css_result\').html(\'Convert successful!\');
								}
							}).send();
						});
					})
				</script>
				';
            }
        } else {
            $html .= '
				</fieldset>
			';
        }
        return $html;
    }
コード例 #26
0
ファイル: default.php プロジェクト: vstorm83/propertease
									<th width="10%">
										<?php 
echo JText::_('OSM_PRICE');
?>
									</th>
									<th colspan="2">
										<?php 
echo JText::_('OSM_PUBLISHED');
?>
									</th>
								</tr>
								<tbody id="upgrade-rule">
									<?php 
$options = array();
$options[] = JHtml::_('select.option', '1', Jtext::_('OSM_YES'));
$options[] = JHtml::_('select.option', '0', Jtext::_('OSM_NO'));
for ($i = 0, $n = count($this->upgradeRules); $i < $n; $i++) {
    $upgradeRule = $this->upgradeRules[$i];
    $optionPlans = array();
    $optionPlans[] = JHtml::_('select.option', 0, JText::_('OSM_TO_PLAN'), 'id', 'title');
    $optionPlans = array_merge($optionPlans, $this->plans);
    ?>
										<tr id="rule_<?php 
    echo $i;
    ?>
">
											<td>
												<?php 
    echo JHtml::_('select.genericlist', $optionPlans, 'to_plan_id[]', ' class="inputbox input-large" ', 'id', 'title', $upgradeRule->to_plan_id);
    ?>
											</td>
コード例 #27
0
ファイル: full.php プロジェクト: alexmixaylov/real
    ?>
</li>
                    <?php 
}
?>
                </ul>
                <ul class="item-properties">
                    <?php 
if ($this->checkPosition('square-gen')) {
    ?>
                        <li><?php 
    echo Jtext::_('ALEX_SQUARE') . '<b>' . '</b>';
    ?>
</li>
                        <li><?php 
    echo Jtext::_('ALEX_SQUARE_GEN') . '<b>' . $this->renderPosition('square-gen') . '</b>';
    ?>
</li>
                    <?php 
}
?>
                </ul>

                <div class="row">
                    <div class="icons-wrap-full col-sm-12 col-xs-12">
                        <?php 
if ($this->checkPosition('tab-map')) {
    ?>
                            <div><a class="icon map-icon" href="#map" title="Посмотреть на карте"> </a></div>
                        <?php 
}
コード例 #28
0
	var xmlhttp
	function GetXmlHttpObject() {
		if (window.XMLHttpRequest) {
			// code for IE7+, Firefox, Chrome, Opera, Safari
			return new XMLHttpRequest();
		}
		if (window.ActiveXObject) {
			// code for IE6, IE5
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		return null;
	}

	function resetOrderId() {
		if (!confirm("<?php 
echo Jtext::_('COM_REDSHOP_CONFIRM_ORDER_ID_RESET');
?>
 ")) {
			return false;
		}
		else {
			xmlhttp = GetXmlHttpObject();
			if (xmlhttp == null) {
				alert("Your browser does not support XMLHTTP!");
				return;
			}
			var url = 'index.php?option=com_redshop&view=configuration&task=resetOrderId&sid=' + Math.random();
			xmlhttp.onreadystatechange = function () {
				if (xmlhttp.readyState == 4) {
					alert("<?php 
echo JText::_('COM_REDSHOP_SUCCESSFULLY_RESET_ORDER_ID');
コード例 #29
0
ファイル: blog.item.twitter.php プロジェクト: Tommar/vino2
	<div class="post-item-m">

		<?php 
if ($row->isFeatured) {
    ?>
		<h2 id="title-<?php 
    echo $row->id;
    ?>
" class="blog-title<?php 
    echo $row->isFeatured ? ' featured' : '';
    ?>
 rip mbs">
			<!-- Show a featured tag if the entry is featured -->
			<sup class="tag-featured"><?php 
    echo Jtext::_('COM_EASYBLOG_FEATURED_FEATURED');
    ?>
</sup>
		</h2>
		<?php 
}
?>

		<!-- Post content -->
		<div class="blog-tweet"><?php 
echo $row->text;
?>
</div>

		<!-- joomla content plugin call -->
		<?php 
コード例 #30
-1
 function _displayPopulate($tpl)
 {
     $app = JFactory::getApplication();
     $document = Jfactory::getDocument();
     $uri = JFactory::getURI();
     $model = $this->getModel();
     $projectws =& $this->get('Data', 'projectws');
     $document->setTitle(JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_TITLE'));
     $version = urlencode(JoomleagueHelper::getVersion());
     $document->addScript('components/com_joomleague/assets/js/populate.js?v=' . $version);
     $lists = array();
     $options = array(JHTML::_('select.option', 0, Jtext::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_TYPE_SINGLE_ROUND_ROBIN')), JHTML::_('select.option', 1, Jtext::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_TYPE_DOUBLE_ROUND_ROBIN')), JHTML::_('select.option', 2, Jtext::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_POPULATE_TYPE_TOURNAMENT_ROUND_ROBIN')));
     $lists['scheduling'] = JHTML::_('select.genericlist', $options, 'scheduling', '', 'value', 'text');
     //TODO-add error message - what if there are no teams assigned to the project
     $teams = $this->get('projectteams');
     $options = array();
     foreach ($teams as $t) {
         $options[] = JHTML::_('select.option', $t->projectteam_id, $t->text);
     }
     $lists['teamsorder'] = JHTML::_('select.genericlist', $options, 'teamsorder[]', 'multiple="multiple" size="20"');
     $this->assignRef('projectws', $projectws);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('lists', $lists);
     $this->addToolbar_Populate();
     parent::display($tpl);
 }