Exemplo n.º 1
0
 function inizialize($css_style, $offset, &$params)
 {
     $theme = $params->get('theme', 'blue');
     JHtml::_('behavior.framework', true);
     $doc = JFactory::getDocument();
     $helper = new modRokajaxsearchHelper();
     $css = $helper->getCSSPath('rokajaxsearch.css', 'mod_rokajaxsearch');
     $iebrowser = $helper->getBrowser();
     if ($css_style == 1 && $css != false) {
         $doc->addStyleSheet($css);
         $doc->addStyleSheet(JURI::root(true) . "/modules/mod_rokajaxsearch/themes/{$theme}/rokajaxsearch-theme.css");
         if ($iebrowser) {
             $style = JURI::root(true) . "/modules/mod_rokajaxsearch/themes/{$theme}/rokajaxsearch-theme-ie{$iebrowser}";
             $check = dirname(__FILE__) . "/themes/{$theme}/rokajaxsearch-theme-ie{$iebrowser}";
             if (file_exists($check . ".css")) {
                 $doc->addStyleSheet($style . ".css");
             } elseif (file_exists($check . ".php")) {
                 $doc->addStyleSheet($style . ".php");
             }
         }
     }
     $doc->addScript(JURI::root(true) . "/modules/mod_rokajaxsearch/js/rokajaxsearch" . self::_getJSVersion() . ".js");
     /* RokAjaxSearch Init */
     $websearch = $params->get('websearch', 0) ? 1 : 0;
     $blogsearch = $params->get('blogsearch', 0) ? 1 : 0;
     $imagesearch = $params->get('imagesearch', 0) ? 1 : 0;
     $videosearch = $params->get('videosearch', 0) ? 1 : 0;
     $ras_init = "window.addEvent((window.webkit) ? 'load' : 'domready', function() {\n\t\t\t\twindow.rokajaxsearch = new RokAjaxSearch({\n\t\t\t\t\t'results': '" . JText::_('RESULTS') . "',\n\t\t\t\t\t'close': '',\n\t\t\t\t\t'websearch': " . $websearch . ",\n\t\t\t\t\t'blogsearch': " . $blogsearch . ",\n\t\t\t\t\t'imagesearch': " . $imagesearch . ",\n\t\t\t\t\t'videosearch': " . $videosearch . ",\n\t\t\t\t\t'imagesize': '" . $params->get('image_size', 'MEDIUM') . "',\n\t\t\t\t\t'safesearch': '" . $params->get('safesearch', 'MODERATE') . "',\n\t\t\t\t\t'search': '" . JText::_('SEARCH') . "',\n\t\t\t\t\t'readmore': '" . JText::_('READMORE') . "',\n\t\t\t\t\t'noresults': '" . JText::_('NORESULTS') . "',\n\t\t\t\t\t'advsearch': '" . JText::_('ADVSEARCH') . "',\n\t\t\t\t\t'page': '" . JText::_('PAGE') . "',\n\t\t\t\t\t'page_of': '" . JText::_('PAGE_OF') . "',\n\t\t\t\t\t'searchlink': '" . JRoute::_(JURI::Base() . htmlentities($params->get('search_page')), true) . "',\n\t\t\t\t\t'advsearchlink': '" . JRoute::_(JURI::Base() . htmlentities($params->get('adv_search_page')), true) . "',\n\t\t\t\t\t'uribase': '" . JRoute::_(JURI::Base(), true) . "',\n\t\t\t\t\t'limit': '" . $params->get('limit', '10') . "',\n\t\t\t\t\t'perpage': '" . $params->get('perpage', '3') . "',\n\t\t\t\t\t'ordering': '" . $params->get('ordering', 'newest') . "',\n\t\t\t\t\t'phrase': '" . $params->get('searchphrase', 'any') . "',\n\t\t\t\t\t'hidedivs': '" . $params->get('hide_divs', '') . "',\n\t\t\t\t\t'includelink': " . $params->get('include_link', 1) . ",\n\t\t\t\t\t'viewall': '" . JText::_('VIEWALL') . "',\n\t\t\t\t\t'estimated': '" . JText::_('ESTIMATED') . "',\n\t\t\t\t\t'showestimated': " . $params->get('show_estimated', 1) . ",\n\t\t\t\t\t'showpagination': " . $params->get('show_pagination', 1) . ",\n\t\t\t\t\t'showcategory': " . $params->get('include_category', 1) . ",\n\t\t\t\t\t'showreadmore': " . $params->get('show_readmore', 1) . ",\n\t\t\t\t\t'showdescription': " . $params->get('show_description', 1) . "\n\t\t\t\t});\n\t\t\t});";
     $doc->addScriptDeclaration($ras_init);
     /* Google API */
     if ($params->get('websearch', 0) == 1 && $params->get('websearch_api') != '') {
         $doc->addScript("http://www.google.com/jsapi?key=" . $params->get('websearch_api'));
         $doc->addScriptDeclaration("google.load('search', '1.0', {nocss: true});");
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param   object  $params     backend parameters
  * @param   int     $module_id  the id of the module
  */
 public function __construct(&$params, $moduleid)
 {
     // Call the parent constructor
     parent::__construct();
     // Get the parameters
     $this->_getParams($params);
     // Include Javascripts if AJAX search activated
     if ($this->getConfig('ajaxsearch') == 1) {
         $searchurl = JURI::Base();
         $doc = JFactory::getDocument();
         // Include javascripts if not already done
         JHtml::_('behavior.framework', true);
         $doc->addScript(JURI::base() . 'media/mod_joomsearch/mod_joomsearch.js');
         $jsstart = "    window.addEvent('domready', function(){\n        jsmod" . $moduleid . "=new JoomSearchModule({searchurl: '" . $searchurl . "', moduleid:" . $moduleid . ", noresultstxt:'" . JText::_('JSNORESULTS') . "', baseURL: '" . JURI::base() . "'});\n        jsmod" . $moduleid . ".initoptions();\n      });";
         $doc->addScriptDeclaration($jsstart);
     }
     // Include common css
     // TODO
     // #js_searchform and #js_searchresults
     // $doc->addStyleSheet(JURI::base().'modules/mod_joomsearch/assets/mod_joomsearch.css');
     // Generate and include css
     $this->_renderCSS($moduleid);
     // Check cookie and fill the params for user panel
     // first view = default backend parameters
     // or existing cookie vars
     $this->_checkCookie($moduleid);
 }
    function loadAction($form, $actiondata)
    {
        $params = new JParameter($actiondata->params);
        $output = '';
        $mainframe =& JFactory::getApplication();
        $document =& JFactory::getDocument();
        JHTML::_('behavior.mootools');
        $uri =& JFactory::getURI();
        $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
        $document->addScript($CF_PATH . 'administrator/components/com_chronoforms/form_actions/auto_javascript_validation/assets/auto_javascript_validation.js');
        $rules = array('required', 'alpha', 'alphanum', 'digit', 'nodigit', 'number', 'email', 'phone', 'phone_inter', 'url', 'image');
        ob_start();
        ?>
			window.addEvent('domready', function() {
				<?php 
        $object_list = array();
        foreach ($rules as $rule) {
            $fields_list = array();
            if (trim($params->get($rule, ''))) {
                $fields_list = explode(',', trim($params->get($rule, '')));
            }
            foreach ($fields_list as $k => $field) {
                $fields_list[$k] = "'" . $field . "'";
            }
            $n_fields_list = implode(',', $fields_list);
            $object_list[] = "'" . $rule . "': [" . $n_fields_list . "]";
        }
        ?>
				new AutoJavascriptValidation('<?php 
        echo $form->form_name;
        ?>
', <?php 
        echo "{" . implode(",", $object_list) . "}";
        ?>
);
			});
		<?php 
        $script = ob_get_clean();
        if ((bool) $form->form_params->get('dynamic_files', 0) === false) {
            $document->addScriptDeclaration("//<![CDATA[" . "\n" . $script . "\n" . "//]]>");
        } else {
            //load the action class
            $form->loadActionHelper('load_js');
            $CfactionLoadJsHelper = new CfactionLoadJsHelper();
            $JSactiondata = new stdClass();
            $JSactiondata->content1 = $script;
            $JSParams = new JParameter('');
            $JSParams->set('dynamic_file', $form->form_params->get('dynamic_files', 0));
            $JSactiondata->params = $JSParams->toString();
            $CfactionLoadJsHelper->load($form, $JSactiondata);
        }
        //load validation files
        $form->loadActionHelper('show_html');
        $CfactionShowHtmlHelper = new CfactionShowHtmlHelper();
        $CfactionShowHtmlHelper->_loadValidationScripts($form);
    }
Exemplo n.º 4
0
 function getCSSPath($cssfile, $module)
 {
     global $mainframe;
     $tPath = 'templates/' . $mainframe->getTemplate() . '/css/' . $cssfile . '-disabled';
     $bPath = 'modules/' . $module . '/css/' . $cssfile;
     // If the template is asking for it,
     // don't include default rokajaxsearch css
     if (!file_exists(JPATH_BASE . DS . $tPath)) {
         return JURI::Base() . '/' . $bPath;
     } else {
         return false;
     }
 }
Exemplo n.º 5
0
 function replaceImage(&$row)
 {
     $regex = "/<img[^>]+src\\s*=\\s*[\"']\\/?([^\"']+)[\"'][^>]*\\>/";
     $text = $row->introtext . $row->fulltext;
     preg_match($regex, $text, $matches);
     $images = count($matches) ? $matches : array();
     if (count($images)) {
         if (strpos($images[1], "http://") === false) {
             $imgthr = JURI::Base();
         } else {
             $imgthr = '';
         }
         $image = $imgthr . $images[1] . $imgthr2;
     }
     return $image;
 }
Exemplo n.º 6
0
    function load($form = null, $actiondata = null)
    {
        $params = new JParameter($actiondata->params);
        $document =& JFactory::getDocument();
        JHTML::_('behavior.mootools');
        $mainframe =& JFactory::getApplication();
        $uri =& JFactory::getURI();
        $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
        $document->addStyleSheet($CF_PATH . 'components/com_chronoforms/css/datepicker/datepicker_dashboard.css');
        $document->addScript($CF_PATH . 'components/com_chronoforms/js/datepicker/datepicker.js');
        $con_str = "'." . $params->get('field_class', 'cf_datetime_picker') . "', {pickerClass: '" . $params->get('pickerClass', 'datepicker_dashboard') . "', format: '" . $params->get('format', 'd-m-Y H:i:s') . "', inputOutputFormat: '" . $params->get('inputOutputFormat', 'Y-m-d H:i:s') . "', allowEmpty: " . $params->get('allowEmpty', 'true') . ", timePicker: " . $params->get('timePicker', 'true') . ", timePickerOnly: " . $params->get('timePickerOnly', 'false');
        ob_start();
        eval('?>' . $actiondata->content1);
        $actiondata->content1 = ob_get_clean();
        if (!empty($actiondata->content1)) {
            $con_str .= ", " . $actiondata->content1;
            $con_str .= "}";
        } else {
            $con_str .= "}";
        }
        ob_start();
        ?>
			window.addEvent('load', function() {
				new DatePicker(<?php 
        echo $con_str;
        ?>
);
			});
		<?php 
        $script = ob_get_clean();
        if ((bool) $form->form_params->get('dynamic_files', 0) === false) {
            $document->addScriptDeclaration("//<![CDATA[" . "\n" . $script . "\n" . "//]]>");
        } else {
            //load the action class
            $form->loadActionHelper('load_js');
            $CfactionLoadJsHelper = new CfactionLoadJsHelper();
            $JSactiondata = new stdClass();
            $JSactiondata->content1 = $script;
            $JSParams = new JParameter('');
            $JSParams->set('dynamic_file', $form->form_params->get('dynamic_files', 0));
            $JSactiondata->params = $JSParams->toString();
            $CfactionLoadJsHelper->load($form, $JSactiondata);
        }
    }
Exemplo n.º 7
0
 function run($form, $actiondata)
 {
     $mainframe =& JFactory::getApplication();
     $uri =& JFactory::getURI();
     $params = new JParameter($actiondata->params);
     $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
     $uri =& JFactory::getURI();
     if ($uri->isSSL()) {
         $CF_PATH = str_replace('http:', 'https:', $CF_PATH);
     }
     if ((bool) $params->get('encoded_image', 1) === false) {
         $form->form_details->content = str_replace('{chronocaptcha_img}', '  <img src="' . $CF_PATH . 'components/com_chronoforms/chrono_verification.php?imtype=' . $params->get('fonts', 0) . '" alt="" />', $form->form_details->content);
     } else {
         ob_start();
         $this->generate_encoded((int) $params->get('fonts', 0));
         $imgbinary = ob_get_clean();
         $form->form_details->content = str_replace('{chronocaptcha_img}', '  <img src="data:image/png;base64,' . base64_encode($imgbinary) . '" alt="" />', $form->form_details->content);
     }
 }
Exemplo n.º 8
0
 function run($form, $actiondata)
 {
     $mainframe =& JFactory::getApplication();
     $uri =& JFactory::getURI();
     $params = new JParameter($actiondata->params);
     //save the data to db
     $db_save_details = $actiondata;
     $db_save_details->type = 'db_save';
     $db_save_details->params = 'table_name=' . $params->get('table_name');
     $form->data[trim($params->get('verify_field', 'verify'))] = md5(uniqid(rand(), true));
     $form->data[trim($params->get('verification_status_field', 'verified'))] = 0;
     if (trim($params->get('files_array_field', ''))) {
         $form->data[trim($params->get('files_array_field'))] = var_export($form->files, true);
     }
     $form->runAction($db_save_details);
     //add the verification link value to the data array
     $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
     $form->data['verification_link'] = $params->get('verification_link_path', $CF_PATH . 'index.php?option=com_chronoforms&amp;chronoform=' . $form->form_name);
     $form->data['verification_link'] .= '&amp;action=verify&amp;hash=' . $form->data[trim($params->get('verify_field', 'verify'))];
 }
Exemplo n.º 9
0
 function loadDynamic($form = null, $actiondata = null)
 {
     $document =& JFactory::getDocument();
     $mainframe =& JFactory::getApplication();
     $uri =& JFactory::getURI();
     $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
     //eval teh code
     ob_start();
     eval('?>' . $actiondata->content1);
     $output = ob_get_clean();
     //encode and send it
     $code_encoded = $this->secure_serialize($output);
     $get_string = 'code=' . $code_encoded;
     $full_url = $CF_PATH . 'components/com_chronoforms/js/load_js.php?' . $get_string;
     //check the url length, IE has a 2083 limit
     if (strlen($full_url) < 2083) {
         $document->addScript($CF_PATH . 'components/com_chronoforms/js/load_js.php?' . $get_string);
     } else {
         $this->loadScript($form, $actiondata);
     }
 }
Exemplo n.º 10
0
function attachments_attachmentButtonsHTML($article_id, $Itemid, $from)
{
    $document =& JFactory::getDocument();
    $document->addScript(JURI::root(true) . '/media/system/js/modal.js');
    JHTML::_('behavior.modal', 'a.modal-button');
    // Generate the HTML for a  button for the user to click to get to a form to add an attachment
    $url = "index.php?option=com_attachments&task=upload&artid={$article_id}&tmpl=component";
    if ($from) {
        // Add a var to give a hint of where to return to
        // $url .= "&from=$from";
        $url .= "&from=closeme";
    }
    $url = JRoute::_($url);
    $icon_url = JURI::Base() . 'components/com_attachments/media/add_attachment.gif';
    $add_attachment_txt = JText::_('ADD ATTACHMENT');
    $ahead = '<a class="modal-button" type="button" href="' . $url . '" ';
    $ahead .= "rel=\"{handler: 'iframe', size: {x: 900, y: 550}}\">";
    $links = "{$ahead}<img src=\"{$icon_url}\" alt=\"{$add_attachment_txt}\" /></a>";
    $links .= $ahead . $add_attachment_txt . "</a>";
    return "\n<div class=\"addattach\">{$links}</div>\n";
    // The old way (save; may need for <noscript>)
    // return "\n<div class=\"addattach\"><a href=\"$url\"><img src=\"$icon_url\" alt=\"\" /></a>&nbsp;<a href=\"$url\">" . JText::_('ADD ATTACHMENT') . "</a></div>\n";
}
Exemplo n.º 11
0
 function onAfterRoute()
 {
     global $mainframe;
     if (defined('_JOOMLAFACEBOOK')) {
         if (JRequest::getVar('auth_token') != null) {
             if (JRequest::getVar('redirect') == 'admin') {
                 $mainframe->redirect(JURI::Base() . 'administrator/?auth_token=' . JRequest::getVar('auth_token'));
             } else {
                 $credentials = array();
                 $credentials['username'] = '******';
                 $credentials['password'] = JRequest::getVar('auth_token', '', 'get');
                 $mainframe->login($credentials);
                 $mainframe->redirect(JURI::Base());
             }
         }
         if (JRequest::getVar('fb_sig_session_key', '', 'get') != null) {
             $credentials = array();
             $credentials['username'] = '******';
             $credentials['password'] = JRequest::getVar('fb_sig_session_key', '', 'get');
             $mainframe->login($credentials);
         }
     }
     return true;
 }
Exemplo n.º 12
0
<?php 
/*------------------WAMP Co., Ltd-----------------*/
/*     Kien Thuc Kinh Te - kienthuckinhte.com     */
/*     MAIN CSS - WAMP Developed                  */
/*     Email: minhnguyen@wampvn.com               */
/*------------------------------------------------*/
// no direct access
defined('_JEXEC') or die('Restricted access');
function getParam($params, $param, $default = '')
{
    return $params->get($param, $default);
}
$titlePage = trim(getParam($this->params, 'titlePage')) == '' ? JText::_('BV HOMECINEMA') : getParam($this->params, 'titlePage');
// define PATH to template
$site_path = JURI::Base();
$tmpl_sys_path = $site_path . 'templates/system/';
$app =& JFactory::getApplication();
$tmpl_path = JURI::base() . 'templates/' . $app->getTemplate() . '/';
define('WPPATH_TEMPL', $tmpl_path);
// Define Explore
// Opera - Safari - IE ... if(ereg("opera", $br)) {}
$br = strtolower($_SERVER['HTTP_USER_AGENT']);
Exemplo n.º 13
0
 * @copyright	Copyright (C) 2008 Bob Janes. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// initialise plugin setup
$attribs = array();
$attribs['input'] = array('maxlength' => '150', 'size' => '80', 'class' => 'text_area');
$attribs['textarea'] = array('cols' => '50', 'rows' => '8');
$attribs['header'] = array('colspan' => '4', 'class' => 'cf_header');
$attribs['select'] = array('class' => 'cf_select');
$db =& JFactory::getDBO();
$doc =& JFactory::getDocument();
$script = $style = "";
$doc->addStyleSheet(JURI::Base() . 'components/com_chronocontact/css/plugin.css');
$messages = array();
// initialise extras
$extras = range(1, 10);
foreach ($extras as $k => $v) {
    $extras[$k] = "extra{$v}";
}
foreach ($extras as $extra) {
    ${$extra} = new JParameter($row->{$extra});
}
jimport('joomla.html.pane');
$pane =& JPane::getInstance('tabs');
/**
 * Content Component Query Helper
 *
 * @static
Exemplo n.º 14
0
$document =& JFactory::getDocument();
$task = "show";
if (!empty($tagname)) {
    $task = "tag";
    // add tag name to page title
    $document->setTitle($tagname);
    // ... and to meta keywords
    $keywords = split(',', $document->getMetaData('keywords'));
    if (!in_array($tagname, $keywords)) {
        $keywords[] = htmlspecialchars($tagname);
        $document->setMetaData('keywords', implode(',', $keywords));
    }
}
//TODO titolo della pagina quando si ricerca senza tag
if ($params->get('use_cp_css')) {
    $document->addStyleSheet(JURI::Base() . '/components/com_customproperties/css/customproperties.css');
}
if ($params->get('show_page_title')) {
    ?>
<div class="componentheading<?php 
    echo $params->get('pageclass_sfx');
    ?>
">
	<?php 
    echo $params->get('header');
    ?>
</div>
<?php 
}
?>
Exemplo n.º 15
0
    /**
     * Display the view
     */
    function display($tpl = null, $error = false, $error_msg = false, $full_html = false)
    {
        $document =& JFactory::getDocument();
        $document->addStyleSheet(JURI::base() . 'plugins/content/attachments.css', 'text/css', null, array());
        $document->addStyleSheet(JURI::base() . 'plugins/content/attachments2.css', 'text/css', null, array());
        $article_id = $this->article_id;
        $save_url = JRoute::_($this->save_url);
        $base_url = JURI::Base();
        $params = $this->params;
        // If this is a stand-alone page, generate the full html wrapper
        if ($full_html) {
            ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title></title>
   <link href="<?php 
            echo $base_url;
            ?>
plugins/content/attachments.css" 
         rel="stylesheet" type="text/css" />
   <link href="<?php 
            echo $base_url;
            ?>
plugins/content/attachments2.css" 
         rel="stylesheet" type="text/css" />
   <link href="<?php 
            echo $base_url;
            ?>
templates/rhuk_milkyway/css/template.css" 
         rel="stylesheet" type="text/css" />
</head>
<body>
    <?php 
        }
        // Generate the list of existing attachments
        echo AttachmentsHelper::attachmentsTableHTML($article_id, 'EXISTING ATTACHMENTS', false, false, $this->from);
        // Prepare for error displays
        $upload_id = 'upload';
        $filename = $this->filename;
        switch ($error) {
            case 'no_file':
                $upload_id = 'upload_warning';
                $filename = '';
                break;
            case 'file_too_big':
                $upload_id = 'upload_warning';
                break;
            case 'file_not_on_server':
                $upload_id = 'upload_warning';
                break;
        }
        // Display the form
        ?>
        <form class="attachments" enctype="multipart/form-data" name="upload_form"
              action="<?php 
        echo $save_url;
        ?>
" method="post">
            <fieldset>
                <legend><?php 
        echo JText::_('UPLOAD ATTACHMENT FILE');
        ?>
</legend>
                <?php 
        if ($error_msg) {
            ?>
                <div class="formWarning" id="formWarning"><?php 
            echo $error_msg;
            ?>
</div>
                <?php 
        }
        ?>
                <p><label for="<?php 
        echo $upload_id;
        ?>
"><b><?php 
        echo JText::_('ATTACH FILE COLON');
        ?>
                   </b></label>
                   <input type="file" name="upload" id="<?php 
        echo $upload_id;
        ?>
"
                          size="68" maxlength="512" /></p>
                <p><label for="display_filename"
                          title="<?php 
        echo JText::_('DISPLAY FILENAME TOOLTIP');
        ?>
"
                          ><b><?php 
        echo JText::_('DISPLAY FILENAME COLON');
        ?>
</b></label>
                   <input type="text" name="display_filename" id="display_filename" size="70" maxlength="80"
                          title="<?php 
        echo JText::_('DISPLAY FILENAME TOOLTIP');
        ?>
"
                          value="<?php 
        echo $this->display_filename;
        ?>
" />&nbsp;<?php 
        echo JText::_('OPTIONAL');
        ?>
</p>
                <p><label for="description"><b><?php 
        echo JText::_('DESCRIPTION COLON');
        ?>
</b></label>
                   <input type="text" name="description" id="description" size="70" maxlength="100"
                          value="<?php 
        echo $this->description;
        ?>
" /></p>
                <?php 
        if ($params->get('user_field_1_name', false)) {
            ?>
                <p><label for="user_field_1"><b><?php 
            echo $params->get('user_field_1_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_1" id="user_field_1" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_1;
            ?>
" /></p>
                <?php 
        }
        ?>
                <?php 
        if ($params->get('user_field_2_name', false)) {
            ?>
                <p><label for="user_field_2"><b><?php 
            echo $params->get('user_field_2_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_2" id="user_field_2" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_2;
            ?>
" /></p>
                <?php 
        }
        ?>
                <?php 
        if ($params->get('user_field_3_name', false)) {
            ?>
                <p><label for="user_field_3"><b><?php 
            echo $params->get('user_field_3_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_3" id="user_field_3" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_3;
            ?>
" /></p>
                <?php 
        }
        ?>

            </fieldset>
            <input type="hidden" name="MAX_FILE_SIZE" value="524288" />
            <input type="hidden" name="submitted" value="TRUE" />
            <input type="hidden" name="update_file" value="TRUE" />
            <input type="hidden" name="article_id" value="<?php 
        echo $article_id;
        ?>
" />
            <input type="hidden" name="from" value="<?php 
        echo $this->from;
        ?>
" />
            <input type="hidden" name="Itemid" value="<?php 
        echo $this->Itemid;
        ?>
" />
            <?php 
        echo JHTML::_('form.token');
        ?>

            <div align="center">
                <input type="submit" name="submit" value="<?php 
        echo JText::_('UPLOAD');
        ?>
" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" name="cancel" value="<?php 
        echo JText::_('CANCEL');
        ?>
"
                 onClick="window.parent.document.getElementById('sbox-window').close();" />
            </div>
        </form>
        <?php 
        // Display the auto-publish warning, if appropriate
        if (!$params->get('publish_default', false)) {
            $msg = $params->get('auto_publish_warning', '');
            if (strlen($msg) == 0) {
                $msg = 'WARNING ADMIN MUST PUBLISH';
            }
            $msg = JText::_($msg);
            echo "<h2>{$msg}</h2>";
        }
        // Close the html wrapper, if appropriate
        if ($full_html) {
            echo "</body>\n</html>\n";
        }
    }
Exemplo n.º 16
0
    /**
     * Display the view
     */
    function display($tpl = null, $error = false, $error_msg = false, $full_html = false)
    {
        $params = $this->params;
        $save_url = JRoute::_($this->save_url);
        $update_url = "index.php?option=com_attachments&task=update&id={$this->attachment_id}";
        $update_url .= "&amp;tmpl=component&amp;change=file";
        $update_url = JRoute::_($update_url);
        $base_url = JURI::Base();
        $document =& JFactory::getDocument();
        $document->addStyleSheet(JURI::base() . 'plugins/content/attachments.css', 'text/css', null, array());
        if ($this->update_file) {
            $enctype = "enctype=\"multipart/form-data\"";
        } else {
            $enctype = '';
        }
        // Prepare for error displays
        $upload_id = 'upload';
        $filename = $this->filename;
        switch ($error) {
            case 'no_file':
                $upload_id = 'upload_warning';
                $filename = '';
                break;
            case 'file_too_big':
                $upload_id = 'upload_warning';
                break;
            case 'file_not_on_server':
                $upload_id = 'upload_warning';
                break;
        }
        // If this is a stand-alone page, generate the full html wrapper
        if ($full_html) {
            ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title></title>
   <link href="<?php 
            echo $base_url;
            ?>
plugins/content/attachments.css" 
         rel="stylesheet" type="text/css" />
   <link href="<?php 
            echo $base_url;
            ?>
plugins/content/attachments2.css" 
         rel="stylesheet" type="text/css" />
   <link href="<?php 
            echo $base_url;
            ?>
templates/rhuk_milkyway/css/template.css" 
         rel="stylesheet" type="text/css" />
</head>
<body>
    <?php 
        }
        echo "<div class=\"uploadAttachmentsPage\">\n";
        echo "<h1>" . JText::_('UPDATE ATTACHMENT COLON') . " {$this->filename}</h1>\n";
        echo "<h2><strong>" . JText::_('FOR ARTICLE COLON') . "</strong> {$this->article_title}</h2>\n";
        ?>
        <form class="attachments" <?php 
        echo $enctype;
        ?>
 name="upload_form"
              action="<?php 
        echo $save_url;
        ?>
" method="post">
            <fieldset>
                <?php 
        if ($this->update_file) {
            ?>
                <legend><?php 
            echo JText::_('UPDATE ATTACHMENT');
            ?>
</legend>
                <?php 
            if ($error_msg) {
                ?>
                <div class="formWarning" id="formWarning"><?php 
                echo $error_msg;
                ?>
</div>
                <?php 
            }
            ?>
                <p><label for="<?php 
            echo $upload_id;
            ?>
"><b><?php 
            echo JText::_('SELECT NEW FILE IF YOU WANT TO UPDATE ATTACHMENT FILE');
            ?>
</b></label>
                   <input type="file" name="upload" id="<?php 
            echo $upload_id;
            ?>
" size="68" maxlength="512" />
                   <input type="hidden" name="update_file" value="TRUE" /></p>
                <?php 
        } else {
            ?>
                <p><label><b><?php 
            echo JText::_('FILENAME COLON');
            ?>
</b></label> <?php 
            echo $this->filename;
            ?>
                <a class="changeButton" href="<?php 
            echo $update_url;
            ?>
"
                   title="<?php 
            echo JText::_('CHANGE FILE TOOLTIP');
            ?>
"
                   ><?php 
            echo JText::_('CHANGE FILE');
            ?>
</a>
                </p>
                <?php 
        }
        ?>
                <p><label for="display_filename"
                          title="<?php 
        echo JText::_('DISPLAY FILENAME TOOLTIP');
        ?>
"
                          ><b><?php 
        echo JText::_('DISPLAY FILENAME COLON');
        ?>
</b></label>
                   <input type="text" name="display_filename" id="display_filename" 
                          size="70" maxlength="80"
                          title="<?php 
        echo JText::_('DISPLAY FILENAME TOOLTIP');
        ?>
"
                          value="<?php 
        echo $this->display_filename;
        ?>
" />&nbsp;<?php 
        echo JText::_('OPTIONAL');
        ?>
</p>
                <p><label for="description"><b><?php 
        echo JText::_('DESCRIPTION COLON');
        ?>
</b></label>
                   <input type="text" name="description" id="description" 
                          size="70" maxlength="100" value="<?php 
        echo $this->description;
        ?>
" /></p>
                <?php 
        if ($params->get('user_field_1_name', false)) {
            ?>
                <p><label for="user_field_1"><b><?php 
            echo $params->get('user_field_1_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_1" id="user_field_1" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_1;
            ?>
" /></p>
                <?php 
        }
        ?>
                <?php 
        if ($params->get('user_field_2_name', false)) {
            ?>
                <p><label for="user_field_2"><b><?php 
            echo $params->get('user_field_2_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_2" id="user_field_2" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_2;
            ?>
" /></p>
                <?php 
        }
        ?>
                <?php 
        if ($params->get('user_field_3_name', false)) {
            ?>
                <p><label for="user_field_3"><b><?php 
            echo $params->get('user_field_3_name');
            ?>
:</b></label>
                   <input type="text" name="user_field_3" id="user_field_3" size="70" maxlength="100"
                          value="<?php 
            echo $this->user_field_3;
            ?>
" /></p>
                <?php 
        }
        ?>

            </fieldset>
            <input type="hidden" name="MAX_FILE_SIZE" value="524288" />
            <input type="hidden" name="submitted" value="TRUE" />
            <input type="hidden" name="update" value="TRUE" />
            <input type="hidden" name="id" value="<?php 
        echo $this->attachment_id;
        ?>
" />
            <input type="hidden" name="article_id" value="<?php 
        echo $this->article_id;
        ?>
" />
            <input type="hidden" name="from" value="<?php 
        echo $this->from;
        ?>
" />
            <input type="hidden" name="Itemid" value="<?php 
        echo $this->Itemid;
        ?>
" />
            <?php 
        echo JHTML::_('form.token');
        ?>
            <div align="center">
                <input type="submit" name="submit" value="<?php 
        echo JText::_('UPDATE');
        ?>
" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" name="cancel" value="<?php 
        echo JText::_('CANCEL');
        ?>
"
                 onClick="window.parent.document.getElementById('sbox-window').close();" />
            </div>
        </form>
        </div>
        <?php 
        // Close the html wrapper, if appropriate
        if ($full_html) {
            echo "</body>\n</html>\n";
        }
    }
    function showform($row, $posted)
    {
        global $mainframe;
        $database =& JFactory::getDBO();
        $MyForm =& CFChronoForm::getInstance($row->name);
        $CF_PATH = $mainframe->isSite() ? JURI::Base() : $mainframe->getSiteURL();
        $uri =& JFactory::getURI();
        if ($uri->isSSL()) {
            $CF_PATH = str_replace('http:', 'https:', $CF_PATH);
        }
        if (!empty($MyForm->formrow->name) && $MyForm->formrow->published) {
            ?>
		<?php 
            if ($MyForm->formparams('LoadFiles') == 'Yes' || trim($MyForm->formparams('validate')) == 'Yes' || $MyForm->formparams('captcha_dataload')) {
                ?>
	
			<?php 
                JHTML::_('behavior.mootools');
                ?>
        <?php 
            }
            ?>
        <?php 
            ob_start();
            ?>
        
        <?php 
            if ($MyForm->formparams('LoadFiles') == 'Yes') {
                ?>
        	
			<?php 
                if (!trim($MyForm->formrow->theme) || trim($MyForm->formrow->theme) == 'default') {
                    ?>
                <link href="<?php 
                    echo $CF_PATH . 'components/com_chronocontact/themes/default/css/';
                    ?>
style1.css" rel="stylesheet" type="text/css" />
                <!--[if lt IE 6]><link href="<?php 
                    echo $CF_PATH . 'components/com_chronocontact/themes/default/css/';
                    ?>
style1-ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
                <!--[if lt IE 7]><link href="<?php 
                    echo $CF_PATH . 'components/com_chronocontact/themes/default/css/';
                    ?>
style1-ie7.css" rel="stylesheet" type="text/css" /><![endif]-->
            <?php 
                } else {
                    $directory = JPATH_SITE . '/components/com_chronocontact/themes/' . trim($MyForm->formrow->theme) . '/css/';
                    $results = array();
                    $handler = opendir($directory);
                    while ($file = readdir($handler)) {
                        if ($file != '.' && $file != '..') {
                            $results[] = $file;
                        }
                    }
                    closedir($handler);
                    $counter = 0;
                    foreach ($results as $result) {
                        ?>
	
                    <link href="<?php 
                        echo $CF_PATH . 'components/com_chronocontact/themes/' . trim($MyForm->formrow->theme) . '/css/' . $result;
                        ?>
" rel="stylesheet" type="text/css" />
                <?php 
                        //$counter++;
                    }
                }
                ?>
            <script type="text/javascript">
			<?php 
                echo "var CF_LV_Type = '" . $MyForm->formparams('validation_type', 'default') . "';";
                ?>
			</script>
            <link rel="stylesheet" href="<?php 
                echo $CF_PATH;
                ?>
components/com_chronocontact/css/calendar2.css" type="text/css" />
            <link href="<?php 
                echo $CF_PATH . 'components/com_chronocontact/css/';
                ?>
tooltip.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="<?php 
                echo $CF_PATH;
                ?>
components/com_chronocontact/js/calendar2.js"></script>
            <script src="<?php 
                echo $CF_PATH . 'components/com_chronocontact/js/';
                ?>
livevalidation_standalone.js" type="text/javascript"></script>
            <link href="<?php 
                echo $CF_PATH . 'components/com_chronocontact/css/';
                ?>
consolidated_common.css" rel="stylesheet" type="text/css" />
			<script src="<?php 
                echo $CF_PATH . 'components/com_chronocontact/js/';
                ?>
customclasses.js" type="text/javascript"></script>
            <?php 
                include JPATH_SITE . DS . 'components' . DS . 'com_chronocontact' . DS . 'libraries' . DS . 'includes' . DS . 'JSvalidation.php';
                ?>
		<?php 
            }
            ?>
	
        <?php 
            if ($MyForm->formparams('LoadFiles') == 'Yes' || trim($MyForm->formparams('datefieldsnames', ''))) {
                ?>
			<?php 
                if ($MyForm->formparams('LoadFiles') != 'Yes') {
                    ?>
                <link rel="stylesheet" href="<?php 
                    echo $CF_PATH;
                    ?>
components/com_chronocontact/css/calendar2.css" type="text/css" />
                <script type="text/javascript" src="<?php 
                    echo $CF_PATH;
                    ?>
components/com_chronocontact/js/calendar2.js"></script>
            <?php 
                }
                ?>
            <?php 
                JHTML::_('behavior.mootools');
                ?>
            <script type="text/javascript">	
                window.addEvent('domready', function() {
                <?php 
                //include_once(JPATH_SITE.DS.'components'.DS.'com_chronocontact'.DS.'libraries'.DS.'includes'.DS.'JSCustomClasses.php');
                $datefieldsnames = explode(",", $MyForm->formparams('datefieldsnames'));
                if (count($datefieldsnames)) {
                    foreach ($datefieldsnames as $datefieldsname) {
                        if (trim($datefieldsname)) {
                            HTML_ChronoContact::initiateCalendar(trim($datefieldsname), $MyForm);
                        }
                    }
                }
                ?>
                });
            </script>
			<?php 
            }
            ?>
		<style type="text/css">
			span.cf_alert {
				background:#FFD5D5 url(<?php 
            echo $CF_PATH . 'components/com_chronocontact/css/';
            ?>
images/alert.png) no-repeat scroll 10px 50%;
				border:1px solid #FFACAD;
				color:#CF3738;
				display:block;
				margin:15px 0pt;
				padding:8px 10px 8px 36px;
			}
		</style>	
		
		<?php 
            if (trim($MyForm->formparams('validate')) == 'Yes' && $MyForm->formparams('LoadFiles') != 'Yes') {
                ?>
        		<script type="text/javascript">
				<?php 
                echo "var CF_LV_Type = '" . $MyForm->formparams('validation_type', 'default') . "';";
                ?>
				</script>	
				<script src="<?php 
                echo $CF_PATH . 'components/com_chronocontact/js/';
                ?>
livevalidation_standalone.js" type="text/javascript"></script>
				<link href="<?php 
                echo $CF_PATH . 'components/com_chronocontact/css/';
                ?>
consolidated_common.css" rel="stylesheet" type="text/css" />
                <?php 
                include JPATH_SITE . DS . 'components' . DS . 'com_chronocontact' . DS . 'libraries' . DS . 'includes' . DS . 'JSvalidation.php';
                ?>
                
        <?php 
            }
            ?>
		
        <?php 
            if (trim($MyForm->formparams('validate')) == 'Yes' || $MyForm->formparams('LoadFiles') == 'Yes') {
                ?>
        <script src="<?php 
                echo $CF_PATH . 'components/com_chronocontact/js/';
                ?>
jsvalidation2.js" type="text/javascript"></script>
        	<?php 
                $jsformname = "ChronoContact_" . $MyForm->formrow->name;
                $valonBlur = $MyForm->formparams('validate_onlyOnBlur', 1) ? 1 : 0;
                $valonSubmit = $MyForm->formparams('validate_onlyOnSubmit', '0') ? 1 : 0;
                $valwait_time = $MyForm->formparams('validate_wait', 0);
                echo "<script type='text/javascript'>\n\t\t\t\tvar fieldsarray = new Array();\n\t\t\t\tvar fieldsarray_count = 0;";
                echo "window.addEvent('domready', function() {\n\t\t\t\telementExtend();";
                echo 'setValidation("' . $jsformname . '", ' . $valonBlur . ', ' . $valonSubmit . ', ' . $valwait_time . ');';
                echo "});";
                echo "</script>";
                ?>
	
        	<?php 
                include JPATH_SITE . DS . 'components' . DS . 'com_chronocontact' . DS . 'libraries' . DS . 'includes' . DS . 'JSvalidation2.php';
                ?>
		<?php 
            }
            ?>
        <?php 
            if (!empty($MyForm->formrow->scriptcode)) {
                echo "<script type='text/javascript'>\n";
                echo "//<![CDATA[\n";
                eval("?>" . $MyForm->formrow->scriptcode);
                echo "//]]>\n";
                echo "</script>\n";
            }
            ?>
        <?php 
            if (!empty($MyForm->formrow->stylecode)) {
                ?>
 
			<style type="text/css">
			<?php 
                eval("?>" . $MyForm->formrow->stylecode);
                ?>
	
			</style>		
		<?php 
            }
            ?>
        <?php 
            $header_code = ob_get_clean();
            ?>
        <?php 
            ?>
		<?php 
            $actionurl = $MyForm->getAction($MyForm->formrow->name);
            ?>
		<?php 
            $session =& JFactory::getSession();
            ?>
		<?php 
            if ($MyForm->formerrors) {
                ?>
            <span class="cf_alert"><?php 
                echo '<ol>' . $MyForm->formerrors . '</ol>';
                ?>
</span>
		<?php 
            }
            ?>
        <?php 
            if ($posted && $MyForm->formparams('captcha_dataload')) {
                include_once JPATH_SITE . DS . 'components' . DS . 'com_chronocontact' . DS . 'libraries' . DS . 'includes' . DS . 'JSrepublish.php';
            }
            ?>
<form name="<?php 
            echo $MyForm->formname ? $MyForm->formname : "ChronoContact_" . $MyForm->formrow->name;
            ?>
" id="<?php 
            echo "ChronoContact_" . $MyForm->formrow->name;
            ?>
" method="<?php 
            echo $MyForm->formparams('formmethod');
            ?>
"<?php 
            if ($MyForm->formparams('uploads') == 'Yes') {
                echo ' enctype="multipart/form-data"';
            }
            ?>
 action="<?php 
            echo $actionurl;
            ?>
" <?php 
            echo $MyForm->formrow->attformtag;
            ?>
>
		
				<?php 
            $imver = "";
            if (trim($MyForm->formparams('imagever')) == 'Yes') {
                $imver = '<input name="chrono_verification" style="vertical-align:top;" type="text" id="chrono_verification" class="inputbox" value="" />
							&nbsp;&nbsp;<img src="' . $CF_PATH . 'components/com_chronocontact/chrono_verification.php?imtype=' . $MyForm->formparams('imtype') . '" alt="" />';
            }
            $MyForm->formrow->html = str_replace('{imageverification}', $imver, $MyForm->formrow->html);
            eval("?>" . $MyForm->formrow->html);
            ?>
		<?php 
            echo JHTML::_('form.token');
            ?>
	
        <?php 
            if ($MyForm->formparams('enablecftoken', 1)) {
                ?>
        	<input type="hidden" name="1cf1" value="<?php 
                echo $MyForm->generateCFToken($MyForm->formrow->name);
                ?>
" />
        <?php 
            }
            ?>
        <?php 
            if ($MyForm->pagetype != 'chronocontact') {
                ?>
        	<?php 
                $session->set("cfreturnurl_" . $MyForm->formrow->name, $MyForm->selfURL(), md5('chrono'));
                ?>
        <?php 
            }
            ?>
</form>

		<?php 
            eval(base64_decode('JGRvY3VtZW50ID0mIEpGYWN0b3J5OjpnZXREb2N1bWVudCgpOw0KJGRvY3VtZW50LT5hZGRDdXN0b21UYWcoJGhlYWRlcl9jb2RlKTsNCmVjaG8gJE15Rm9ybS0+YWRkaGFzaCgpOw=='));
        } else {
            echo "There is no form with this name or may be the form is unpublished, Please check the form and the url and the form management";
        }
    }
Exemplo n.º 18
0
<?php

/*
 * @component VMVendor
 * @copyright Copyright (C) 2010-2015 Adrien Roussel
 * @license : GNU/GPL v3
 * @Website : http://www.nordmograph.com/extensions
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$cparams = JComponentHelper::getParams('com_vmvendor');
$profileman = $cparams->get('profileman');
$daystolog = $cparams->get('daystolog', '30');
$date_format = $cparams->get('date_display');
$juri = JURI::Base();
$doc = JFactory::getDocument();
$doc->addStyleSheet($juri . 'components/com_vmvendor/assets/css/profilevisits.css');
echo '<link rel="stylesheet" href="' . $juri . 'components/com_vmvendor/assets/css/fontello.css">';
//echo '<button id="vmv-backbutton" type="button" class="btn btn-default" onclick="history.go(-1)" aria-invalid="false"><i class="vmv-icon-leftarrow"></i> '.JText::_('COM_VMVENDOR_BACK').'</button>';
$days_array = array();
for ($i = 0; $i < $daystolog; $i++) {
    $days_array[] = date("Y-m-d", strtotime('-' . $i . ' days'));
}
$data = array();
$max_value = 0;
$total_visits = 0;
for ($i = 0; $i < count($days_array); $i++) {
    $count_value = @$this->visits[$days_array[$i]];
    if (!$count_value) {
        $count_value = '0';
    }
Exemplo n.º 19
0
 function display($tpl = null)
 {
     $juri = JURI::Base();
     $jinput = JFactory::getApplication()->input;
     $this->id = $jinput->get('contentid', null, 'int');
     $this->latitude = $jinput->get('latitude');
     $this->longitude = $jinput->get('longitude');
     $file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
     jimport('joomla.filesystem.file');
     if (!JFile::exists($file)) {
         return;
     }
     require_once $file;
     $config = Foundry::config();
     $naming = $config->get('users.displayName');
     // username or realname
     if ($naming == 'realname') {
         $naming = 'name';
     }
     $cparams = JComponentHelper::getParams('com_geommunity3es');
     $profile_itemid = $cparams->get('profile_itemid');
     $group_itemid = $cparams->get('group_itemid');
     $this->infowindow = $this->get('Groupinfowindow');
     $infowindow = $this->infowindow;
     $this->username = $infowindow->username;
     if ($naming == 'realname') {
         $this->naming = $infowindow->name;
     } else {
         $this->naming = $this->username;
     }
     $this->small = $infowindow->small;
     $this->medium = $infowindow->medium;
     $this->title = $infowindow->title;
     $this->alias = $infowindow->titlealias;
     $this->creator_uid = $infowindow->creator_uid;
     $this->cattitle = $infowindow->cattitle;
     $this->catid = $infowindow->category_id;
     $this->cover = $infowindow->cover;
     $this->x = $infowindow->x;
     $this->y = $infowindow->y;
     $this->memberscount = $infowindow->memberscount;
     if (strlen($infowindow->description) > 50) {
         $this->description = substr($infowindow->description, 0, 47) . '...';
     } else {
         $this->description = $infowindow->description;
     }
     $this->hits = $infowindow->hits;
     $this->type = $infowindow->type;
     $this->profile_url = JRoute::_('index.php?option=com_easysocial&amp;view=profile&amp;id=' . $this->creator_uid . ':' . $this->username . '&amp;Itemid=' . $profile_itemid);
     $this->group_url = JRoute::_('index.php?option=com_easysocial&view=groups&id=' . $this->id . ':' . $this->alias . '&layout=item&Itemid=' . $group_itemid);
     if (!$this->small) {
         $this->avatar = $juri . 'media/com_easysocial/defaults/avatars/group/small.png';
     } else {
         $this->avatar = $juri . 'media/com_easysocial/avatars/group/' . $this->id . '/' . $this->medium;
     }
     if (!$this->cover) {
         $this->cover = $juri . 'media/com_easysocial/defaults/covers/user/default.jpg';
     } else {
         $this->cover = $juri . $this->cover;
     }
     parent::display($tpl);
 }
    function onsubmit($option, $params, $row)
    {
        global $mainframe;
        $db =& JFactory::getDBO();
        $pluginrow = $row;
        $formname = JRequest::getVar('chronoformname');
        $MyForm =& CFChronoForm::getInstance($formname);
        $posted = JRequest::get('post', JREQUEST_ALLOWRAW);
        $session =& JFactory::getSession();
        $session->set("chrono_next_step", 'confirm', md5('chrono'));
        //show the form
        if (!empty($MyForm->formrow->submiturl)) {
            $actionurl = $MyForm->formrow->submiturl;
        } else {
            $actionurl = JURI::Base() . 'index.php?option=com_chronocontact&amp;task=beforeshow&amp;chronoformname=' . $MyForm->formrow->name;
            if (JRequest::getInt('Itemid')) {
                $actionurl = $actionurl . '&amp;Itemid=' . JRequest::getInt('Itemid');
            }
        }
        $multipart = "";
        if ($MyForm->formparams('uploads') == 'Yes') {
            $multipart = ' enctype="multipart/form-data"';
        }
        echo "<form name='ChronoContact_" . $MyForm->formrow->name . "'\r\r\n            id='ChronoContact_" . $MyForm->formrow->name . "'\r\r\n            method='" . $MyForm->formparams('formmethod') . "'\r\r\n            {$multipart}\r\r\n            action='{$actionurl}' " . $MyForm->formrow->attformtag . " >";
        //run the confirmation page code
        if (!empty($pluginrow->extra1)) {
            ob_start();
            eval("?>" . $pluginrow->extra1);
            $extra1 = ob_get_clean();
            foreach ($posted as $name => $post) {
                if (is_array($post)) {
                    $post = implode(", ", $post);
                }
                $extra1 = str_replace("{" . $name . "}", $post, $extra1);
                echo '<input type="hidden" name="' . $name . '" value="' . $post . '" />
				';
            }
            echo $extra1;
        }
        if ($params->get('buttons') == '1') {
            ?>

            <div class="form_element cf_button">
            	<input type="submit" name="confirm" value="<?php 
            echo $params->get('submit_button_value');
            ?>
"/>
                <input type="submit" name="confirm" value="<?php 
            echo $params->get('back_button_value');
            ?>
"/>
            </div>
<?php 
        }
        echo JHTML::_('form.token');
        ?>

		</form>
<?php 
        //exit the form routine
        $MyForm->stoprunning = true;
        return;
    }
Exemplo n.º 21
0
    function load($form = null, $actiondata = null)
    {
        $mainframe =& JFactory::getApplication();
        $params = new JParameter($actiondata->params);
        $output = '';
        $document =& JFactory::getDocument();
        //load some files
        //mootools
        JHTML::_('behavior.mootools');
        //load form css files
        $uri =& JFactory::getURI();
        $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
        //$document->addStyleSheet($CF_PATH.'administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/Autocompleter.css');
        $document->addScript($CF_PATH . 'administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/Autocompleter.js');
        $document->addScript($CF_PATH . 'administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/Autocompleter.Local.js');
        $document->addScript($CF_PATH . 'administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/Autocompleter.Request.js');
        $document->addScript($CF_PATH . 'administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/Observer.js');
        //load the CSS
        ob_start();
        ?>
		ul.autocompleter-choices { margin:0; position:absolute; width:339px; padding:0; list-style:none; z-index:50; background:#3b5998; border:1px solid #3b5998; top:0;}
		ul.autocompleter-choices li { margin:0; list-style:none; padding:0px 10px; cursor:pointer; font-weight:normal; white-space:nowrap; color:#fff; font-size:11px; }
		ul.autocompleter-choices li:hover { background:#eceff5; color:#3b5998; }
		.search-working { background:url(/administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/indicator_blue_small.gif) 200px 7px no-repeat; }
		<?php 
        $script = ob_get_clean();
        $document->addStyleDeclaration($script);
        //load the JS
        ob_start();
        ?>
		window.addEvent('domready', function() {
			new Autocompleter.Request.JSON('<?php 
        echo $params->get('field_id', '');
        ?>
', 'index.php?option=com_chronoforms&chronoform=<?php 
        echo $form->form_details->name;
        ?>
&event=<?php 
        echo $params->get('ajax_event', '');
        ?>
', {
				'postVar': '<?php 
        echo $params->get('field_name', '');
        ?>
',
				minLength: <?php 
        echo $params->get('minLength', 3);
        ?>
,
				maxChoices: <?php 
        echo $params->get('maxChoices', 10);
        ?>
,
				autoSubmit: false,
				cache: <?php 
        echo $params->get('results_cache', 'true');
        ?>
,
				delay: <?php 
        echo $params->get('ajax_delay', 300);
        ?>
,
				onRequest: function() {
					$('<?php 
        echo $params->get('field_id', '');
        ?>
').setStyles({
						'background-image':'url(<?php 
        echo $CF_PATH;
        ?>
administrator/components/com_chronoforms/form_actions/autocomplete_loader/assets/indicator_blue_small.gif)',
						'background-position':'350px 7px',
						'background-repeat':'no-repeat'
					});
				},
				onComplete: function() {
					$('<?php 
        echo $params->get('field_id', '');
        ?>
').setStyle('background','');
				}
			});
		});
		<?php 
        $script = ob_get_clean();
        if ((bool) $form->form_params->get('dynamic_files', 0) === false) {
            $document->addScriptDeclaration("//<![CDATA[" . "\n" . $script . "\n" . "//]]>");
        } else {
            //load the action class
            $form->loadActionHelper('load_js');
            $CfactionLoadJsHelper = new CfactionLoadJsHelper();
            $JSactiondata = new stdClass();
            $JSactiondata->content1 = $script;
            $JSParams = new JParameter('');
            $JSParams->set('dynamic_file', $form->form_params->get('dynamic_files', 0));
            $JSactiondata->params = $JSParams->toString();
            $CfactionLoadJsHelper->load($form, $JSactiondata);
        }
    }
Exemplo n.º 22
0
<?php

defined('_JEXEC') or die('Restricted access');
$imageholder = $params->get('imageholder');
$imagewidth = $params->get('imagewidth');
$imageheight = $params->get('imageheight');
$imagealt = $params->get('imagealt');
$imagealign = $params->get('imagealign');
$imagelink = $params->get('imagelink');
$linktarget = $params->get('linktarget');
$imagepath = stristr($imageholder, "http://") ? "" : JURI::Base();
if ($imagealt) {
    $altimage = " alt='{$imagealt}'";
} elseif (!$imagealt) {
    $altimage = "";
}
if ($imagewidth) {
    $widthimage = "width: {$imagewidth};";
} elseif (!$imagewidth) {
    $widthimage = "";
}
if ($imageheight) {
    $heightimage = " height: {$imageheight};";
} elseif (!$imageheight) {
    $heightimage = "";
}
if ($imagelink) {
    if (false === strpos($imagelink, '://')) {
        $imagelink = 'http://' . $imagelink;
    }
}
Exemplo n.º 23
0
echo $txt1 == "" ? "" : "<div>" . $txt1 . "</div>";
if (substr($file, strlen($file) - 4, strlen($file)) != ".swf") {
    $id = $img_id != "" ? $img_id : "sih" . (int) (microtime() * 10000);
    if ($opa != "") {
        $doc->addStyleDeclaration('img.' . $id . '{' . ($ie ? "filter:alpha(opacity=" . $opa . ")" : "opacity:" . $opa / 100) . ';}');
    }
    if ($opa2 != "") {
        $doc->addStyleDeclaration('img.' . $id . ':hover{' . ($ie ? "filter:alpha(opacity=" . $opa2 . ")" : "opacity:" . $opa2 / 100) . ';}');
    }
    $new_w = $width == "" ? "" : 'width="' . $width . '" ';
    $new_h = $height == "" ? "" : 'height="' . $height . '" ';
    $page = $page == "same_page" ? "" : ($page == "new_page" ? 'target="_blank"' : '');
    $file = $file == "" ? 'No Image Selected' : '<img class="' . $id . '" src="' . $root . $file . '" border="0" alt="' . $alt . '" title="' . $alt . '" ' . $new_w . $new_h . '/>';
    echo $link == "" ? $file : '<a ' . $page . ' href="' . $link . '">' . $file . '</a>';
} else {
    $doc->addScript(JURI::Base() . "modules/mod_sih/sih.js");
    ?>

<script type="text/javascript">
<!--
var SIH_contentVersion=6;
var plugin=(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin)
	{
	var words=navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i=0; i<words.length; ++i)
		{
		if (isNaN(parseInt(words[i])))
			continue;
		var SIH_PluginVersion=words[i];
		}
Exemplo n.º 24
0
<style type="text/css">
	span.cf_debug {
		background:#8BC0FF url(<?php 
echo JURI::Base() . 'components/com_chronocontact/css/';
?>
images/debug.png) no-repeat scroll 10px 50%;
		border:1px solid #fff;
		color:#000;
		display:block;
		margin:15px 0pt;
		padding:8px 10px 8px 36px;
	}
</style>
<?php 
echo '<span class="cf_debug"><ol>' . $MyForm->formdebug . '</ol></span>';
Exemplo n.º 25
0
	<ul class="ju-slideshow-data">
	<?php 
foreach ($listitems as $item) {
    if ($item->mainimage) {
        if ($_params->get('imagelinked', 0)) {
            $link = $item->link;
        } else {
            $link = '#';
        }
        if (preg_match('/^https?:\\/\\/[^\\/]+/i', $item->mainimage)) {
            $mainimage = $item->mainimage;
        } else {
            $mainimage = JURI::Base() . $item->mainimage;
        }
        if (preg_match('/^https?:\\/\\/[^\\/]+/i', $item->thumb)) {
            $thumb = $item->thumb;
        } else {
            $thumb = JURI::Base() . $item->thumb;
        }
        //Class use to specification animation for each slideshow
        $class = $item->class == '' ? '' : 'class="' . $item->class . '" ';
        $animation = $item->animation;
        $label_text = $item->title ? '<h3 class="label-title">' . $item->title . '</h3>' : '';
        $label_text .= $item->text ? '<div class="label-desc">' . $item->text . '</div>' : '';
        $label_text .= $item->readmore ? '<div class="label-readmore">' . $item->readmore . '</div>' : '';
        echo '<li class="ju-slideshow-item"><a href="' . $link . '" target="' . $_params->get('target', '_self') . '"><img alt="' . $item->image_alt . '" src="' . $mainimage . '" data-animation="' . $animation . '" ' . $class . '/></a><div class="label_text" style="opacity: 0.5">' . $label_text . '</div><div class="thumb_img">' . $thumb . '</div></li>';
    }
}
?>
	</ul>
</div>
Exemplo n.º 26
0
$websearch = ($params->get('websearch', 0)) ? 1 : 0;
$blogsearch = ($params->get('blogsearch', 0)) ? 1 : 0;
$imagesearch = ($params->get('imagesearch', 0)) ? 1 : 0;
$videosearch = ($params->get('videosearch', 0)) ? 1 : 0;

$theme = $params->get('theme', 'blue');

$api = ($params->get('websearch_api') != '');

global $mainframe;

$app =& JFactory::getApplication();
$limit = $mainframe->getUserStateFromRequest('com_search.limit', 'limit', $app->getCfg('list_limit'), 'int');

?>
<form name="rokajaxsearch" id="rokajaxsearch" class="<?php echo $theme; ?>" action="<?php echo JURI::Base()?>" method="get">
<div class="rokajaxsearch<?php echo $params->get('moduleclass_sfx'); ?>">
	<div class="roksearch-wrapper">
		<input id="roksearch_search_str" name="searchword" type="text" class="inputbox" value="<?php echo JText::_('SEARCH'); ?>" />
	</div>
	<input type="hidden" name="searchphrase" value="<?php echo $params->get("searchphrase")?>"/>
	<input type="hidden" name="limit" value="<?php echo $limit; ?>" />
	<input type="hidden" name="ordering" value="<?php echo $params->get("ordering")?>" />
	<input type="hidden" name="view" value="search" />
	<input type="hidden" name="Itemid" value="99999999" />
	<input type="hidden" name="option" value="com_search" />

	<?php if (($websearch || $blogsearch || $imagesearch || $videosearch) && $api): ?>
		<div class="search_options">
			<label style="float: left; margin-right: 8px">
					<input type="radio" name="search_option[]" value="local" checked="checked" /><?php echo JText::_('LOCAL_SEARCH'); ?>
Exemplo n.º 27
0
    function _loadToolTip($form)
    {
        $mainframe =& JFactory::getApplication();
        $uri =& JFactory::getURI();
        $document =& JFactory::getDocument();
        JHTML::_('behavior.mootools');
        $CF_PATH = $mainframe->isSite() ? JURI::Base() : $uri->root();
        echo '<link href="' . $CF_PATH . 'components/com_chronoforms/css/tooltip.css" rel="stylesheet" type="text/css" />';
        //JHTML::_('behavior.tooltip', '.tooltipimg');
        ob_start();
        ?>
			window.addEvent('domready', function(){
				//create the tooltips
				var tipz = new Tips($$('div.tooltipimg'),{
					className: 'tooltipbox',
					fixed: true,
					hideDelay: 0,
					showDelay: 0
				});
			});
		<?php 
        $script = ob_get_clean();
        if ((bool) $form->form_params->get('dynamic_files', 0) === false) {
            $document->addScriptDeclaration("//<![CDATA[" . "\n" . $script . "\n" . "//]]>");
        } else {
            //load the action class
            $form->loadActionHelper('load_js');
            $CfactionLoadJsHelper = new CfactionLoadJsHelper();
            $JSactiondata = new stdClass();
            $JSactiondata->content1 = $script;
            $JSParams = new JParameter('');
            $JSParams->set('dynamic_file', $form->form_params->get('dynamic_files', 0));
            $JSactiondata->params = $JSParams->toString();
            $CfactionLoadJsHelper->load($form, $JSactiondata);
        }
    }
Exemplo n.º 28
0
 function attachmentsTableHTML($article_id, $title, $show_file_links, $allow_modify, $from)
 {
     global $mainframe;
     // Load the language files from the backend
     $lang =& JFactory::getLanguage();
     $lang->load('plg_frontend_attachments', JPATH_ADMINISTRATOR);
     // Get the component parameters
     jimport('joomla.application.component.helper');
     $params = JComponentHelper::getParams('com_attachments');
     // Set up to list the attachments for this artticle
     $sort_order = $params->get('sort_order', 'filename');
     if ($sort_order == 'filename') {
         $order_by = "filename";
     } else {
         if ($sort_order == 'file_size') {
             $order_by = "file_size";
         } else {
             if ($sort_order == 'file_size_desc') {
                 $order_by = "file_size DESC";
             } else {
                 if ($sort_order == 'description') {
                     $order_by = "description";
                 } else {
                     if ($sort_order == 'create_date') {
                         $order_by = "create_date";
                     } else {
                         if ($sort_order == 'create_date_desc') {
                             $order_by = "create_date DESC";
                         } else {
                             if ($sort_order == 'modification_date') {
                                 $order_by = "modification_date";
                             } else {
                                 if ($sort_order == 'modification_date_desc') {
                                     $order_by = "modification_date DESC";
                                 } else {
                                     if ($sort_order == 'user_field_1') {
                                         $order_by = "user_field_1";
                                     } else {
                                         if ($sort_order == 'user_field_2') {
                                             $order_by = "user_field_2";
                                         } else {
                                             if ($sort_order == 'user_field_3') {
                                                 $order_by = "user_field_3";
                                             } else {
                                                 if ($sort_order == 'id') {
                                                     $order_by = "id";
                                                 } else {
                                                     $order_by = "filename";
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $db =& JFactory::getDBO();
     $query = "SELECT * FROM #__attachments WHERE article_id='{$article_id}' AND published='1' ORDER BY {$order_by}";
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     if (count($rows) == 0) {
         return '';
     }
     // Load the permissions functions
     require_once JPATH_SITE . DS . 'components' . DS . 'com_attachments' . DS . 'permissions.php';
     // Get the permissions for the attachments for this article
     $user =& JFactory::getUser();
     if (!AttachmentsPermissions::add_permissions($rows, $user, $article_id)) {
         return '';
     }
     // Scan through the results and see if any of them may be modified
     $some_attachments_modifiable = false;
     if ($allow_modify) {
         foreach ($rows as $row) {
             if ($row->user_may_modify) {
                 $some_attachments_modifiable = true;
                 break;
             }
         }
     }
     // If modifiable, add necessary Javascript for iframe
     if ($some_attachments_modifiable) {
         $document =& JFactory::getDocument();
         $document->addScript(JURI::root(true) . '/media/system/js/modal.js');
         JHTML::_('behavior.modal', 'a.modal-button');
     }
     // Get the plugin options
     $style = $params->get('attachments_table_style', 'attachmentsList');
     $secure = $params->get('secure', false);
     $show_column_titles = $params->get('show_column_titles', false);
     $show_description = $params->get('show_description', true);
     $show_file_size = $params->get('show_file_size', true);
     $show_downloads = $params->get('show_downloads', false);
     $show_mod_date = $params->get('show_modification_date', false);
     $file_link_open_mode = $params->get('file_link_open_mode', 'in_same_window');
     if ($show_mod_date) {
         $mod_date_format = $params->get('mod_date_format', 'M-j-Y g:ia');
     }
     // Construct the title first
     $rtitle_str = $params->get('attachments_titles', '');
     if (!$title || strlen($title) == 0) {
         $title = 'ATTACHMENTS TITLE';
     }
     if ($rtitle_str != '') {
         $rtitle_list = split("[\n|\r]", $rtitle_str);
         foreach ($rtitle_list as $rtitle) {
             $rchunks = split(' ', $rtitle, 2);
             if ($rtitle == '') {
                 continue;
             }
             if (count($rchunks) == 1) {
                 $title = $rtitle;
             } else {
                 if (is_numeric($rchunks[0])) {
                     if (intval($rchunks[0]) == intval($article_id)) {
                         $title = trim($rchunks[1]);
                         break;
                     }
                 } else {
                     $title = $rtitle;
                 }
             }
         }
     }
     $title = JText::_($title);
     // Massage some of the attachments info
     if ($mainframe->isAdmin()) {
         $base_url = $mainframe->getSiteURL();
     } else {
         $base_url = JURI::Base();
     }
     $icon_url_base = $base_url . 'components/com_attachments/media/icons/';
     // Construct the starting HTML
     $html = "\n<div class=\"{$style}\">\n";
     $html .= "<table>\n";
     $html .= "<caption>{$title}</caption>\n";
     // Add the column titles, if requested
     if ($show_column_titles) {
         $html .= "<thead>\n<tr>";
         $html .= "<th class=\"at_filename\">" . JText::_('FILE') . "</th>";
         if ($show_description) {
             $html .= "<th class=\"at_description\">" . JText::_('DESCRIPTION') . "</th>";
         }
         if ($params->get('user_field_1_name', '') != '') {
             $html .= "<th class=\"at_user_field\">" . $params->get('user_field_1_name', '') . "</th>";
         }
         if ($params->get('user_field_2_name', '') != '') {
             $html .= "<th class=\"at_user_field\">" . $params->get('user_field_2_name', '') . "</th>";
         }
         if ($params->get('user_field_3_name', '') != '') {
             $html .= "<th class=\"at_user_field\">" . $params->get('user_field_3_name', '') . "</th>";
         }
         if ($show_file_size) {
             $html .= "<th class=\"at_file_size\">" . JText::_('FILE SIZE') . "</th>";
         }
         if ($secure && $show_downloads) {
             $html .= "<th class=\"at_downloads\">" . JText::_('DOWNLOADS') . "</th>";
         }
         if ($show_mod_date) {
             $html .= "<th class=\"at_mod_date\">" . JText::_('LAST MODIFIED') . "</th>";
         }
         if ($some_attachments_modifiable) {
             $html .= "<th class=\"at_modify\">&nbsp;</th>";
         }
         $html .= "</tr>\n</thead>\n";
     }
     $html .= "<tbody>\n";
     // Construct the lines for the attachments
     $row_num = 0;
     for ($i = 0, $n = count($rows); $i < $n; $i++) {
         $row =& $rows[$i];
         // Skip this one if it should not be visible
         if (!$row->user_may_see) {
             continue;
         }
         $row_num++;
         if ($row_num & 1 == 1) {
             $html .= '<tr class="odd">';
         } else {
             $html .= '<tr class="even">';
         }
         // Construct some display items
         if (strlen($row->icon_filename) > 0) {
             $icon_url = $icon_url_base . $row->icon_filename;
         } else {
             $icon_url = $icon_url_base . 'generic.gif';
         }
         if ($show_file_size) {
             $file_size = intval($row->file_size / 1024.0);
         }
         if ($show_mod_date) {
             jimport('joomla.utilities.date');
             $date = new JDate($row->modification_date, -$mainframe->getCfg('offset'));
             $last_modified = $date->toFormat($mod_date_format);
         }
         // Add the filename
         $target = '';
         if ($file_link_open_mode == 'new_window') {
             $target = ' target="_blank"';
         }
         $html .= '<td class="at_filename">';
         if (strlen($row->display_filename) == 0) {
             $filename = $row->filename;
         } else {
             $filename = $row->display_filename;
         }
         if ($show_file_links) {
             if ($secure) {
                 $url = "index.php?option=com_attachments&task=download&id=" . $row->id;
                 $url = JRoute::_($url);
             } else {
                 $url = $base_url . $row->url;
             }
             $tooltip = JText::_('DOWNLOAD THIS FILE') . ' (' . $row->filename . ')';
             $html .= "<a class=\"at_icon\" href=\"{$url}\"{$target} title=\"{$tooltip}\"><img src=\"{$icon_url}\" alt=\"{$tooltip}\" /></a>";
             $html .= "<a class=\"at_url\" href=\"{$url}\"{$target} title=\"{$tooltip}\">{$filename}</a>";
         } else {
             $tooltip = JText::_('DOWNLOAD THIS FILE') . ' (' . $row->filename . ')';
             $html .= "<img src=\"{$icon_url}\" alt=\"{$tooltip}\" />&nbsp;";
             $html .= $filename;
         }
         $html .= "</td>";
         // Add description (maybe)
         if ($show_description) {
             $description = $row->description;
             if (strlen($description) == 0) {
                 $description = '&nbsp;';
             }
             if ($show_column_titles) {
                 $html .= "<td class=\"at_description\">{$description}</td>";
             } else {
                 $html .= "<td class=\"at_description\">[{$description}]</td>";
             }
         }
         // Show the USER DEFINED FIELDs (maybe)
         if ($params->get('user_field_1_name', '') != '') {
             $user_field = $row->user_field_1;
             if (strlen($user_field) == 0) {
                 $user_field = '&nbsp;';
             }
             if ($show_column_titles) {
                 $html .= "<td class=\"at_user_field\">" . $user_field . "</td>";
             } else {
                 $html .= "<td class=\"at_user_field\">[" . $user_field . "]</td>";
             }
         }
         if ($params->get('user_field_2_name', '') != '') {
             $user_field = $row->user_field_2;
             if (strlen($user_field) == 0) {
                 $user_field = '&nbsp;';
             }
             if ($show_column_titles) {
                 $html .= "<td class=\"at_user_field\">" . $user_field . "</td>";
             } else {
                 $html .= "<td class=\"at_user_field\">[" . $user_field . "]</td>";
             }
         }
         if ($params->get('user_field_3_name', '') != '') {
             $user_field = $row->user_field_3;
             if (strlen($user_field) == 0) {
                 $user_field = '&nbsp;';
             }
             if ($show_column_titles) {
                 $html .= "<td class=\"at_user_field\">" . $user_field . "</td>";
             } else {
                 $html .= "<td class=\"at_user_field\">[" . $user_field . "]</td>";
             }
         }
         // Add file size (maybe)
         if ($show_file_size) {
             $html .= "<td class=\"at_file_size\">{$file_size} Kb</td>";
         }
         // Show number of downloads (maybe)
         if ($secure && $show_downloads) {
             $num_downloads = intval($row->download_count);
             $label = '';
             if (!$show_column_titles) {
                 if ($num_downloads == 1) {
                     $label = '&nbsp;' . JText::_('DOWNLOAD NOUN');
                 } else {
                     $label = '&nbsp;' . JText::_('DOWNLOADS');
                 }
             }
             $html .= '<td class="at_downloads">' . $num_downloads . $label . '</td>';
         }
         // Add the modification date (maybe)
         if ($show_mod_date) {
             $html .= "<td class=\"at_mod_date\">{$last_modified}</td>";
         }
         // Add the link to delete the article, if requested
         if ($some_attachments_modifiable && $row->user_may_modify) {
             // Create the delete link
             $url = "index.php?option=com_attachments&task=update&id={$row->id}";
             $url .= "&from=closeme&tmpl=component";
             $url = JRoute::_($url);
             $update_img = $base_url . 'components/com_attachments/media/pencil.gif';
             $tooltip = JText::_('UPDATE THIS FILE') . ' (' . $row->filename . ')';
             $update_link = '<a class="modal-button" type="button" href="' . $url . '"';
             $update_link .= " rel=\"{handler: 'iframe', size: {x: 800, y: 530}}\"";
             $update_link .= " title=\"{$tooltip}\"><img src=\"{$update_img}\" alt=\"{$tooltip}\" /></a>";
             // Create the delete link
             $url = "index.php?option=com_attachments&task=delete_warning&id={$row->id}&artid={$article_id}";
             if ($from) {
                 // Add a var to give a hint of where to return to
                 $url .= "&from={$from}";
             } else {
                 $url .= "&from=closeme";
             }
             $url .= "&tmpl=component";
             $url = JRoute::_($url);
             $delete_img = $base_url . 'components/com_attachments/media/delete.gif';
             $tooltip = JText::_('DELETE THIS FILE') . ' (' . $row->filename . ')';
             $del_link = '<a class="modal-button" type="button" href="' . $url . '"';
             $del_link .= " rel=\"{handler: 'iframe', size: {x: 600, y: 300}}\"";
             $del_link .= " title=\"{$tooltip}\"><img src=\"{$delete_img}\" alt=\"{$tooltip}\" /></a>";
             $html .= "<td class=\"at_modify\">{$update_link} {$del_link}</td>";
         }
         $html .= "</tr>\n";
     }
     // Close the HTML
     $html .= "</tbody></table></div>\n";
     return $html;
 }
Exemplo n.º 29
0
		</td>
		<td width="90%" class='title'>Show the element settings box.</td>
	</tr>
	<tr>
		<td width="10%" class='title' style="text-align: center;">
			<img src="<?php 
echo JURI::Base();
?>
components/com_chronoforms/css/formwizard/sort.png" alt="remove" width="15" height="15">
		</td>
		<td width="90%" class='title'>Drag to sort the element order.</td>
	</tr>
	<tr>
		<td width="10%" class='title' style="text-align: center;">
			<img src="<?php 
echo JURI::Base();
?>
components/com_chronoforms/css/formwizard/drag.png" alt="remove" width="22" height="22">
		</td>
		<td width="90%" class='title'>Draggable item.</td>
	</tr>
	<tr>
		<td width="10%" class='title' style="text-align: center;">
			<img src="<?php 
echo $uri->root();
?>
includes/js/ThemeOffice/tooltip.png" alt="remove" width="16" height="16">
		</td>
		<td width="90%" class='title'>Tooltip, hover to display some hints.</td>
	</tr>
</table>
Exemplo n.º 30
0
                    return CMS_JOOMLA16;
                    break;
                case 1.7:
                    require_once S2_ROOT . DS . 's2framework' . DS . 'libs' . DS . 'cms_compat' . DS . 'joomla17.php';
                    return CMS_JOOMLA16;
                    break;
            }
        }
    }
}
define('PATH_ROOT', JPATH_SITE . DS);
if (isset($mainframe) && method_exists('mainframe', 'getSiteUrl')) {
    define('WWW_ROOT_ADMIN', $mainframe->getSiteURL());
    // Client side
}
define('WWW_ROOT', str_replace('/administrator', '', JURI::Base()));
// Admin side
if (!defined('_PLUGIN_DIR_NAME')) {
    define('_PLUGIN_DIR_NAME', 'plugins');
}
/*********************************************************************
 * START FILE INCLUSIONS	
 *********************************************************************/
# Load paths
require dirname(__FILE__) . DS . 'config' . DS . 'paths.php';
# Load object class. Must be 1st to load
require S2_LIBS . 'object.php';
# Load libraries
require S2_LIBS . 'class_registry.php';
require S2_LIBS . 'folder.php';
require S2_LIBS . 'cache.php';