Location: PHPKode > projects > Joomla SEF / SEO - extending OpenSEF > admin/tools.tpl.php
<table width="100%" height="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%">
      <div class="toolbar-box">
        <div class="toolbar-pad">
          <div class="toolbar" id="toolbar">
            <table class="toolbar">
              <tr>
                <?php if (empty( $this->show ) || $this->show == 'feedback' || $this->show == 'debug' || $this->show == 'import'):
                ?>
                <td class="button" id="toolbar-tools">
                  <a href="index2.php?option=com_sef&act=tools&show=setup" class="toolbar">
                  <div class="icon-32-tools" title="Publish" type="Standard">
</div><?php echo _T( 'UPGRADES_AND_ADDONS' ) ?>
                  </a>
                </td>
                <td class="button" id="toolbar-import">
                  <a href="index2.php?option=com_sef&act=tools&show=import" class="toolbar">
                  <div class="icon-32-import" title="Import/Export" type="Standard">
</div><?php echo _T( 'IMPORT_EXPORT_DATA' ) ?>
                  </a>
                </td>
                <td class="button" id="toolbar-check">
                  <a href="index2.php?option=com_sef&act=tools&show=debug" class="toolbar">
                  <div class="icon-32-check" title="New" type="Standard">
</div><?php echo _T( 'DEBUG' ) ?>
                  </a>
                </td>
                <td class="button" id="toolbar-send">
                  <a href="index2.php?option=com_sef&act=tools&show=feedback" class="toolbar">
                  <div class="icon-32-send" title="Edit" type="Standard">
</div><?php echo _T( 'SEND_FEEDBACK' ) ?>
                  </a>
                </td>
                <?php endif; /* task == 'main' */
                ?>
                <?php if ($this->show == 'setup'):
                ?>
                <td class="button" id="toolbar-upgrade">
                  <a onclick="javascript:if (document.adminForm.boxchecked.value == 0){ alert('Please make a selection from the list to Update');}else{submitbutton('upgrade')}" class="toolbar">
                  <div class="icon-32-upgrade" title="Upgrade" type="Standard">
</div><?php echo _T( 'UPDATE_UPGRADE' ) ?>
                  </a>
                </td>
                <td class="button" id="toolbar-back">
                  <a onclick="javascript:window.history.back();" class="toolbar">
                  <div class="icon-32-back" title="Back" type="Standard">
</div><?php echo _T( 'BACK' ) ?>
                  </a>
                </td>
                <?php endif; /* task == 'setup' */
                ?>
              </tr>
            </table>
          </div>
          <?php if (empty( $this->show ) || $this->show == 'feedback' || $this->show == 'debug' || $this->show == 'import'):
          ?>
          <div class="header icon-48-addons">
             &nbsp;<?php echo _T( 'TOOLS_AND_UTILITIES' )
            ?>
          </div>
          <?php endif; /* task == 'main' */
          ?>
          <?php if ($this->show == 'setup'):
          ?>
          <div class="header icon-48-static">
             &nbsp;<?php echo _T( 'UPGRADE_OPENSEF' )
            ?>
          </div>
          <?php endif; /* task == 'setup' */
          ?>
          <div class="clr">
          </div>
        </div>
        <div class="clr">
        </div>
      </div>
    </td>
  </tr>
</table>
<div class="spacer">
</div>
<div class="element-box">
  <div class="element-pad">
    <?php if ($this->show == 'setup'):
    ?>
    <p>
      <table width="100%" height="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td width="100%">
            <?php
  $url2 = $this->xml->getElementText( '/mosinstall/setupUrl' );
            ?>
            <form action="index2.php?option=com_sef&act=tools" method="post" name="adminForm">
              <table class="adminlist2" cellspacing="1">
              <thead>
                <tr>
                  <th align="left">
                    <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $this->mod ); ?>);" />
                  </th>
                  <th align="left" class="title" width="50%">
                    <?php echo _T('UPDATE_COMPONENTS')
                    ?>
                  </th>
                  <th align="left" class="title" width="15%">
                    <?php echo _T( 'INSTALLED_VERSION' )
                    ?>
                  </th>
                  <th align="left" class="title" width="15%">
                    <?php echo _T( 'LATEST_VERSION' )
                    ?>
                  </th>
                  <th align="left" class="title" width="10%">
                    <?php echo _T( 'CHANGELOG' )
                    ?>
                  </th>
                  <th align="left" class="title" width="10%">
                    <?php echo _T( 'STATUS' )
                    ?>
                  </th>
                </tr>
                </thead>
                <?php
if (empty( $this->config->backend_autoupdates )):
    $url = $this->xml->getElementText( '/mosinstall/productUrl' );
                ?>
                <tr>
                  <td valign="middle" align="left" colspan="6">
                    <a href="<?php echo $url ?>"
          target="_blank"><?php echo $url ?><br /><?php echo _T( 'FETCHING_UPDATES_FAILED' ) ?></a>
                  </td>
                </tr>
                <?php
  else:
    if (!is_array( $this->mod )):
                ?>
                <tr>
                  <td valign="middle" align="left" colspan="6">
                    <?php echo _T( 'FETCHING_UPDATES_FAILED' )
                    ?>
                  </td>
                </tr>
                <?php
    else:


$i = 0;
foreach ($this->mod as $m) {
	if ($m->update)
		$img = "status_r";
	else
		$img = "status_g";
		$imgpath = $GLOBALS['mosConfig_live_site']."/administrator/components/com_sef/includes/images/".$img.".png";
	if ($m->update) {
		$checked = "<input type=\"checkbox\" id=\"cb".$i."\" name=\"cid[]\" value=\"".$i."\" onclick=\"isChecked(this.checked);\" />";
	} else
		$checked = "<input disabled type=\"checkbox\" onclick=\"isChecked(this.checked);\" />";
                ?>
                <input type="hidden" name="mod[<?php echo $i?>][module]" value="<?php echo $m->module?>" />
                <input type="hidden" name="mod[<?php echo $i?>][oldversion]" value="<?php echo $m->oldVersion?>" />
                <tr class="<?php echo "row$k"; ?>">
                  <td >
                    <?php  echo $checked
                    ?>
                  </td>
                  <td valign="middle" nowrap="1">
                    <?php echo $m->product
                    ?>
                  </td>
                  <td valign="middle" nowrap="1">
                    <?php echo $m->oldVersion
                    ?>
                  </td>
                  <?php if ($m->update){
                  ?>
                  <td valign="middle" nowrap="1">
                    <?php echo $m->newVersion
                    ?>
                  </td>
                  <?php } else {
                  ?>
                  <td valign="middle" nowrap="1">
                    <?php echo $m->oldVersion
                    ?>
                  </td>
                  <?php }
                  ?>
                  <td align="center">
                    <a href="#" onClick="javascript:window.open('<?php echo $url2 ?><?php echo $m->module?>log.txt','Changelog', 'resizable=yes, scrollbars=yes, location=no, menubar=no, status=no, toolbar=no, width=640, height=480')"><img src="components/com_sef/includes/images/history.png" border="0" alt="" />
	</a>
                  </td>
                  <td align="center">
                    <img src="<?php echo $imgpath;?>" />
                  </td>
                </tr>
                <?php
	$i ++;
}
                ?>
                 <tfoot>
				<td colspan="7">
     			<?php if (is_object( $this->pageNav )) echo $this->pageNav->getListFooter(); ?>

     		   </td></tfoot>
     		   </table>
     		    	<p>
              <?php
$imgpath1 = $GLOBALS['mosConfig_live_site']."/administrator/components/com_sef/includes/images/status_g.png";
$imgpath2 = $GLOBALS['mosConfig_live_site']."/administrator/components/com_sef/includes/images/status_r.png";
              ?>
              <table width="100%" height="100%" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left">
                    <img src="<?php echo $imgpath1;?>" />
                    &nbsp;<?php echo _T( 'UPGRADES1' )
                    ?>
                     &nbsp;<img src="<?php echo $imgpath2;?>" />
                    &nbsp;<?php echo _T( 'UPGRADES2' )
                    ?>
                  </td>
                </tr>
              </table>
              <?php
endif;
endif;
              ?>
              <input type="hidden" name="option" value="<?php echo $this->option ?>" />
              <input type="hidden" name="act" value="<?php echo $this->act ?>">
              <input type="hidden" name="task" value="<?php echo $this->task ?>" />
              <input type="hidden" name="show" value="<?php echo $this->show ?>" />
              <input type="hidden" name="boxchecked" value="0" />
            </form>
              <?php endif; /* task == 'setup' */
              ?>
              <?php if ($this->show == 'import'):
              ?>
              <form action="index2.php?option=com_sef&act=tools&task=import" method="post" name="adminForm">
                <p>
                  <table class="adminlist" >
                    <tr>
                      <th class="title" colspan="10">
                        <?php echo _T( 'IMPORT_DATA' )
                        ?>
                      </th>
                    </tr>
                    <tr>
                      <td valign="top" align="left" width="215">
                        <select name="import_source" style="width: 210px;"
          onchange="submitbutton('');">
        <?php
          $import_source = mosGetParam( $_REQUEST, 'import_source', null );
          $options = array(
            ''        => '(' . _T( 'SELECT_SOURCE' ) . ')',
            'alias'   => _T( 'IMPORT_ALIAS' ),
            '404sef'  => _T( 'IMPORT_404SEF' ),
            'sefa'    => _T( 'IMPORT_SEFA' ),
          );
          $this->plugin( 'options', $options, $import_source );
        ?>
                        </select>
                      </td>
                      <td valign="top" align="left" width="100%">
                        <?php
          if (!empty( $import_source ) && $import_source == 'alias') {
            $this->plugin( 'checkbox', 'import_sites', '1', null, '0' );
            echo( '&nbsp;' . _T( 'OPTION_IMPORT_CREATE_SITES' ) . '<br />' );
            //$this->plugin( 'checkbox', 'import_preserve', '1', null, '0' );
            //echo( '&nbsp;' . _T( 'OPTION_IMPORT_PRESERVE_IDS' ) . '<br />' );
            $this->plugin( 'checkbox', 'import_remove', '1', null, '0' );
            echo( '&nbsp;' . _T( 'OPTION_AM103_REMOVE_TABLES' ) . '<br />' );
          }
          if (!empty( $import_source ) && $import_source == '404sef') {
            $this->plugin( 'checkbox', 'import_remove', '1', null, '0' );
            echo( '&nbsp;' . _T( 'OPTION_AM404_REMOVE_TABLES' ) . '<br />' );
          }
          if (!empty( $import_source ) && $import_source == 'sefa') {
            $this->plugin( 'checkbox', 'import_remove', '1', null, '0' );
            echo( '&nbsp;' . _T( 'OPTION_AMSEFA_REMOVE_TABLES' ) . '<br />' );
          }
                        ?>
                      </td>
                      <td valign="top" align="left">
                         &nbsp;
                      </td>
                      <td valign="top" align="left" width="10%">
                        <input type="button" value="<?php echo _T( 'CMD_IMPORT' ) ?>"
          style="width: 85px"
      <?php if (empty( $import_source )): ?>
          onclick="alert('<?php echo _T( 'SELECT_IMPORT_SOURCE' ) ?>');" />
      <?php else:
                        ?>
                         onclick="submitbutton('import');" /><?php endif;
                        ?>
                      </td>
                      <td valign="top" width="1%">
                         &nbsp;
                      </td>
                    </tr>
                  </table>
                <p>
                  <table class="adminlist" width="100%">
                    <tr>
                      <th class="title" colspan="10">
                        <?php echo _T( 'EXPORT_DATA' )
                        ?>
                      </th>
                    </tr>
                    <tr>
                      <td valign="middle" align="left" width="215">
                        <select name="export_format" style="width: 210px;"
          onchange="submitbutton('');">
        <?php
          $export_format = mosGetParam( $_REQUEST, 'export_format', null );
          $options = array(
            ''        => '(' . _T( 'SELECT_FORMAT' ) . ')',
            'sql'     => _T( 'EXPORT_SQL' ),
            'csv'     => _T( 'EXPORT_CSV' ),
            //'xml'     => 'XML (eXtended Markup Language)',
          );
          $this->plugin( 'options', $options, $export_format );
        ?>
                        </select>
                      </td>
                      <td valign="middle" align="left" width="100%">
                        <?php
          $params = (!empty( $export_format ) ? null : 'readonly="1" disabled="1"');
          $radios = array(
            '' => _T( 'EVERYTHING' ),
            'opensef_sef_site$' => _T( 'SITES' ),
            'opensef_sef$' => _T( 'FRIENDLY_URLS' ),
            'opensef_config$' => _T( 'CONFIGURATION' ),
          );
          $this->plugin( 'radios', 'export_table', $radios, '', null, '&nbsp;', $params );
                        ?>
                      </td>
                      <td valign="middle" align="left">
                         &nbsp;
                      </td>
                      <td valign="middle" align="left" width="10%">
                        <input type="button" value="<?php echo _T( 'CMD_EXPORT' ) ?>"
          style="width: 85px"
      <?php if (empty( $export_format )): ?>
          onclick="alert('<?php echo _T( 'SELECT_EXPORT_FORMAT' ) ?>');" />
      <?php else:
                        ?>
                         onclick="submitbutton('export');" /><?php endif;
                        ?>
                      </td>
                      <td valign="middle" width="1%">
                         &nbsp;
                      </td>
                    </tr>
                  </table>
                  <input type="hidden" name="option" value="<?php echo $this->option ?>" />
                  <input type="hidden" name="act" value="<?php echo $this->act ?>">
                  <input type="hidden" name="task" value="<?php echo $this->task ?>" />
                  <input type="hidden" name="show" value="<?php echo $this->show ?>" />
                  <input type="hidden" name="boxchecked" value="0" />
                  </form>
                  <?php endif; /* task == 'export' */
                  ?>
                  <?php if ($this->show == 'feedback'):
                  ?>
                  <form action="index2.php?option=com_sef&act=tools&task=feedback" method="post" name="adminForm">
                    <p>
                      <table class="adminlist" width="100%">
                        <tr>
                          <th class="title" colspan="5">
                            <?php echo _T( 'SEND_FEEDBACK' )
                            ?>
                          </th>
                        </tr>
                        <tr>
                          <td valign="middle" align="left">
                            <b><?php echo _T( 'SUBJECT' ) ?>:&nbsp;</b>
                          </td>
                          <td valign="middle" align="left" width="100%">
                            <?php
          $radios = array(
            'feedback' => _T( 'FEEDBACK' ),
            'feature' => _T( 'FEATURE_SUGGESTION' ),
            'bugreport' => _T( 'BUG_REPORT' ),
          );
          $this->plugin( 'radios', 'feedback_type', $radios, 'feedback', null, '&nbsp;' );
                            ?>
                          </td>
                          <td valign="middle" align="left">
                             &nbsp;
                          </td>
                          <td valign="middle" align="left" width="10%">
                            <input type="button" value="<?php echo _T( 'CMD_SEND' ) ?>"
          style="width: 85px"
          onclick="submitbutton('feedback');" />
                          </td>
                          <td valign="middle" width="1%">
                             &nbsp;
                          </td>
                        </tr>
                        <tr>
                          <td valign="top" align="left">
                            <b><?php echo _T( 'REPLY_TO' ) ?>:&nbsp;</b>
                          </td>
                          <td valign="middle" align="left" colspan="2">
                            <?php $this->plugin( 'input', 'text', 'feedback_from',
          $GLOBALS['mosConfig_mailfrom'], 'stylex="width: 80%;"' );
                            ?>
                          </td>
                        </tr>
                        <tr>
                          <td valign="top" align="left">
                            <b><?php echo _T( 'MESSAGE' ) ?>:&nbsp;</b>
                          </td>
                          <td valign="middle" align="left" colspan="4">
                            <?php $this->plugin( 'textarea', 'feedback_body', null, 3, 72,
          'wrap="virtual" style="width: 80%;"' );
                            ?>
                          </td>
                        </tr>
                        <tr>
                          <td valign="top" align="left">
                             &nbsp;
                          </td>
                          <td valign="middle" align="left" colspan="4">
                            <small><?php echo _T( 'FEEDBACK_PRIVACY_NOTICE' ) ?></small>
                          </td>
                        </tr>
                      </table>
                      <input type="hidden" name="option" value="<?php echo $this->option ?>" />
                      <input type="hidden" name="act" value="<?php echo $this->act ?>">
                      <input type="hidden" name="task" value="<?php echo $this->task ?>" />
                      <input type="hidden" name="show" value="<?php echo $this->show ?>" />
                      <input type="hidden" name="boxchecked" value="0" />
                      </form>
                      <?php endif; /*task == 'feedback'*/
                      ?>
                      <?php if ($this->show == 'debug'):
                      ?>
                      <form action="index2.php?option=com_sef&act=tools&task=debug" method="post" name="adminForm">
                        <p>
                          <table class="adminlist" width="100%">
                            <tr>
                              <th class="title" colspan="5">
                                <?php echo _T( 'DEBUG' )
                                ?>
                              </th>
                            </tr>
                            <tr>
                              <td valign="middle" align="left">
                                <b><?php echo _T( 'DIRECTION' ) ?>:&nbsp;</b>
                              </td>
                              <td valign="middle" align="left" width="100%">
                                <?php
          $debug_direction = mosGetParam( $_REQUEST, 'debug_direction', 'incoming' );
          $radios = array(
            'incoming' => _T( 'RESOLVE_INCOMING' ),
            //'outgoing' => _T( 'REWRITE_OUTGOING' ),
          );
          $this->plugin( 'radios', 'debug_direction', $radios, $debug_direction, null, '&nbsp;' );
                                ?>
                                <input type="radio" readonly="1" disabled="1" /><?php echo _T( 'REWRITE_OUTGOING' )
                                ?>
                              </td>
                              <td valign="middle" align="left">
                                 &nbsp;
                              </td>
                              <td valign="middle" align="left" width="10%">
                                <input type="button" value="<?php echo _T( 'CMD_TEST' ) ?>"
          style="width: 85px"
          onclick="submitbutton('debug');" />
                              </td>
                              <td valign="middle" width="1%">
                                 &nbsp;
                              </td>
                            </tr>
                            <tr>
                              <td valign="top" align="left">
                                <b><?php echo _T( 'URL' ) ?>:&nbsp;</b>
                              </td>
                              <td valign="middle" align="left" colspan="2">
                                <?php
          $debug_url = $GLOBALS['mosConfig_live_site'] . '/';
          $debug_url = mosGetParam( $_REQUEST, 'debug_url', $debug_url );
          $this->plugin( 'input', 'text', 'debug_url', $debug_url, 'style="width: 80%;"' );
                                ?>
                              </td>
                            </tr>
                            <?php if (isset( $this->debug_log )):
                            ?>
                            <tr>
                              <td valign="top" align="left">
                                <b><?php echo _T( 'OUTPUT' ) ?>:&nbsp;</b>
                              </td>
                              <td valign="middle" align="left" colspan="4">
                                <?php $debug_log = implode( "\n", $this->debug_log );
                                ?>
                                <?php $this->plugin( 'textarea', 'debug_output', $debug_log, 15, 72,
          'wrap="virtual" style="width: 80%;" readonly="1"' );
                                ?>
                              </td>
                            </tr>
                            <?php endif;
                            ?>
                          </table>
                          <input type="hidden" name="option" value="<?php echo $this->option ?>" />
                          <input type="hidden" name="act" value="<?php echo $this->act ?>">
                          <input type="hidden" name="task" value="<?php echo $this->task ?>" />
                          <input type="hidden" name="show" value="<?php echo $this->show ?>" />
                          <input type="hidden" name="boxchecked" value="0" />
                          </form>
                          <?php endif; /*task == 'debug'*/
                          ?>
                          <?php if (empty($this->show )):
                          ?>
                        <p>
                          <table class="adminlist" width="100%">
                            <tr>
                              <th class="title" colspan="10">
                                <?php echo _T( 'ABOUT_TOOLS' )
                                ?>
                              </th>
                            </tr>
                            <tr>
                              <td width="100%" align="left">
                                <p>
                                  <ul>
                                    <li>
                                      <?php echo _T( 'TOOLS_INFO_TEXT_1' )
                                      ?>
                                    </li>
                                    <li>
                                      <?php echo _T( 'TOOLS_INFO_TEXT_2' )
                                      ?>
                                    </li>
                                    <li>
                                      <?php echo _T( 'TOOLS_INFO_TEXT_3' )
                                      ?>
                                    </li>
                                    <li>
                                      <?php echo _T( 'TOOLS_INFO_TEXT_4' )
                                      ?>
                                    </li>
                                  </ul>
                                <P>

                              </td>
                            </tr>
                          </table>
                          <?php endif; /*task == 'main'*/
                          ?>
                        </td>
                        </tr>
                        </table>
                        </div>
                        </div>
Return current item: Joomla SEF / SEO - extending OpenSEF