Beispiel #1
0
         require_once $path;
     } else {
         $controller = '';
     }
 }
 if (!function_exists("print_p")) {
     function print_p($var)
     {
         echo "<pre>";
         print_r($var);
         echo "</pre>";
     }
 }
 // do version check
 $ver_inst = FSSAdminHelper::GetInstalledVersion();
 $ver_files = FSSAdminHelper::GetVersion();
 if (!JFactory::getUser()->authorise('core.manage', 'com_fss')) {
     return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
 }
 // if bad version display warning message
 if ($ver_files != $ver_inst) {
     $task = JRequest::getVar('task');
     $view = JRequest::getVar('view');
     if ($task != "update" || $view != "backup") {
         JError::raiseWarning(100, JText::sprintf('INCORRECT_VERSION', FSSRoute::_('index.php?option=com_fss&view=backup&task=update')));
     }
     if ($view != "" && $view != "backup") {
         JRequest::setVar('view', '');
     }
 }
 // if bad version and controller is not fsss dont display
Beispiel #2
0
<iframe id="frame_announce" height="600" width="100%" frameborder="0" border="0"></iframe>
<?php 
$title = JText::_("HELP");
echo JHTML::_('fsjtabs.panel', $title, 'cpanel-panel-help');
?>
<iframe id="frame_help" height="600" width="100%" frameborder="0" border="0"></iframe>
<?php 
echo JHTML::_('fsjtabs.end');
?>

		</td>	
	</tr>
</table>

<script>
jQuery(document).ready(function () {
	jQuery('#frame_version').attr('src',"http://freestyle-joomla.com/latestversion-fss?ver=<?php 
echo FSSAdminHelper::GetVersion();
?>
");
	jQuery('#frame_version').load(function() 
    {
        jQuery('#please_wait').remove();
    });

	jQuery('#frame_announce').attr('src',"http://freestyle-joomla.com/support/announcements?tmpl=component");
	jQuery('#frame_help').attr('src',"http://freestyle-joomla.com/index.php?option=com_content&view=article&id=81&tmpl=component");
});
</script>

</div>
Beispiel #3
0
 function UpdateVersion($path)
 {
     $version = FSSAdminHelper::GetVersion($path);
     $db = JFactory::getDBO();
     $qry = "REPLACE INTO #__fss_settings (setting, value) VALUES ('version', '{$version}')";
     $db->SetQuery($qry);
     $db->Query();
     //echo $qry."<br>";
     $log = "Updating version to {$version}\n";
     return $log;
 }