Exemplo n.º 1
0
Arquivo: mosvote.php Projeto: cwcw/cms
function botVoting(&$row, &$params, $page = 0)
{
    global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template;
    global $Itemid;
    $id = $row->id;
    $option = 'com_content';
    $task = mosGetParam($_REQUEST, 'task', '');
    $html = '';
    if ($params->get('rating') && !$params->get('popup')) {
        $html .= '<form method="post" action="' . sefRelToAbs('index.php') . '">';
        $img = '';
        // look for images in template if available
        $starImageOn = mosAdminMenus::ImageCheck('rating_star.png', '/images/M_images/');
        $starImageOff = mosAdminMenus::ImageCheck('rating_star_blank.png', '/images/M_images/');
        for ($i = 0; $i < $row->rating; $i++) {
            $img .= $starImageOn;
        }
        for ($i = $row->rating; $i < 5; $i++) {
            $img .= $starImageOff;
        }
        $html .= '<span class="content_rating">';
        $html .= _USER_RATING . ':' . $img . '&nbsp;/&nbsp;';
        $html .= intval($row->rating_count);
        $html .= "</span>\n<br />\n";
        $url = @$_SERVER['REQUEST_URI'];
        $url = str_replace('&', '&amp;', $url);
        if (!$params->get('intro_only') && $task != "blogsection") {
            $html .= '<span class="content_vote">';
            $html .= _VOTE_POOR;
            $html .= '<input type="radio" alt="vote 1 star" name="user_rating" value="1" />';
            $html .= '<input type="radio" alt="vote 2 star" name="user_rating" value="2" />';
            $html .= '<input type="radio" alt="vote 3 star" name="user_rating" value="3" />';
            $html .= '<input type="radio" alt="vote 4 star" name="user_rating" value="4" />';
            $html .= '<input type="radio" alt="vote 5 star" name="user_rating" value="5" checked="checked" />';
            $html .= _VOTE_BEST;
            $html .= '&nbsp;<input class="button" type="submit" name="submit_vote" value="' . _RATE_BUTTON . '" />';
            $html .= '<input type="hidden" name="task" value="vote" />';
            $html .= '<input type="hidden" name="pop" value="0" />';
            $html .= '<input type="hidden" name="option" value="com_content" />';
            $html .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
            $html .= '<input type="hidden" name="cid" value="' . $id . '" />';
            $html .= '<input type="hidden" name="url" value="' . $url . '" />';
            $html .= '</span>';
        }
        $html .= "</form>\n";
    }
    return $html;
}
Exemplo n.º 2
0
    function output_rssfeed($link, $img_default, $img_file, $img_alt, $img_name)
    {
        $img = mosAdminMenus::ImageCheck($img_default, '/images/M_images/', $img_file, '/images/M_images/', $img_alt, $img_name);
        ?>
		<div align="center">
			<a href="<?php 
        echo sefRelToAbs($link);
        ?>
">
				<?php 
        echo $img;
        ?>
</a>
		</div>
		<?php 
    }
Exemplo n.º 3
0
    /**
     * Writes Email icon
     */
    function EmailIcon(&$row, &$params, $hide_js)
    {
        global $mosConfig_live_site, $Itemid, $task;
        if ($params->get('email') && !$params->get('popup') && !$hide_js) {
            $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=400,height=250,directories=no,location=no';
            if ($task == 'view') {
                $_Itemid = '&amp;itemid=' . $Itemid;
            } else {
                $_Itemid = '';
            }
            $link = $mosConfig_live_site . '/index2.php?option=com_content&amp;task=emailform&amp;id=' . $row->id . $_Itemid;
            if ($params->get('icons')) {
                $image = mosAdminMenus::ImageCheck('emailButton.png', '/images/M_images/', NULL, NULL, _CMN_EMAIL, _CMN_EMAIL);
            } else {
                $image = '&nbsp;' . _CMN_EMAIL;
            }
            ?>
			<td align="right" width="100%" class="buttonheading">
				<a href="<?php 
            echo $link;
            ?>
" target="_blank" onclick="window.open('<?php 
            echo $link;
            ?>
','win2','<?php 
            echo $status;
            ?>
'); return false;" title="<?php 
            echo _CMN_EMAIL;
            ?>
">
					<?php 
            echo $image;
            ?>
</a>
			</td>
			<?php 
        }
    }
Exemplo n.º 4
0
    /**
     * Display Table of items
     */
    function showTable(&$params, &$rows, $catid, $tabclass)
    {
        global $mosConfig_live_site;
        // icon in table display
        if ($params->get('weblink_icons') != -1) {
            $img = mosAdminMenus::ImageCheck('weblink.png', '/images/M_images/', $params->get('weblink_icons'), '/images/M_images/', 'Link', 'Link');
        } else {
            $img = NULL;
        }
        ?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<?php 
        if ($params->get('headings')) {
            ?>
			<tr>
				<?php 
            if ($img) {
                ?>
					<td class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
">&nbsp;

					</td>
					<?php 
            }
            ?>
				<td width="90%" height="20" class="sectiontableheader<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo _HEADER_TITLE_WEBLINKS;
            ?>
				</td>
				<?php 
            if ($params->get('hits')) {
                ?>
					<td width="30" height="20" class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
" align="right">
					<?php 
                echo _HEADER_HITS;
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
        }
        $k = 0;
        foreach ($rows as $row) {
            $iparams = new mosParameters($row->params);
            $link = sefRelToAbs('index.php?option=com_weblinks&task=view&catid=' . $catid . '&id=' . $row->id);
            $link = ampReplace($link);
            $menuclass = 'category' . $params->get('pageclass_sfx');
            switch ($iparams->get('target')) {
                // cases are slightly different
                case 1:
                    // open in a new window
                    $txt = '<a href="' . $link . '" target="_blank" class="' . $menuclass . '">' . $row->title . '</a>';
                    break;
                case 2:
                    // open in a popup window
                    $txt = "<a href=\"#\" onclick=\"javascript: window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\" class=\"{$menuclass}\">" . $row->title . "</a>\n";
                    break;
                default:
                    // formerly case 2
                    // open in parent window
                    $txt = '<a href="' . $link . '" class="' . $menuclass . '">' . $row->title . '</a>';
                    break;
            }
            ?>
			<tr class="<?php 
            echo $tabclass[$k];
            ?>
">
				<?php 
            if ($img) {
                ?>
					<td width="100" height="20" align="center">
					&nbsp;&nbsp;<?php 
                echo $img;
                ?>
&nbsp;&nbsp;
					</td>
					<?php 
            }
            ?>
				<td height="20">
				<?php 
            echo $txt;
            ?>
				<?php 
            if ($params->get('item_description')) {
                ?>
					<br />
					<?php 
                echo $row->description;
                ?>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($params->get('hits')) {
                ?>
					<td align="center">
					<?php 
                echo $row->hits;
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>
		<?php 
    }
Exemplo n.º 5
0
    public static function display(&$rows, $params, $pageNav, $limitstart, $limit, $total, $totalRows, $searchword)
    {
        global $mosConfig_hideCreateDate;
        global $mosConfig_live_site, $option, $Itemid;
        $c = count($rows);
        $image = mosAdminMenus::ImageCheck('google.png', '/images/M_images/', NULL, NULL, 'Google', 'Google', 1);
        $searchword = urldecode($searchword);
        $searchword = htmlspecialchars($searchword, ENT_QUOTES);
        // number of matches found
        echo '<br/>';
        eval('echo "' . _CONCLUSION . '";');
        ?>
				<a href="http://www.google.com/search?q=<?php 
        echo $searchword;
        ?>
" target="_blank">
					<?php 
        echo $image;
        ?>
</a>
			</td>
		</tr>
		</table>

		<br />

		<div align="center">
			<?php 
        echo $pageNav->writePagesCounter();
        $ordering = strtolower(strval(mosGetParam($_REQUEST, 'ordering', 'newest')));
        $searchphrase = strtolower(strval(mosGetParam($_REQUEST, 'searchphrase', 'any')));
        $searchphrase = htmlspecialchars($searchphrase);
        $cleanWord = htmlspecialchars($searchword);
        $link = $mosConfig_live_site . "/index.php?option={$option}&amp;Itemid={$Itemid}&amp;searchword={$cleanWord}&amp;searchphrase={$searchphrase}&amp;ordering={$ordering}";
        echo $pageNav->getLimitBox($link);
        ?>
		</div>
		<table class="contentpaneopen<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
		<tr class="<?php 
        echo $params->get('pageclass_sfx');
        ?>
">
			<td>
				<?php 
        $z = $limitstart + 1;
        $end = $limit + $z;
        if ($end > $total) {
            $end = $total + 1;
        }
        for ($i = $z; $i < $end; $i++) {
            $row = $rows[$i - 1];
            if ($row->created) {
                $created = mosFormatDate($row->created, _DATE_FORMAT_LC);
            } else {
                $created = '';
            }
            ?>
					<fieldset>
						<div>
							<span class="small<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
								<?php 
            echo $i . '. ';
            ?>
							</span>
							<?php 
            if ($row->href) {
                $row->href = ampReplace($row->href);
                if ($row->browsernav == 1) {
                    ?>
									<a href="<?php 
                    echo sefRelToAbs($row->href);
                    ?>
" target="_blank">
									<?php 
                } else {
                    ?>
									<a href="<?php 
                    echo sefRelToAbs($row->href);
                    ?>
">
									<?php 
                }
            }
            echo $row->title;
            if ($row->href) {
                ?>
								</a>
								<?php 
            }
            if ($row->section) {
                ?>
								<br/>
								<span class="small<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
									(<?php 
                echo $row->section;
                ?>
)
								</span>
								<?php 
            }
            ?>
						</div>

						<div>
							<?php 
            echo ampReplace($row->text);
            ?>
						</div>

						<?php 
            if (!$mosConfig_hideCreateDate) {
                ?>
							<div class="small<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
								<?php 
                echo $created;
                ?>
							</div>
							<?php 
            }
            ?>
					</fieldset>
					<br/>
					<?php 
        }
        ?>
			</td>
		</tr>
		<?php 
    }
Exemplo n.º 6
0
    /**
     * Display Table of items
     */
    public static function showTable(&$params, &$rows, $catid, $tabclass)
    {
        global $mosConfig_live_site, $Itemid;
        // icon in table display
        $img = mosAdminMenus::ImageCheck('con_info.png', '/images/M_images/', $params->get('icon'));
        ?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
		<?php 
        if ($params->get('headings')) {
            ?>
			<tr>
				<?php 
            if ($params->get('name')) {
                ?>
					<td height="20" class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
					<?php 
                echo _FEED_NAME;
                ?>
					</td>
					<?php 
            }
            ?>
				<?php 
            if ($params->get('articles')) {
                ?>
					<td height="20" class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
" align="center">
					<?php 
                echo _FEED_ARTICLES;
                ?>
					</td>
					<?php 
            }
            ?>
				<?php 
            if ($params->get('link')) {
                ?>
					<td height="20" class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
					<?php 
                echo _FEED_LINK;
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
        }
        $k = 0;
        foreach ($rows as $row) {
            $link = 'index.php?option=com_newsfeeds&amp;task=view&amp;feedid=' . $row->id . '&amp;Itemid=' . $Itemid;
            ?>
			<tr>
				<?php 
            if ($params->get('name')) {
                ?>
					<td height="20" class="<?php 
                echo $tabclass[$k];
                ?>
">
					<a href="<?php 
                echo sefRelToAbs($link);
                ?>
" class="category<?php 
                echo $params->get('pageclass_sfx');
                ?>
">
					<?php 
                echo $row->name;
                ?>
					</a>
					</td>
					<?php 
            }
            ?>
				<?php 
            if ($params->get('articles')) {
                ?>
					<td width="20%" class="<?php 
                echo $tabclass[$k];
                ?>
" align="center">
					<?php 
                echo $row->numarticles;
                ?>
					</td>
					<?php 
            }
            ?>
				<?php 
            if ($params->get('link')) {
                ?>
					<td width="50%" class="<?php 
                echo $tabclass[$k];
                ?>
">
					<?php 
                echo ampReplace($row->link);
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>
		<?php 
    }
Exemplo n.º 7
0
    /**
     * Writes a media_manager button
     * @param string The sub-drectory to upload the media to
     */
    function media_manager($directory = '')
    {
        $image = mosAdminMenus::ImageCheck('upload_f2.png', '/images/', NULL, NULL, 'Upload Image', 'uploadPic', 1);
        ?>
		<td>
			<a class="toolbar" href="#" onclick="popupWindow('popups/uploadimage.php?directory=<?php 
        echo $directory;
        ?>
','win1',250,100,'no');">
				<?php 
        echo $image;
        ?>
</a>
		</td>
		<?php 
    }
Exemplo n.º 8
0
    echo $mosConfig_live_site;
    ?>
/index2.php?option=com_rss&amp;feed=ATOM0.3&amp;no_html=1">
	<?php 
    echo $img;
    ?>
	</a>
	</div>
	<?php 
}
?>

<?php 
// opml link
if ($opml) {
    $img = mosAdminMenus::ImageCheck('opml.png', '/images/M_images/', $opml_image, '/images/M_images/', 'OPML');
    ?>
	<div align="center">
	<a href="<?php 
    echo $mosConfig_live_site;
    ?>
/index2.php?option=com_rss&amp;feed=OPML&amp;no_html=1">
	<?php 
    echo $img;
    ?>
	</a>
	</div>
	<?php 
}
?>
</div>
 function getDisplayTab($tab, $user, $ui)
 {
     global $_CB_framework, $_CB_database, $mainframe;
     $jVer = checkJversion();
     $showHits = $_CB_framework->getCfg('hits');
     $showRating = $_CB_framework->getCfg('vote');
     $return = '';
     if ($jVer >= 2) {
         $curTz = date_default_timezone_get();
         date_default_timezone_set('UTC');
         $now = date('Y-m-d H:i:s');
         date_default_timezone_set($curTz);
     } else {
         $now = date('Y-m-d H:i:s', $_CB_framework->now() + $_CB_framework->getCfg('offset') * 60 * 60);
     }
     $query = "SELECT a.id, a.catid, a.title, a.hits,a.created, ROUND( r.rating_sum / r.rating_count ) AS rating,r.rating_count";
     if ($jVer >= 1) {
         $query .= ', CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,' . ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug';
     }
     $query .= "\n FROM #__content AS a" . "\n LEFT JOIN #__content_rating AS r ON r.content_id=a.id";
     if ($jVer < 2) {
         $query .= "\n INNER JOIN #__sections AS s ON s.id=a.sectionid AND s.title != 'Mamblog'";
     }
     if ($jVer >= 1) {
         $query .= "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid";
     }
     $query .= "\n WHERE a.created_by=" . (int) $user->id . "" . "\n AND a.state = 1 " . "\n AND (publish_up = '0000-00-00 00:00:00' OR publish_up <= '{$now}')" . "\n AND (publish_down = '0000-00-00 00:00:00' OR publish_down >= '{$now}')" . "\n AND a.access IN (" . implode(',', CBuser::getMyInstance()->getAuthorisedViewLevelsIds($jVer >= 2 ? false : true)) . ')' . "\n ORDER BY a.created DESC";
     $_CB_database->setQuery($query);
     //print $_CB_database->getQuery();
     $items = $_CB_database->loadObjectList();
     if (!count($items) > 0) {
         $return .= "<br /><br /><div class=\"cbNoArticles\" style=\"width:95%;\">";
         $return .= _UE_NOARTICLES;
         $return .= "</div>";
         return $return;
     }
     $return .= $this->_writeTabDescription($tab, $user);
     $return .= "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"95%\">";
     $return .= "<tr class=\"sectiontableheader\">";
     $return .= "<th>" . _UE_ARTICLEDATE . "</th>";
     $return .= "<th>" . _UE_ARTICLETITLE . "</th>";
     if ($showHits) {
         $return .= "<th>" . _UE_ARTICLEHITS . "</th>";
     }
     if ($showRating) {
         $return .= "<th>" . _UE_ARTICLERATING . "</th>";
     }
     $return .= "</tr>";
     $i = 1;
     $hits = "";
     $rating = "";
     foreach ($items as $item) {
         if (isset($mainframe) && is_callable(array($mainframe, "getItemid"))) {
             $itemid = $mainframe->getItemid($item->id);
         } elseif (is_callable("JApplicationHelper::getItemid")) {
             $itemid = JApplicationHelper::getItemid($item->id);
         } else {
             $itemid = null;
         }
         $itemidtxt = $itemid ? "&amp;Itemid=" . (int) $itemid : "";
         $i = $i == 1 ? 2 : 1;
         if (is_callable(array("mosAdminMenus", "ImageCheck"))) {
             $starImageOn = mosAdminMenus::ImageCheck('rating_star.png', '/images/M_images/');
             $starImageOff = mosAdminMenus::ImageCheck('rating_star_blank.png', '/images/M_images/');
         } else {
             // Mambo 4.5.0:
             $starImageOn = '<img src="' . $_CB_framework->getCfg('live_site') . '/images/M_images/rating_star.png" alt="" align="middle" style="border:0px;" />';
             $starImageOff = '<img src="' . $_CB_framework->getCfg('live_site') . '/images/M_images/rating_star_blank.png" alt="" align="middle" style="border:0px;" />';
         }
         $img = "";
         if ($showRating) {
             for ($j = 0; $j < $item->rating; $j++) {
                 $img .= $starImageOn;
             }
             for ($j = $item->rating; $j < 5; $j++) {
                 $img .= $starImageOff;
             }
             $rating = '<td><span class="content_rating">';
             $rating .= $img . '&nbsp;/&nbsp;';
             $rating .= intval($item->rating_count);
             $rating .= "</span></td>\n";
         }
         if ($showHits) {
             $hits = "<td>" . $item->hits . "</td>";
         }
         if ($jVer == 2) {
             require_once $_CB_framework->getCfg('absolute_path') . '/components/com_content/helpers/route.php';
             $url = ContentHelperRoute::getArticleRoute($item->id, $item->catid);
             if (!stristr($url, 'Itemid')) {
                 $url = $_CB_framework->getCfg('live_site') . '/' . $url;
             } else {
                 $url = cbSef($url);
             }
         } elseif ($jVer == 1) {
             $url = cbSef('index.php?option=com_content&amp;view=article&amp;id=' . $item->slug . '&amp;catid=' . $item->catslug . $itemidtxt);
         } else {
             $url = cbSef('index.php?option=com_content&amp;task=view&amp;id=' . (int) $item->id . $itemidtxt);
         }
         $return .= "<tr class=\"sectiontableentry{$i}\"><td>" . cbFormatDate($item->created) . "</td><td><a href=\"" . $url . "\">" . $item->title . "</a></td>" . $hits . $rating . "</tr>\n";
     }
     $return .= "</table>";
     return $return;
 }
Exemplo n.º 10
0
    function songHeader($showChords = "yes", $params = NULL, $song = null, $editSongLink = FALSE)
    {
        global $mainframe, $my, $database, $acl;
        global $mosConfig_absolute_path, $mosConfig_sitename, $mosConfig_live_site, $task;
        global $Itemid, $song_id, $hide_js;
        if ($params->get('icons')) {
            $printImage = mosAdminMenus::ImageCheck('printButton.png', '/images/M_images/', NULL, NULL, _CMN_PRINT);
            $editImage = mosAdminMenus::ImageCheck('edit.png', '/images/M_images/', NULL, NULL, _E_EDIT);
        } else {
            $printImage = _ICON_SEP . '&nbsp;' . _CMN_PRINT . '&nbsp;' . _ICON_SEP;
            $editImage = _ICON_SEP . '&nbsp;' . _E_EDIT . '&nbsp;' . _ICON_SEP;
        }
        ?>

		<link rel="stylesheet" type="text/css" href="<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_chordbase/css/style.css" />
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td width="100%" style="text-align:right" valign="top">
<?php 
        /*					[<a href="index.php?option=com_chordbase&Itemid=<?php echo $Itemid ?>&task=songlist"><?php echo _SONGLIST ?></a>]<br />
        					[<a href="index.php?option=com_chordbase&Itemid=<?php echo $Itemid ?>&task=viewSong&song_id=<?php echo $song_id ?>&showChords=<?php echo $showChords == "no"?"yes":"no" ?>"><?php echo ($showChords == "no"?_SHOW:_HIDE) . " " . _CHORDS ?></a>]<br />
        */
        ?>

					<a href="<?php 
        echo $mosConfig_live_site;
        ?>
/index2.php?option=com_chordbase&Itemid=<?php 
        echo $Itemid;
        ?>
&task=viewSong&showChords=<?php 
        echo $showChords == "no" ? "no" : "yes";
        ?>
&song_id=<?php 
        echo $song_id;
        ?>
&pop=1" target="_blank"><?php 
        echo $printImage;
        ?>
</a>
				<?php 
        if ($editSongLink) {
            ?>

					<a href="index.php?option=com_chordbase&Itemid=<?php 
            echo $Itemid;
            ?>
&task=editSong&song_id=<?php 
            echo $song_id;
            ?>
"><?php 
            echo $editImage;
            ?>
</a>
				<?php 
        }
        ?>

				</td>
			</tr>
		<?php 
        /*			<tr>
        				<td align="center">
        					<center>
        						<u><?php echo _TRANSPOSE ?></u><br />
        						<?php $song->transposeLinks() ?>
        					</center>
        				</td>
        			</tr>
        		</table>*/
    }
Exemplo n.º 11
0
    function form($action, $categories = NULL, $writers = NULL, $submitted_by = 0, $showSubmit = FALSE)
    {
        global $mosConfig_live_site;
        $key_selected[$this->song_key] = " selected";
        $infoImage = mosAdminMenus::ImageCheck('con_info.png', '/images/M_images/', NULL, NULL, "");
        echo "<script language='javascript1.2' src='{$mosConfig_live_site}/components/com_chordbase/js/chord.class.js'></script>";
        ?>

		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		<script language="Javascript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js"></script>
		<form name="adminForm" method="post" action="<?php 
        echo $action;
        ?>
" id="adminForm">
			<!-- BEGIN META -->
			<center>
			<table cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td colspan="2">
						<b><?php 
        echo _TITLE;
        ?>
:</b>
						<input id="song_title" name="title" type="text" size="25" value="<?php 
        echo $this->title;
        ?>
" />
						<b><?php 
        echo _KEY;
        ?>
:</b>
						<select name="song_key">
							<option value="C"<?php 
        echo $key_selected["C"];
        ?>
>C</option>
							<option value="G"<?php 
        echo $key_selected["G"];
        ?>
>G</option>
							<option value="D"<?php 
        echo $key_selected["D"];
        ?>
>D</option>
							<option value="A"<?php 
        echo $key_selected["A"];
        ?>
>A</option>
							<option value="E"<?php 
        echo $key_selected["E"];
        ?>
>E</option>
							<option value="B"<?php 
        echo $key_selected["B"];
        ?>
>B</option>
							<option value="F#"<?php 
        echo $key_selected["Fs"];
        ?>
>F#</option>
							<option value="C#"<?php 
        echo $key_selected["Cs"];
        ?>
>C#</option>

							<option value="F"<?php 
        echo $key_selected["F"];
        ?>
>F</option>
							<option value="Bb"<?php 
        echo $key_selected["Bb"];
        ?>
>Bb</option>
							<option value="Eb"<?php 
        echo $key_selected["Eb"];
        ?>
>Eb</option>
							<option value="Ab"<?php 
        echo $key_selected["Ab"];
        ?>
>Ab</option>
							<option value="Db"<?php 
        echo $key_selected["Db"];
        ?>
>Db</option>
							<option value="Gb"<?php 
        echo $key_selected["Gb"];
        ?>
>Gb</option>

							<option value="Am"<?php 
        echo $key_selected["Am"];
        ?>
>Am</option>
							<option value="Em"<?php 
        echo $key_selected["Em"];
        ?>
>Em</option>
							<option value="Bm"<?php 
        echo $key_selected["Bm"];
        ?>
>Bm</option>
							<option value="F#m"<?php 
        echo $key_selected["Fam"];
        ?>
>F#m</option>
							<option value="C#m"<?php 
        echo $key_selected["Cam"];
        ?>
>C#m</option>
							<option value="G#m"<?php 
        echo $key_selected["Gam"];
        ?>
>G#m</option>
							<option value="D#m"<?php 
        echo $key_selected["Dam"];
        ?>
>D#m</option>
							<option value="A#m"<?php 
        echo $key_selected["Aam"];
        ?>
>A#m</option>

							<option value="Dm"<?php 
        echo $key_selected["Dm"];
        ?>
>Dm</option>
							<option value="Gm"<?php 
        echo $key_selected["Gm"];
        ?>
>Gm</option>
							<option value="Cm"<?php 
        echo $key_selected["Cm"];
        ?>
>Cm</option>
							<option value="Fm"<?php 
        echo $key_selected["Fm"];
        ?>
>Fm</option>
							<option value="Bbm"<?php 
        echo $key_selected["Bbm"];
        ?>
>Bbm</option>
							<option value="Ebm"<?php 
        echo $key_selected["Ebm"];
        ?>
>Ebm</option>
							<option value="Abm"<?php 
        echo $key_selected["Abm"];
        ?>
>Abm</option>
						</select>
						<b><?php 
        echo _BPM;
        ?>
:</b>
						<input name="bpm" type="text" size="3" value="<?php 
        echo $this->bpm;
        ?>
" />
						<b><?php 
        echo _SIG;
        ?>
:</b>
						<input name="signature" type="text" size="3" value="<?php 
        echo $this->signature;
        ?>
" />
					</td>
				</tr>
				</tr>
			</table>
		<!-- END META -->

		<!-- BEGIN SONG -->
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<td valign="top">
						<br><b><?php 
        echo _SONG_BODY;
        ?>
:</b>
						<script>
							function enclose(begin, end)
							{
								document.all.song.focus();
								range = document.selection.createRange();
								if (range.parentElement() == document.all.song)
								{
									range.text = begin+range.text+end;
								}
							}
						</script>
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_CHORD;
        ?>
" class="button" onclick="enclose('[',']')">
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_SOC;
        ?>
" class="button" onclick="enclose('{soc}','{eoc}')">
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_SOT;
        ?>
" class="button" onclick="enclose('{sot}','{eot}')">
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_C;
        ?>
" class="button" onclick="enclose('{c:','}')">
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_GC;
        ?>
" class="button" onclick="enclose('{gc:','}')">
						<input type="button" value="<?php 
        echo _CHORDPRO_CM_COMENT;
        ?>
" class="button" onclick="enclose('#','')">
						<span onMouseOver="return overlib('<?php 
        echo _CHORDPRO_INSTRUCTIONS;
        ?>
', CAPTION, '<?php 
        echo _CHORDPRO_INSTRUCTIONS_TITLE;
        ?>
', WIDTH, 300, BELOW, RIGHT);" onMouseOut="return nd();">
							<?php 
        echo $infoImage;
        ?>
						</span>
  						<textarea name="song" id="song" rows="20" style="width: 100%"><?php 
        echo $this->song;
        ?>
</textarea>
						<div align="center"><input type="button" value="<?php 
        echo _TEXT_CONV;
        ?>
" class="button" onclick="song.value = textToChordPro(song.value)" /></div>
					</td>
				</tr>
			</table>
			<!-- END SONG -->

			<!-- BEGIN AUTHORS & COPYRIGHTS -->
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<td><b><?php 
        echo _WRITER;
        ?>
:</b></td>
					<td><b><?php 
        echo _CATEGORY;
        ?>
:</b></td>
				</tr>
				<tr>
					<td valign="top">
						&nbsp;&nbsp;<select name="writer">
										<option value="-1"><?php 
        echo _NEW_WRITER;
        ?>
</option>
					<?php 
        foreach ($writers as $writer) {
            if ($writer->writer_id == $this->writer) {
                echo '<option value="' . $writer->writer_id . '" selected>' . $writer->name . '</option>';
            } else {
                echo '<option value="' . $writer->writer_id . '">' . $writer->name . '</option>';
            }
        }
        ?>
						</select>
					</td>
					<td valign="top">
						&nbsp;&nbsp;<select name="category">
										<option value="-1"><?php 
        echo _NEW_CATEGORY;
        ?>
</option>
					<?php 
        foreach ($categories as $category) {
            if ($category->category_id == $this->category && $this->category != "") {
                echo '<option value="' . $category->category_id . '" selected>' . $category->title . '</option>';
            } else {
                echo '<option value="' . $category->category_id . '">' . $category->title . '</option>';
            }
        }
        ?>
						</select>
					</td>
				</tr>
				<tr>
					<td>&nbsp;&nbsp;<?php 
        echo _NEW;
        ?>
: <input type="text" name="new_writer" size="25" /></td>
					<td>&nbsp;&nbsp;<?php 
        echo _NEW;
        ?>
: <input type="text" name="new_category" size="25" /></td>
				</tr>
			<!-- END AUTHORS & COPYRIGHTS -->

			<!-- BEGIN NOTES & KEYWORDS -->
				<tr>
					<td><b><?php 
        echo _NOTES;
        ?>
:</b></td>
					<td><b><?php 
        echo _KEYWORDS;
        ?>
:</b> <?php 
        echo _KEYWORDS_INSTRUCTIONS;
        ?>
</td>
				</tr>
				<tr>
					<td><textarea name="notes" rows="5" cols="25"><?php 
        echo $this->notes;
        ?>
</textarea></td>
					<td><textarea name="keywords" rows="5" cols="25"><?php 
        echo $this->keywords;
        ?>
</textarea></td>
				</tr>
			<!-- END NOTES & KEYWORDS -->

			<!-- BEGIN CHORDS & CATEGORY -->
				<tr>
					<td><b><?php 
        echo _CHORDS;
        ?>
:</b> <?php 
        echo _CHORDS_INSTRUCTIONS;
        ?>
</td>
					<td><b><?php 
        echo _COPYRIGHTS;
        ?>
:</b></td>
				</tr>
				<tr>
					<td>
						<textarea name="chords" rows="5" cols="20"><?php 
        echo $this->chords;
        ?>
</textarea>
					</td>
					<td>
						<textarea name="copyrights" rows="2" cols="25"><?php 
        echo $this->copyrights;
        ?>
</textarea><br />
						<!-- table>
							<tr>
								<td><b>Year:</b></td>
								<td><b>CCLI:</b></td>
							</tr>
							<tr>
								<td><input name="year" type="text" size="4" value="<?php 
        echo $this->year;
        ?>
" /></td>
								<td><input type="text" name="ccli" value="<?php 
        echo $this->ccli;
        ?>
" /></td>
							</tr>
						</table -->
					</td>
				</tr>
			<?php 
        if ($showSubmit) {
            ?>
				<tr>
					<td colspan="2" align="right"><input type="submit" name="submit" class="button" value="<?php 
            echo _SAVE_SONG;
            ?>
" /></td>
				</tr>
			<?php 
        }
        ?>
			<!-- END CHORDS & CATEGORY -->
			</table>
			</center>
			<input type="hidden" name="option" value="com_chordbase" />
			<input type="hidden" name="submitted_by" value="<?php 
        echo $submitted_by;
        ?>
" />
			<input type="hidden" name="add_time" value="<?php 
        echo $this->add_time;
        ?>
" />
			<input type="hidden" name="task" value="saveSong" />
			<input type="hidden" name="song_id" value="<?php 
        echo $this->song_id;
        ?>
" />
		</form>

		<?php 
    }
Exemplo n.º 12
0
function contactpage($contact_id)
{
    global $mainframe, $database, $my, $Itemid;
    $query = "SELECT a.id AS value, CONCAT_WS( ' - ', a.name, a.con_position ) AS text, a.catid, cc.access AS cat_access" . "\n FROM #__contact_details AS a" . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid" . "\n WHERE a.published = 1" . "\n AND cc.published = 1" . "\n AND a.access <= " . (int) $my->gid . "\n ORDER BY a.default_con DESC, a.ordering ASC";
    $database->setQuery($query);
    $checks = $database->loadObjectList();
    $count = count($checks);
    if ($count) {
        if ($contact_id < 1) {
            $contact_id = $checks[0]->value;
        }
        $query = "SELECT a.*, cc.access AS cat_access" . "\n FROM #__contact_details AS a" . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid" . "\n WHERE a.published = 1" . "\n AND a.id = " . (int) $contact_id . "\n AND a.access <= " . (int) $my->gid;
        $database->SetQuery($query);
        $contacts = $database->LoadObjectList();
        if (!$contacts) {
            echo _NOT_AUTH;
            return;
        }
        $contact = $contacts[0];
        /*
         * check whether category access level allows access
         */
        if ($contact->cat_access > $my->gid) {
            mosNotAuth();
            return;
        }
        $list = array();
        foreach ($checks as $check) {
            if ($check->catid == $contact->catid) {
                $list[] = $check;
            }
        }
        // creates dropdown select list
        $contact->select = mosHTML::selectList($list, 'contact_id', 'class="inputbox" onchange="ViewCrossReference(this);"', 'value', 'text', $contact_id);
        // Adds parameter handling
        $params = new mosParameters($contact->params);
        $params->set('page_title', 0);
        $params->def('pageclass_sfx', '');
        $params->def('back_button', $mainframe->getCfg('back_button'));
        $params->def('print', !$mainframe->getCfg('hidePrint'));
        $params->def('name', 1);
        $params->def('email', 0);
        $params->def('street_address', 1);
        $params->def('suburb', 1);
        $params->def('state', 1);
        $params->def('country', 1);
        $params->def('postcode', 1);
        $params->def('telephone', 1);
        $params->def('fax', 1);
        $params->def('misc', 1);
        $params->def('image', 1);
        $params->def('email_description', 1);
        $params->def('email_description_text', _EMAIL_DESCRIPTION);
        $params->def('email_form', 1);
        $params->def('email_copy', 0);
        // global pront|pdf|email
        $params->def('icons', $mainframe->getCfg('icons'));
        // contact only icons
        $params->def('contact_icons', 0);
        $params->def('icon_address', '');
        $params->def('icon_email', '');
        $params->def('icon_telephone', '');
        $params->def('icon_fax', '');
        $params->def('icon_misc', '');
        $params->def('drop_down', 0);
        $params->def('vcard', 0);
        if ($contact->email_to && $params->get('email')) {
            // email cloacking
            $contact->email = mosHTML::emailCloaking($contact->email_to);
        }
        // loads current template for the pop-up window
        $pop = intval(mosGetParam($_REQUEST, 'pop', 0));
        if ($pop) {
            $params->set('popup', 1);
            $params->set('back_button', 0);
        }
        if ($params->get('email_description')) {
            $params->set('email_description', $params->get('email_description_text'));
        } else {
            $params->set('email_description', '');
        }
        // needed to control the display of the Address marker
        $temp = $params->get('street_address') . $params->get('suburb') . $params->get('state') . $params->get('country') . $params->get('postcode');
        $params->set('address_check', $temp);
        // determines whether to use Text, Images or nothing to highlight the different info groups
        switch ($params->get('contact_icons')) {
            case 1:
                // text
                $params->set('marker_address', _CONTACT_ADDRESS);
                $params->set('marker_email', _CONTACT_EMAIL);
                $params->set('marker_telephone', _CONTACT_TELEPHONE);
                $params->set('marker_fax', _CONTACT_FAX);
                $params->set('marker_misc', _CONTACT_MISC);
                $params->set('column_width', '100');
                break;
            case 2:
                // none
                $params->set('marker_address', '');
                $params->set('marker_email', '');
                $params->set('marker_telephone', '');
                $params->set('marker_fax', '');
                $params->set('marker_misc', '');
                $params->set('column_width', '0');
                break;
            default:
                // icons
                $image1 = mosAdminMenus::ImageCheck('con_address.png', '/images/M_images/', $params->get('icon_address'), '/images/M_images/', _CONTACT_ADDRESS, _CONTACT_ADDRESS);
                $image2 = mosAdminMenus::ImageCheck('emailButton.png', '/images/M_images/', $params->get('icon_email'), '/images/M_images/', _CONTACT_EMAIL, _CONTACT_EMAIL);
                $image3 = mosAdminMenus::ImageCheck('con_tel.png', '/images/M_images/', $params->get('icon_telephone'), '/images/M_images/', _CONTACT_TELEPHONE, _CONTACT_TELEPHONE);
                $image4 = mosAdminMenus::ImageCheck('con_fax.png', '/images/M_images/', $params->get('icon_fax'), '/images/M_images/', _CONTACT_FAX, _CONTACT_FAX);
                $image5 = mosAdminMenus::ImageCheck('con_info.png', '/images/M_images/', $params->get('icon_misc'), '/images/M_images/', _CONTACT_MISC, _CONTACT_MISC);
                $params->set('marker_address', $image1);
                $params->set('marker_email', $image2);
                $params->set('marker_telephone', $image3);
                $params->set('marker_fax', $image4);
                $params->set('marker_misc', $image5);
                $params->set('column_width', '40');
                break;
        }
        // params from menu item
        $menu = $mainframe->get('menu');
        $menu_params = new mosParameters($menu->params);
        $menu_params->def('page_title', 1);
        $menu_params->def('header', $menu->name);
        $menu_params->def('pageclass_sfx', '');
        HTML_contact::viewcontact($contact, $params, $count, $list, $menu_params);
    } else {
        $params = new mosParameters('');
        $params->def('back_button', $mainframe->getCfg('back_button'));
        HTML_contact::nocontact($params);
    }
}
Exemplo n.º 13
0
    /**
     * Display Table of items
     */
    function showTable(&$params, &$rows, $catid, $tabclass)
    {
        global $mosConfig_live_site;
        // icon in table display
        $img = mosAdminMenus::ImageCheck('weblink.png', '/images/M_images/', $params->get('weblink_icons'));
        ?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<?php 
        if ($params->get('headings')) {
            ?>
			<tr>
				<?php 
            if ($img) {
                ?>
					<td class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
">&nbsp;
													
					</td>
					<?php 
            }
            ?>
				<td width="90%" height="20" class="sectiontableheader<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo _HEADER_TITLE_WEBLINKS;
            ?>
				</td>
				<?php 
            if ($params->get('hits')) {
                ?>
					<td width="30px" height="20" class="sectiontableheader<?php 
                echo $params->get('pageclass_sfx');
                ?>
" align="right">
					<?php 
                echo _HEADER_HITS;
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
        }
        $k = 0;
        foreach ($rows as $row) {
            $link = 'index.php?option=com_weblinks&amp;task=view&amp;catid=' . $catid . '&amp;id=' . $row->id;
            ?>
			<tr class="<?php 
            echo $tabclass[$k];
            ?>
">
				<?php 
            if ($img) {
                ?>
					<td width="100px" height="20" align="center"> 
					&nbsp;&nbsp;<?php 
                echo $img;
                ?>
&nbsp;&nbsp;
					</td>
					<?php 
            }
            ?>
				<td height="20"> 
				<a href="<?php 
            echo sefRelToAbs($link);
            ?>
" target="_blank" class="category<?php 
            echo $params->get('pageclass_sfx');
            ?>
">
				<?php 
            echo $row->title;
            ?>
 
				</a> 
				<?php 
            if ($params->get('item_description')) {
                ?>
					<br /> 
					<?php 
                echo $row->description;
                ?>
					<?php 
            }
            ?>
				</td>
				<?php 
            if ($params->get('hits')) {
                ?>
					<td align="center">
					<?php 
                echo $row->hits;
                ?>
					</td>
					<?php 
            }
            ?>
			</tr>
			<?php 
            $k = 1 - $k;
        }
        ?>
		</table>
		<?php 
    }
Exemplo n.º 14
0
 /**
  * Checks to see if an image exists in the current templates image directory
  * if it does it loads this image.  Otherwise the default image is loaded.
  * Also can be used in conjunction with the menulist param to create the chosen image
  * load the default or use no image
  */
 function ImageCheckAdmin($file, $directory = '/administrator/images/', $param = NULL, $param_directory = '/administrator/images/', $alt = NULL, $name = NULL, $type = 1, $align = 'middle', $title = NULL)
 {
     /*
     		global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe;
     
     		$cur_template = $mainframe->getTemplate();
     
     		$name 	= ( $name 	? ' name="'. $name .'"' 	: '' );
     		$title 	= ( $title 	? ' title="'. $title .'"' 	: '' );
     		$alt 	= ( $alt 	? ' alt="'. $alt .'"' 		: ' alt=""' );
     		$align 	= ( $align 	? ' align="'. $align .'"' 	: '' );
     
     		$path 	= '/administrator/templates/'. $cur_template .'/images/';
     
     		if ( $param ) {
     			$image = $mosConfig_live_site. $param_directory . $param;
     			if ( $type ) {
     				$image = '<img src="'. $image .'" '. $alt . $name . $align .' border="0" />';
     			}
     		} else if ( $param == -1 ) {
     			$image = '';
     		} else {
     			if ( file_exists( $mosConfig_absolute_path . $path . $file ) ) {
     				$image = $mosConfig_live_site . $path . $file;
     			} else {
     				// outputs only path to image
     				$image = $mosConfig_live_site. $directory . $file;
     			}
     
     			// outputs actual html <img> tag
     			if ( $type ) {
     				$image = '<img src="'. $image .'" '. $alt . $name . $title . $align .' border="0" />';
     			}
     		}
     */
     // functionality consolidated into ImageCheck
     $image = mosAdminMenus::ImageCheck($file, $directory, $param, $param_directory, $alt, $name, $type, $align, $title, $admin = 1);
     return $image;
 }
Exemplo n.º 15
0
    /**
     * Writes a media_manager button
     * @param string The sub-drectory to upload the media to
     */
    function media_manager($directory = '')
    {
        $image = mosAdminMenus::ImageCheck('upload.png', '/images/', NULL, NULL, 'Upload Image', 'uploadPic');
        $image2 = mosAdminMenus::ImageCheck('upload_f2.png', '/images/', NULL, NULL, 'Upload Image', 'uploadPic', 0);
        ?>
		<td width="25" align="center">
		<a href="#" onclick="popupWindow('popups/uploadimage.php?directory=<?php 
        echo $directory;
        ?>
','win1',250,100,'no');" onmouseout="MM_swapImgRestore();"  onmouseover="MM_swapImage('uploadPic','','<?php 
        echo $image2;
        ?>
',1);">
		<?php 
        echo $image;
        ?>
		</a>
		</td>
		<?php 
    }
    function createCategory($success)
    {
        global $database, $my;
        $query = "SELECT * FROM priceguard_categories WHERE mos_user_id=" . $my->id;
        $database->setQuery($query);
        $database->query();
        $categories = $database->loadObjectList("id");
        ?>
		<form action="http://www.priceguard.de/component/option,com_priceguard/Itemid,41/" method="post" name="categoryForm" id="categoryForm">
		<div class="componentheading">Kategorie erstellen</div>
		<?php 
        if ($success) {
            ?>
				<div align='center'><b>Kategorie erfolgreich erstellt!</b></div><br/><br/>
			<?php 
        }
        ?>
		<table class="contentpane" width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
			<tr>
			<td valign="top" class="contentdescription">
				Bitte f&uuml;gen sie den Amazon.de Link von dem gew&uuml;nschten Produkt in das untere Feld ein und klicken anschlie&szlig;end auf weiter.<br/><br/>
				<b>Wichtig</b>: Der Link muss zum &Uuml;berblick des Artikels f&uuml;hren (siehe Bild rechts).
			</td>
			<td width="410">
				<div align="right">
				<?php 
        echo mosAdminMenus::ImageCheck('produkt_neu.png', '/images/stories/shop/amazon/');
        ?>
				</div>
			</td>
			</tr>
			<tr>
			<td colspan="2">
				<br/>
				<div align="center">
					Parent:
					<select name="parent">
					<option value="-1" />Oberste Ebene
					<?php 
        if (isset($categories)) {
            HTML_priceguard::parent_category_form($categories);
        }
        ?>
					</select><br /><br />
					Name:
					<input class="inputbox" type="text" name="category_name" size="75" /> <br/><br/>
					<input class="button" type='submit' name='Weiter' value='   Weiter   '>
				</div>
				</form>
			</td>
			</tr>
		</table>
		<?php 
    }
Exemplo n.º 17
0
    /**
     * Legacy function, deprecated
     *
     * @deprecated	As of version 1.5
     */
    function PrintIcon(&$row, &$params, $hide_js, $link, $status = NULL)
    {
        if ($params->get('print') && !$hide_js) {
            // use default settings if none declared
            if (!$status) {
                $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';
            }
            // checks template image directory for image, if non found default are loaded
            if ($params->get('icons')) {
                $image = mosAdminMenus::ImageCheck('printButton.png', '/images/M_images/', NULL, NULL, JText::_('Print'), JText::_('Print'));
            } else {
                $image = JText::_('ICON_SEP') . '&nbsp;' . JText::_('Print') . '&nbsp;' . JText::_('ICON_SEP');
            }
            if ($params->get('popup') && !$hide_js) {
                // Print Preview button - used when viewing page
                ?>
				<script type="text/javascript">
					document.write('<td align="right" width="100%" class="buttonheading">');
					document.write('<a href="#" onclick="javascript:window.print(); return false" title="<?php 
                echo JText::_('Print');
                ?>
">');
					document.write('<?php 
                echo $image;
                ?>
');
					document.write('</a>');
					document.write('</td>');
				</script>
				<?php 
            } else {
                // Print Button - used in pop-up window
                ?>
				<td align="right" width="100%" class="buttonheading">
				<a href="<?php 
                echo $link;
                ?>
" onclick="window.open('<?php 
                echo $link;
                ?>
','win2','<?php 
                echo $status;
                ?>
'); return false;" title="<?php 
                echo JText::_('Print');
                ?>
">
					<?php 
                echo $image;
                ?>
</a>
				</td>
				<?php 
            }
        }
    }
Exemplo n.º 18
0
    /**
     * Writes Email icon
     */
    function EmailIcon($row, $params, $hide_js)
    {
        global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template;
        if ($params->get('email') && !$params->get('popup') && !$hide_js) {
            $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=400,height=250,directories=no,location=no';
            $link = $mosConfig_live_site . '/index2.php?option=com_content&amp;task=emailform&amp;id=' . $row->id;
            if ($params->get('icons')) {
                $image = mosAdminMenus::ImageCheck('emailButton.png', '/images/M_images/', NULL, NULL, _CMN_EMAIL);
            } else {
                $image = '&nbsp;' . _CMN_EMAIL;
            }
            ?>
			<td align="right" width="100%" class="buttonheading">
			<a href="javascript:void window.open('<?php 
            echo $link;
            ?>
', 'win2', '<?php 
            echo $status;
            ?>
');" title="<?php 
            echo _CMN_EMAIL;
            ?>
">
			<?php 
            echo $image;
            ?>
			</a>
			</td>
			<?php 
        }
    }