예제 #1
0
파일: view.php 프로젝트: 01J/bealtine
 function showStatus($type)
 {
     static $status;
     if (!isset($status)) {
         $status = SEFTools::getSEOStatus();
     }
     $html = '<div id="sef_status_' . $type . '">';
     $html .= '<div id="sef_status_' . $type . '_1"' . ($status[$type] ? '' : ' style="display: none"') . '>';
     $html .= '<span style="font-weight: bold; color: green;">' . JText::_('COM_SEF_ENABLED') . '</span>';
     $html .= ' <input type="button" class="btn btn-danger btn-small" onclick="JoomSEF.ajaxItemTask(\'status\', \'' . $type . '\', \'disableStatus\');" value="' . JText::_('COM_SEF_DISABLE') . '" />';
     $html .= '</div>';
     $html .= '<div id="sef_status_' . $type . '_0"' . (!$status[$type] ? '' : ' style="display: none"') . '>';
     $html .= '<span style="font-weight: bold; color: red;">' . JText::_('COM_SEF_DISABLED') . '</span>';
     $html .= ' <input type="button" class="btn btn-success btn-small" onclick="JoomSEF.ajaxItemTask(\'status\', \'' . $type . '\', \'enableStatus\');" value="' . JText::_('COM_SEF_ENABLE') . '" />';
     $html .= '</div>';
     $html .= $this->getAjaxWorking('status_' . $type);
     $html .= '</div>';
     echo $html;
 }
예제 #2
0
function showStatus($type)
{
    static $status;
    if (!isset($status)) {
        $status = SEFTools::getSEOStatus();
    }
    if (isset($status[$type])) {
        if ($status[$type]) {
            echo '<span style="font-weight: bold; color: green;">' . JText::_('Enabled') . '</span>';
            echo ' <input type="button" onclick="disableStatus(\'' . $type . '\');" value="' . JText::_('Disable') . '" />';
        } else {
            echo '<span style="font-weight: bold; color: red;">' . JText::_('Disabled') . '</span>';
            echo ' <input type="button" onclick="enableStatus(\'' . $type . '\');" value="' . JText::_('Enable') . '" />';
        }
    }
}