<form action="index2.php?option=com_sef&act=seo&task=metatag" method="post" name="adminForm">
<table width="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>
<td class="button" id="toolbar-unpublish">
<a class="toolbar" href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('Please select an item from the list to MetaKeys'); } else {submitbutton('metatag_gen_metakeys');}">
<div class="icon-32-browser" title="Unpublish" type="Standard">
</div><?php echo _T( 'METAKEYS' ) ?>
</a>
</td>
<td class="button" id="toolbar-edit">
<a class="toolbar" href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('Please select an item from the list to MetaDesc'); } else {submitbutton('metatag_gen_metadesc');}">
<div class="icon-32-browser" title="Edit" type="Standard">
</div><?php echo _T( 'METADESC' ) ?>
</a>
</td>
<td class="button" id="toolbar-save">
<a class="toolbar" href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('Please select an item from the list to save'); } else {submitbutton('metatag_save_manager');}">
<div class="icon-32-save" title="Save" type="Standard">
</div><?php echo _T( 'SAVE' ) ?>
</a>
</td>
</tr>
</table>
</div>
<div class="header icon-48-edit">
<?php
if ( $this->all ) {
?>
<?php echo _T( 'SEO_HEADING_TITLE_METATAG' )
?>
<small><small>[ Section: All ]</small></small>
<?php
} else {
?>
<?php echo _T( 'SEO_HEADING_TITLE_METATAG' )
?>
<small><small>[ Section:<?php echo $this->section->title; ?> ]</small></small>
<?php
}
?>
</div>
<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">
<br />
<table width="97%">
<tr>
<td nowrap="nowrap" width="60%">
<?php if ($this->all):
?>
<?php echo $this->lists['sectionid'];
?>
<?php endif;
?>
<?php echo $this->lists['catid'];
?>
<?php echo $this->lists['authorid'];
?>
</td>
<?php if (isset( $this->search ) && $this->act != ''):
?>
<td align="right" width="37%">
<?php echo _T( 'SEARCH' )
?>
<input type="text" name="search" id="search" value="<?php echo $this->search ?>" class="text_area" onchange="document.adminForm.submit();" />
<input type="button" value="<?php echo _T( 'GO' ) ?>" onclick="this.form.submit();" /><input type="button" value="<?php echo _T( 'RESET' ) ?>" onclick="getElementById('search').value='';this.form.submit();" />
</td>
<?php endif;
?>
</tr>
</table>
<table width="80%">
<tr>
<td align='left'>
<?php echo _T( 'METATAG_TITLE_TEXT' ); ?>
</td>
</tr>
</table>
<table class="adminlist2" cellspacing="1">
<thead>
<tr>
<th width="5" class="title">
#
</th>
<th width="5" class="title">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $this->rows ); ?>);" />
</th>
<th class="title">
<?php echo _T('PREVIEW'); ?>
</th>
<th class="title">
<?php echo _T( 'TITLE' ); ?>
</th>
<th width="2%" class="title">
ID
</th>
<?php
if ( $this->all ) {
?>
<th align="left" class="title">
<?php echo _T('SECTION'); ?>
</th>
<?php
}
?>
<th align="left" class="title">
<?php echo _T('CATEGORY'); ?>
</th>
<th align="left" class="title">
<?php echo _T('KEYWORDS'); ?>
<br />
<?php echo _T( 'DESCRIPTION' ); ?>
</th>
</tr>
</thead>
<?php
$k = 0;
$database = $GLOBALS['database'];
$my = $GLOBALS['my'];
$acl = $GLOBALS['acl'];
$nullDate = $database->getNullDate();
for ($i=0, $n=count( $this->rows ); $i < $n; $i++) {
$row = &$this->rows[$i];
$link = 'index2.php?option=com_content§ionid='. $this->redirect .'&task=edit&hidemainmenu=1&id='. $row->id;
$row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->sectionid;
$row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id='. $row->catid;
$now = date( 'Y-m-d H:i:s' );
if ( $now <= $row->publish_up && $row->state == "1" ) {
$img = 'publish_y.png';
$alt = 'Published';
} else if ( ( $now <= $row->publish_down || $row->publish_down == $nullDate ) && $row->state == "1" ) {
$img = 'publish_g.png';
$alt = 'Published';
} else if ( $now > $row->publish_down && $row->state == "1" ) {
$img = 'publish_r.png';
$alt = 'Expired';
} elseif ( $row->state == "0" ) {
$img = "publish_x.png";
$alt = 'Unpublished';
}
$times = '';
if (isset($row->publish_up)) {
if ($row->publish_up == $nullDate) {
$times .= "<tr><td>Start: Always</td></tr>";
} else {
$times .= "<tr><td>Start: $row->publish_up</td></tr>";
}
}
if (isset($row->publish_down)) {
if ($row->publish_down == $nullDate) {
$times .= "<tr><td>Finish: No Expiry</td></tr>";
} else {
$times .= "<tr><td>Finish: $row->publish_down</td></tr>";
}
}
if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) {
if ( $row->created_by_alias ) {
$author = $row->created_by_alias;
} else {
$linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->created_by;
$author = '<a href="'. $linkA .'" title="Edit User">'. $row->author .'</a>';
}
} else {
if ( $row->created_by_alias ) {
$author = $row->created_by_alias;
} else {
$author = $row->author;
}
}
$date = mosFormatDate( $row->created, '%x' );
$access = mosCommonHTML::AccessProcessing( $row, $i );
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $this->pageNav->rowNumber( $i );
?>
</td>
<td align="center">
<input type="hidden" name="c_id[]" value='<?=$row->id?>'/>
<?php echo $checked
?>
</td>
<td >
<a href="#" onclick="window.open('<?=$GLOBALS['mosConfig_live_site']?>/index2.php?option=com_content&task=view&id=<?=$row->id?>&Itemid=99999&pop=1&page=0','win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" alt='View page'>View page</a>
</td>
<td>
<?php
if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {
echo $row->title;
} else {
?>
<a target='' href="<?php echo $link; ?>" title="Edit Content"><?php echo htmlspecialchars($row->title, ENT_QUOTES); ?>
</a>
<?php
}
?>
</td>
<td align="left">
<?php echo $row->id;
?>
</td>
<?php
if ( $this->all ) {
?>
<td align="left">
<a href="<?php echo $row->sect_link; ?>" title="Edit Section"><?php echo $row->section_name; ?>
</a>
</td>
<?php
}
?>
<td align="left">
<a href="<?php echo $row->cat_link; ?>" title="Edit Category"><?php echo $row->name; ?>
</a>
</td>
<td align="left">
<textarea name=metakey[<?=$row->id;?>] cols=40 rows=5><?php echo $row->metakey; ?></textarea>
<br />
<textarea name=metadesc[<?=$row->id?>] cols=40 rows=5><?php echo $row->metadesc; ?></textarea>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
<tfoot>
<td colspan="8">
<?php if (is_object( $this->pageNav )) echo $this->pageNav->getListFooter(); ?>
</td></tfoot>
</table>
<input type="hidden" name="sectionid" value="<?php echo $this->section->id;?>" />
<input type="hidden" name="hidemainmenu" value="0" /><input type="hidden" name="redirect" value="<?php echo $this->redirect;?>" />
<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="boxchecked" value="0" />
</form>
</div>
</div>