Exemplo n.º 1
0
			<?php 
    }
    ?>
			
			<?php 
    foreach ($this->ticket->admin_cc as $cc) {
        ?>
				<div class="fss_tag label admin_cc label-small-close label-info" id="admin_cc_<?php 
        echo $cc->id;
        ?>
">
					<?php 
        if ($this->can_ChangeTicket()) {
            ?>
						<a class="close" href="<?php 
            echo FSSRoute::x("&ticketid=" . $this->ticket->id . "&task=ticket.removecc&is_admin=1&ids=" . $cc->id, false);
            ?>
">&times;</a>
					<?php 
        }
        ?>
					<span>
						<?php 
        echo $cc->name;
        ?>
					</span>
				</div>
			<?php 
    }
    ?>
		</td>
Exemplo n.º 2
0
<?php

/**
 * @package Freestyle Joomla
 * @author Freestyle Joomla
 * @copyright (C) 2013 Freestyle Joomla
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
echo FSS_Helper::PageStylePopup(true);
echo FSS_Helper::PageTitlePopup(JText::_("Select related article"));
?>

<form method="post" action="<?php 
echo FSSRoute::x('&');
?>
" id="fssForm" name="fssForm">
	
	<div class="pull-right">
		<?php 
echo $this->filter_html['published'];
?>
		<?php 
if (FSS_Permission::auth("core.edit", "com_fss.kb")) {
    ?>
			<?php 
    echo $this->filter_html['userid'];
    ?>
		<?php 
}
?>
Exemplo n.º 3
0
	jQuery('#tags').load(url);
	return false;
}

function tag_add(tagname)
{
	if (tagname == "")
		return;
	
	jQuery('#tag_list_container').removeClass("open");	
	jQuery('#tags').html("<?php 
echo JText::_('PLEASE_WAIT');
?>
");
	var url = '<?php 
echo FSSRoute::x("&task=update.add_tag", false);
?>
&tag=' + encodeURIComponent(tagname);
	jQuery('#tags').load(url);
	return false;
}

function cancelReply()
{
	window.location.href = '<?php 
echo FSSRoute::_("index.php?option=com_fss&view=admin_support&ticketid=" . $this->ticket->id, false);
?>
';
}

function sigsRefresh()
Exemplo n.º 4
0
    function OutputTable()
    {
        if (!$this->xml) {
            return;
        }
        ?>

		<p>
			<div class="pull-right">
<?php 
        foreach ($this->xml->filters->filter as $filter) {
            $type = (string) $filter->attributes()->type;
            $field = (string) $filter->attributes()->field;
            $filter_id = (string) $filter->attributes()->id;
            $var = "filter_" . $filter_id;
            $value = $this->{$var};
            if ($type == "lookup") {
                $key = (string) $filter->key;
                $display = (string) $filter->display;
                echo "<select name='filter_{$filter_id}' id='filter_{$filter_id}' onchange='jQuery(\"#fssForm\").submit()'>";
                $db = JFactory::getDBO();
                $db->setQuery($filter->sql);
                $items = $db->loadAssocList();
                echo "<option value=''>" . (string) $filter->heading . "</option>";
                foreach ($items as $item) {
                    $selected = "";
                    if ($item[$key] == $value) {
                        $selected = "selected='selected'";
                    }
                    echo "<option value='" . $item[$key] . "' {$selected}>" . $item[$display] . "</option>";
                }
                echo "</select>";
            }
        }
        // output header
        ?>
			</div>
			
			<div class='input-append'>
				<input name='search' id="search" type='text' value="<?php 
        echo htmlentities($this->search, ENT_QUOTES, "utf-8");
        ?>
" class="input-medium" placeholder="Search" />
				<button class='btn btn-primary'>Go</button>
				<button" class='btn btn-default' onclick="resetForm();">Reset</button>
			</div>
		</p>
	<table class="table table-bordered table-condensed table-striped">
		<thead>
			<tr>
				<th width="5">#</th>
<?php 
        foreach ($this->xml->displayfields->field as $field) {
            ?>
				<th><?php 
            echo JHTML::_('grid.sort', $field->attributes()->id, $field->attributes()->sort, $this->orderdir, $this->order);
            ?>
</th>
<?php 
        }
        ?>
			</tr>
		</thead>
		<tbody>
<?php 
        $displayfield = (string) $this->xml->displayfield;
        $k = 0;
        for ($i = 0, $n = count($this->data); $i < $n; $i++) {
            $row = $this->data[$i];
            ?>
        <tr class="<?php 
            echo "row{$k}";
            ?>
">
            <td>
                <?php 
            echo $row->id;
            ?>
            </td>
			<?php 
            foreach ($this->xml->displayfields->field as $field) {
                ?>
				<td>
					<?php 
                if ($field->attributes()->link) {
                    $link = (string) $this->xml->link;
                    $keyfield = (string) $this->xml->keyfield;
                    $link = FSSRoute::x(str_replace("%ID%", $row->{$keyfield}, $link), false);
                    $link = JURI::base() . substr($link, strlen(JURI::base(true)) + 1);
                    echo "<a href='{$link}' class='pick_link' id='pick_{$row->id}'>";
                }
                $field_name = (string) $field->attributes()->name;
                if ((string) $field->attributes()->type == "yesno") {
                    echo FSJ_Helper::GetYesNoText($row->{$field_name});
                } else {
                    echo $row->{$field_name};
                }
                if ($field->attributes()->link) {
                    echo "</a>";
                }
                ?>
				</td>
			<?php 
            }
            ?>
			<td id="title_<?php 
            echo $row->id;
            ?>
" style='display:none'><?php 
            echo $row->{$displayfield};
            ?>
</td>
		</tr>
        <?php 
            $k = 1 - $k;
        }
        ?>
		
		</tbody>
	</table>
	<?php 
        echo $this->pagination->getListFooter();
        ?>

<input type="hidden" name="filter_order" id="filter_order" value="<?php 
        echo $this->order;
        ?>
" />
<input type="hidden" name="filter_order_Dir" id="filter_order_Dir" value="<?php 
        echo $this->orderdir;
        ?>
" />
<input type="hidden" name="boxchecked" id='boxchecked' value="0" />
<input type="hidden" name="type" id="type" value="<?php 
        echo $this->type;
        ?>
" />
<input type="hidden" name="editor" id="editor" value="<?php 
        echo $this->editor;
        ?>
" />
	
<input type="hidden" name="option" value="com_fss" />
<input type="hidden" name="view" value="admin_insert" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="tmpl" value="component" />

<script>

function resetForm() {
	jQuery('#search').val("");
	<?php 
        foreach ($this->xml->filters->filter as $filter) {
            $type = (string) $filter->attributes()->type;
            $field = (string) $filter->attributes()->field;
            $filter_id = (string) $filter->attributes()->id;
            ?>
	jQuery('#filter_<?php 
            echo $filter_id;
            ?>
').val("");		
	<?php 
        }
        ?>
	
	jQuery('#fssForm').submit();
}

function tableOrdering(field, order)
{
	jQuery('#order').val(field);
	jQuery('#orderdir').val(order);
	jQuery('#pickRelForm').submit();
}	

jQuery(document).ready(function () {
	jQuery('.pick_link').click(function (ev) {
		ev.preventDefault();
		var url = jQuery(this).attr('href');
		var title = jQuery(this).text();
		
		window.parent.insertLink(url, title, '<?php 
        echo FSS_Input::getCmd('editor');
        ?>
');
	});
});
</script>
<?php 
    }
Exemplo n.º 5
0
		ids = user_id.join(",");	
	}
	
	// add users here, and reload the relevant cc or reload page if not there
	var url = "<?php 
echo FSSRoute::x("&ticketid=" . $this->ticket->id . "&task=ticket.addcc", false);
?>
&ids=" + escape(ids) + "&is_readonly=" + escape(is_readonly) + "&is_admin=" + escape(is_admin);
	
	window.location = url;
}

function addEMailCC(email)
{
	var url = "<?php 
echo FSSRoute::x("&ticketid=" . $this->ticket->id . "&task=ticket.addemailcc", false);
?>
&email=" + escape(email);
	window.location = url;
}

jQuery(document).ready( function () {
	jQuery('.user_cc a').click( function(ev) {
		ev.preventDefault();
		
		var url = jQuery(this).attr('href');
		url = url + "&nr=1";
		
		jQuery.ajax({
			url: url
		});
Exemplo n.º 6
0
 function IncludeJS()
 {
     global $fss_comments_js;
     if (empty($fss_comments_js)) {
         $document = JFactory::getDocument();
         $document->addScript(JURI::root() . 'components/com_fss/assets/js/comments.js');
         $fss_comments_js = 1;
         echo "<div id='comments_urls' ";
         echo "url='" . htmlentities(FSSRoute::x('&task=XXTASKXX&commentid=XXCIDXX&uid=XXUIDXX', false), ENT_QUOTES, "utf-8") . "' ";
         echo "refresh='" . htmlentities(FSSRoute::x('&task=modinner&ident=XXXIDXX&published=XXPXX', false), ENT_QUOTES, "utf-8") . "' ";
         echo "wait='" . htmlentities(JText::_('PLEASE_WAIT'), ENT_QUOTES, "utf-8") . "' ";
         echo "ident='" . FSS_Input::getInt("ident", 0) . "' ";
         echo "published='" . FSS_Input::getInt("published", 0) . "' ";
         echo "deleted='" . JText::_("COMMENT_DELETED") . "' ";
         echo "></div>";
     }
 }
Exemplo n.º 7
0
?>
');">
				<?php 
echo JText::_('DELETE_TICKET');
?>
			</a>
		</il>

		<?php 
echo FSS_GUIPlugins::output("adminTicketViewToolsMenu", array('ticket' => $this->ticket));
?>
	</ul>
</div>

<div class="pull-right btn-group" style="margin-right: 8px; z-index: 10;">
	<a class="btn btn-default fssTip" title="Goto previous ticket of this status" href="<?php 
echo FSSRoute::x('task=navigate.prev&ticketid=' . $this->ticket->id, false);
?>
"><?php 
echo JText::_('PREV');
?>
</a>
	<a class="btn btn-default fssTip" title="Goto next ticket of this status" href="<?php 
echo FSSRoute::x('task=navigate.next&ticketid=' . $this->ticket->id, false);
?>
"><?php 
echo JText::_('NEXT');
?>
</a>
</div>
Exemplo n.º 8
0
 function showProd()
 {
     $mainframe = JFactory::getApplication();
     $aparams = FSS_Settings::GetViewSettingsObj('kb');
     $this->assign('view_mode_cat', $aparams->get('prod_cat_mode', 'normal'));
     $this->assign('view_mode', $aparams->get('prod_cat_arts', 'list'));
     $this->assign('main_cat_colums', $aparams->get('prod_cat_colums', 1));
     $this->assign('prod_search', $aparams->get('prod_search', 1));
     //if ($this->view_mode_cat != 'normal')
     //{
     $this->cats = $this->get("CatsArts");
     //} else {
     //	$this->cats = $this->get("Cats");
     //}
     $this->assign('curcatid', 0);
     $this->product = $this->get("Product");
     if (!$this->product && FSS_Input::getInt('prodid') > 0) {
         return JError::raiseError(404, 'Product Not Found');
     }
     $document = JFactory::getDocument();
     $document->setTitle(JText::_("KNOWLEDGE_BASE") . ' - ' . $this->product['title']);
     $pathway = $mainframe->getPathway();
     if (FSS_Helper::NeedBaseBreadcrumb($pathway, array('view' => 'kb'))) {
         $pathway->addItem(JText::_('KNOWLEDGE_BASE'), FSSRoute::_('index.php?option=com_fss&view=kb'));
     }
     $pathway->addItem($this->product['title']);
     $this->arts = $this->get('UncatArts');
     // check for a single category and no uncat arts
     if (FSS_Settings::get('kb_auto_open_single_cat')) {
         $cat_count = 0;
         $catid = -1;
         foreach ($this->cats as $cat) {
             if (array_key_exists("subcats", $cat) && count($cat['subcats']) > 0 || array_key_exists("arts", $cat) && count($cat['arts']) || $this->view_mode_cat == "normal" || FSS_Input::getInt('catid') == $cat['id']) {
                 // check products that the cat can be shown in
                 $prodid = FSS_Input::getInt('prodid');
                 $can_show = true;
                 if ($prodid > 0) {
                     $prodids = $cat['prodids'];
                     if ($prodids != "") {
                         $prodids = explode(";", $prodids);
                         if (!in_array($prodid, $prodids)) {
                             $can_show = false;
                         }
                     }
                 }
                 if ($can_show) {
                     $catid = $cat['id'];
                     $cat_count++;
                 }
             }
         }
         // if so, redirect into that category
         if ($cat_count == 1 && count($this->arts) == 0) {
             $link = FSSRoute::x("&catid=" . $catid);
             return JFactory::getApplication()->redirect($link);
             //echo "Redirect to $link<br>";
         }
     }
     parent::display("prod");
 }
Exemplo n.º 9
0
<?php

/**
 * @package Freestyle Joomla
 * @author Freestyle Joomla
 * @copyright (C) 2013 Freestyle Joomla
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
?>
	<?php 
echo FSS_Helper::PageSubTitle("<a href='" . FSSRoute::x('&layout=moderate&ident=') . "'><img src='" . JURI::root(true) . "/components/com_fss/assets/images/support/moderate_24.png'>&nbsp;" . JText::_("MODERATE") . "</a>", false);
?>

	<p>
		<?php 
echo JText::sprintf("MOD_STATUS", $this->comments->GetModerateTotal(), FSSRoute::_('index.php?option=com_fss&view=admin_moderate'));
?>
	</p>
	<?php 
$this->comments->DisplayModStatus();
Exemplo n.º 10
0
<?php

/**
 * @package Freestyle Joomla
 * @author Freestyle Joomla
 * @copyright (C) 2013 Freestyle Joomla
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die;
?>

<?php 
echo FSS_Helper::PageSubTitle("<a href='" . FSSRoute::x('index.php?option=com_fss&view=admin_content') . "'><img src='" . JURI::root(true) . "/components/com_fss/assets/images/support/content_24.png'>&nbsp;" . JText::_("CONTENT") . "</a>", false);
?>

<?php 
if (FSS_Permission::PermAnyContent()) {
    echo FSS_Helper::PageSubTitle2("YOUR_ARTICLES");
    ?>

<ul>
<?php 
    foreach ($this->artcounts as $type) {
        ?>
	<?php 
        if (FSS_Permission::auth("core.edit.own", FSS_Admin_Helper::id_to_asset($type['id'])) || FSS_Permission::auth("core.edit", FSS_Admin_Helper::id_to_asset($type['id']))) {
            ?>
		<li>
			<?php 
            echo $type['desc'];
            ?>
Exemplo n.º 11
0
 function _buildDataObject()
 {
     if (empty($this->_viewall)) {
         $this->_viewall = false;
     }
     // Initialize variables
     $data = new stdClass();
     $data->all = new JPaginationObject(JText::_("VIEW_ALL"));
     if (!$this->_viewall) {
         $data->all->base = '0';
         $data->all->link = FSSRoute::x("&limitstart=");
     }
     // Set the start and previous data objects
     $data->start = new JPaginationObject(JText::_("START"));
     $data->previous = new JPaginationObject(JText::_("PREV"));
     if ($this->get('pages.current') > 1) {
         $page = ($this->get('pages.current') - 2) * $this->limit;
         $page = $page == 0 ? '' : $page;
         //set the empty for removal from route
         $data->start->base = '0';
         $data->start->link = "javascript:ChangePage(0);";
         $data->previous->base = $page;
         $data->previous->link = "javascript:ChangePage({$page});";
     }
     // Set the next and end data objects
     $data->next = new JPaginationObject(JText::_("NEXT"));
     $data->end = new JPaginationObject(JText::_("END"));
     if ($this->get('pages.current') < $this->get('pages.total')) {
         $next = $this->get('pages.current') * $this->limit;
         $end = ($this->get('pages.total') - 1) * $this->limit;
         $data->next->base = $next;
         $data->next->link = "javascript:ChangePage({$next});";
         $data->end->base = $end;
         $data->end->link = "javascript:ChangePage({$end});";
     }
     $data->pages = array();
     $stop = $this->get('pages.stop');
     for ($i = $this->get('pages.start'); $i <= $stop; $i++) {
         $offset = ($i - 1) * $this->limit;
         $offset = $offset == 0 ? '' : $offset;
         //set the empty for removal from route
         $data->pages[$i] = new JPaginationObject($i);
         if ($i != $this->get('pages.current') || $this->_viewall) {
             $data->pages[$i]->base = $offset;
             $data->pages[$i]->link = "javascript:ChangePage({$offset});";
         }
     }
     return $data;
 }
Exemplo n.º 12
0
    ?>
		
	<?php 
}
?>
</div>

<?php 
$pages = ceil(count($this->_data) / $perpage);
if ($pages > 1) {
    echo '<div class="pagination pagination-small"><ul>';
    for ($i = 1; $i <= $pages; $i++) {
        if ($i == $page) {
            echo "<li class='active'><a href='#'>{$i}</a></li>";
        } else {
            echo "<li><a href='" . FSSRoute::x('&comm_page=' . $i) . "#{$comm_ref}'>{$i}</a></li>";
        }
    }
    echo "</ul></div>";
}
?>
 
<?php 
$this->IncludeJS();
?>

<script>
function expand_test(test_id)
{
	var div = jQuery('#test_full_' + test_id);
	var html = div.html();