Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Advertise on this site

Joomlapolis Forums  


Check my File Permissions Hack
Date: 2008/01/16 13:43 By: knotworking Status: CB Doc subscriber  
Karma: 1  
Junior Joomlapolitan

Posts: 28
graphgraph
Since I have users uploading resumes and personal documents that contain contact information I don't want other users seeing (only admins), I made a little hack on cb.profilegallery.php to prevent the display of files to non-admins (so the average user can only view pictures).

Seems to work just fine, but I would like to know if this is the best way to go about achieving my goal.

I replaced all code starting at line 1084 of cb.profilegallery.php (NOTE: the reason I am saying replace all of the code from 1084 down is because I can't find exactly where I added the necessary '}' so, this is easiest) :

Code:

 switch ($tabparams["cbpgdisplayformat"]){                     case 'DF1'// image layout headings (none)                     $filecheck = array("rtf","doc","docx","pdf","txt","xls");                     $piccheck = array("jpg","gif","png");                         if ((in_array($pgitemtype,$filecheck)) && ($isME || $isModerator)) {                         if (!$pgitemapproved || !$pgitempublished) {                             $htmltext2.= "<div class=\"connectionBox\" style=\"text-align:center;border:1px dotted;position:relative;height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)."px;width:".($tabparams["pgtnmaxwidth"]+$dparm[5])."px;\">";                         } else {                             $htmltext2.= "<div class=\"connectionBox\" style=\"text-align:center;position:relative;height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)."px;width:".($tabparams["pgtnmaxwidth"]+$dparm[5])."px;\">";                         }                         // Check file extension type                         $inimagelist in_array($pgitemtype,explode(",",$tabparams["pgimagefiletypelist"]));                         if ($tabparams["pgopmode"]!="FILEMODE" && $inimagelist){                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath) . "\" target=\"_blank\"><b>" $html_pgitemtitle_formatted "</b></a><br />"                                 "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                 "<a href=\"javascript:$popupname('$pglivelink','$js_pgitemtitle','$js_pgitemdescription')\">"                                 "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\" height=\"$newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 "</a>"                                 "</div>"                                 "<br /><br />";                         } else {                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath)."\"><b>" $html_pgitemtitle_formatted "</b></a><br />"                                 "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                 "<a href=\"$pgitemfilenameuserpath\" target=\"_blank\">"                                 "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\" height=\"$newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 "</a>"                                 "</div>"                                 "<br /><br />";                                                     }                         $htmltext2 .= "<form name=\"PGactionForm".$k."\" id=\"PGactionForm".$k."\" method=\"post\" action=\"".$base_url."\">";                         $htmltext2 .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                         $htmltext2 .= "<input type=\"submit\" name=\"PGsubmitform\" style=\"display:none;\" />";                         $htmltext2 .= "<input type=\"hidden\" id=\"PGformaction\" name=\"".$this->_getPagingParamName("PGformaction")."\" value=\"default\" /></form>";                         if ($isME || $isModerator) {                             $htmltext2 .= "<a href=\"javascript:if (confirm('" ._pg_DeleteWarning . "')) { document.PGactionForm".$k.".PGformaction.value='delete';document.PGactionForm".$k.".submit(); }\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c1\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[0] . "\" alt=\"" ._pg_Delete."\" title=\""._pg_Delete."\"></a>";                                         if (!$pgitempublished) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='publish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c2\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[2] . "\" alt=\"" ._pg_Publish ."\" title=\""._pg_Publish."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='unpublish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c3\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[1] . "\" alt=\"" ._pg_Unpublish ."\" title=\""._pg_Unpublish."\"></a>";                             }                         }                         if ($isModerator) {                             if (!$pgitemapproved) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='approve';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c4\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[3] . "\" alt=\"" ._pg_Approve ."\" title=\""._pg_Approve."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='revoke';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c5\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[4] . "\" alt=\"" ._pg_Revoke ."\" title=\""._pg_Revoke."\"></a>";                             }                         }                                              if ($isME || $isModerator) {                             $popform=null;                             $popform .= "<form name=\"PGformaction".$k."\" id=\"PGformaction".$k."\" method=\"post\" action=\"".$base_url."\">";                             $popform .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                             $popform .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("PGformaction")."\" value=\"update\" />";                             $popform .= "<br /><b>"._pg_ItemTitle.":</b><br /><input class=\"inputbox\" type=\"text\" name=\"".$this->_getPagingParamName("pguitemtitle")."\" size=\"30\" maxlength=\"255\" value=\"".$html_pgitemtitle."\"></input>";                             $popform .= "<br /><b>"._pg_ItemDescription.":</b><br /><textarea class=\"inputbox\" cols=\"35\" rows=\"4\" name=\"".$this->_getPagingParamName("pguitemdescription")."\" style=\"height:75px;width:400px;overflow:auto;\" >".$html_pgitemdescription."</textarea>";                             $popform .= "<br /><input type=\"submit\" value=\""._pg_Update."\" /></form>";                                                 //Add the localized Javascript Paramaters so that error messages are properly translated                             //$popform .="\n\n<script type=\"text/javascript\">\n";                             //$popform .="var _pg_TitleRequired='"._pg_TitleRequired."';\n";                             //$popform .="var _TitleVariable=document.PGformaction.".$this-> _getPagingParamName("pguitemtitle").";\n";                             //$popform .="</script>\n\n";                                                      $htmltext2 .= "<a href=\"javascript:void(0);\" name=\"PGeditForm".$k."\" id=\"PGeditForm".$k."\" onclick=\""                                 ."return overlib('".str_replace(array("&","\\",'"',"<",">","'","\n","\r"), array("&amp;","\\\\","&quot;","<",">","\'","\\n","\\r"),$popform)."', STICKY, CAPTION,'"._pg_EditPopup."', CENTER,CLOSECLICK,CLOSETEXT,'" ._UE_CLOSE_OVERLIB."',WIDTH,350, ANCHOR,'PGeditForm".$k."',ANCHORALIGN,'LR','UR');\">"."<img style=\"cursor:pointer;border:0px;\" id=\"pg_c5\" src=\"components/com_comprofiler/ plugin/user/plug_cbprofilegallery/images/" . $icon[5] . "\" alt=\"" ._pg_Edit ."\" title=\"" ._pg_Edit."\""."></a> ";         }                } else {if(in_array($pgitemtype,$piccheck)) {                         if (!$pgitemapproved || !$pgitempublished) {                             $htmltext2.= "<div class=\"connectionBox\" style=\"text-align:center; border:1px dotted;position:relative;height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)." px;width:".($tabparams["pgtnmaxwidth"]+$dparm[5])."px;\">";                         } else {                             $htmltext2.= "<div class=\"connectionBox\" style=\"text-align:center; position:relative;height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)."px;width:" .($tabparams["pgtnmaxwidth"]+$dparm[5])."px;\">";                         }                         // Check file extension type                         $inimagelist = in_array($pgitemtype,explode(",",$tabparams[" pgimagefiletypelist"]));                         if ($tabparams["pgopmode"]!="FILEMODE" && $inimagelist){                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath) . "\"  target=\"_blank\"><b>" . $html_pgitemtitle_formatted . "</b></a><br />"                                 . "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                 . "<a href=\"javascript:$popupname('$pglivelink','$js_pgitemtitle','$js_pgitemdescription')\">"                                 . "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\" height=\" $newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 . "</a>"                                 . "</div>"                                 . "<br /><br />";                         } else {                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath)."\"><b>"  . $html_pgitemtitle_formatted . "</b></a><br />"                                 . "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                 . "<a href=\"$pgitemfilenameuserpath\" target=\"_blank\">"                                 . "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\" height=\" $newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 . "</a>"                                 . "</div>"                                 . "<br /><br />";                                                     }                         $htmltext2 .= "<form name=\"PGactionForm".$k."\" id=\"PGactionForm".$k."\"  method=\"post\" action=\"".$base_url."\">";                         $htmltext2 .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName(" id")."\" value=\"".$pgitem->id."\" />";                         $htmltext2 .= "<input type=\"submit\" name=\"PGsubmitform\" style=\"display: none;\" />";                         $htmltext2 .= "<input type=\"hidden\" id=\"PGformaction\" name=\"".$this-> _getPagingParamName("PGformaction")."\" value=\"default\" /></form>";                         if ($isME || $isModerator) {                             $htmltext2 .= "<a href=\"javascript:if (confirm('" ._pg_DeleteWarning .  "')) { document.PGactionForm".$k.".PGformaction.value='delete';document.PGactionForm".$k.".submit(); }\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c1\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[0] . "\" alt=\""  ._pg_Delete."\" title=\""._pg_Delete."\"></a>";                                         if (!$pgitempublished) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='publish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c2\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[2] . "\" alt=\""  ._pg_Publish ."\" title=\""._pg_Publish."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='unpublish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c3\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[1] . "\" alt=\""  ._pg_Unpublish ."\" title=\""._pg_Unpublish."\"></a>";                             }                         }                         if ($isModerator) {                             if (!$pgitemapproved) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='approve';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c4\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[3] . "\" alt=\""  ._pg_Approve ."\" title=\""._pg_Approve."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='revoke';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c5\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[4] . "\" alt=\""  ._pg_Revoke ."\" title=\""._pg_Revoke."\"></a>";                             }                         }                                              if ($isME || $isModerator) {                             $popform=null;                             $popform .= "<form name=\"PGformaction".$k."\" id=\"PGformaction".$k."\"  method=\"post\" action=\"".$base_url."\">";                             $popform .= "<input type=\"hidden\" name=\"".$this-> _getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                             $popform .= "<input type=\"hidden\" name=\"".$this-> _getPagingParamName("PGformaction")."\" value=\"update\" />";                             $popform .= "<br /><b>"._pg_ItemTitle.":</b><br /><input class=\" inputbox\" type=\"text\" name=\"".$this->_getPagingParamName("pguitemtitle")."\" size=\"30\"  maxlength=\"255\" value=\"".$html_pgitemtitle."\"></input>";                             $popform .= "<br /><b>"._pg_ItemDescription.":</b><br /><textarea  class=\"inputbox\" cols=\"35\" rows=\"4\" name=\"".$this->_getPagingParamName("pguitemdescription") ."\" style=\"height:75px;width:400px;overflow:auto;\" >".$html_pgitemdescription."</textarea>";                             $popform .= "<br /><input type=\"submit\" value=\""._pg_Update."\" /></ form>";                                                 //Add the localized Javascript Paramaters so that error messages are  properly translated                             //$popform .="\n\n<script type=\"text/javascript\">\n";                             //$popform .="var _pg_TitleRequired='"._pg_TitleRequired."';\n";                             //$popform .="var _TitleVariable=document.PGformaction.".$this-> _getPagingParamName("pguitemtitle").";\n";                             //$popform .="</script>\n\n";                                                      $htmltext2 .= "<a href=\"javascript:void(0);\" name=\"PGeditForm".$k."\"  id=\"PGeditForm".$k."\" onclick=\""                                 ."return overlib('".str_replace(array("&","\\",'"',"<",">","'","\n","\r"), array("&amp;","\\\\","&quot;","<",">","\'","\\n","\\r"),$popform)."'STICKYCAPTION,'"._pg_EditPopup."'CENTER,CLOSECLICK,CLOSETEXT,'"._UE_CLOSE_OVERLIB."',WIDTH,350ANCHOR,'PGeditForm".$k."',ANCHORALIGN,'LR','UR');\">"."<img style=\"cursor:pointer;border:0px;\" id=\"pg_c5\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[5] . "\" alt=\"" ._pg_Edit ."\" title=\""._pg_Edit."\""."></a> ";                                 }                } }                         $htmltext2 .= "<br /></div>";                         break;                         case 'DF2'// file list layout                         $htmltext2 .= "<form name=\"PGactionForm".$k."\" id=\"PGactionForm".$k."\" method=\"post\" action=\"".$base_url."\">";                         $htmltext2 .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                         $htmltext2 .= "<input type=\"submit\" name=\"PGsubmitform\" style=\"display:none;\" />";                         $htmltext2 .= "<input type=\"hidden\" id=\"PGformaction\" name=\"".$this->_getPagingParamName("PGformaction")."\" value=\"default\" /></form>";                         $htmltext2 .= "<tr>";                         $htmltext2 .= "<td>".$pgitemdate."</td>";                         $htmltext2 .= "<td>".$pgitemtitle_url."</td>";                         $htmltext2 .= "<td>".unHtmlspecialchars($pgitemdescription)."</td>";                         if ($isME || $isModerator$htmltext2 .= "<td>";                         if ($isME || $isModerator) {                             $htmltext2 .= "<a href=\"javascript:if (confirm('" ._pg_DeleteWarning . "')) { document.PGactionForm".$k.".PGformaction.value='delete';document.PGactionForm".$k.".submit(); }\">" ._pg_Delete."<br /></a>";                                         if (!$pgitempublished) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='publish';document.PGactionForm".$k.".submit();\">"._pg_Publish."<br /></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='unpublish';document.PGactionForm".$k.".submit();\">" ._pg_Unpublish."<br /></a>";                             }                         }                         if ($isModerator) {                             if (!$pgitemapproved) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='approve';document.PGactionForm".$k.".submit();\">"._pg_Approve."<br /></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k.".PGformaction.value='revoke';document.PGactionForm".$k.".submit();\">"._pg_Revoke."<br /></a>";                             }                         }                         if ($isME || $isModerator) {                             $popform=null;                             $popform .= "<form name=\"PGformaction".$k."\" id=\"PGformaction".$k."\" method=\"post\" action=\"".$base_url."\">";                             $popform .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                             $popform .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName("PGformaction")."\" value=\"update\" />";                             $popform .= "<br /><b>"._pg_ItemTitle.":</b><br /><input class=\"inputbox\" type=\"text\" name=\"".$this->_getPagingParamName("pguitemtitle")."\" size=\"30\" maxlength=\"255\" value=\"".$html_pgitemtitle."\"></input>";                             $popform .= "<br /><b>"._pg_ItemDescription.":</b><br /><textarea class=\"inputbox\" cols=\"35\" rows=\"4\" name=\"".$this->_getPagingParamName("pguitemdescription")."\" style=\"height:75px;width:400px;overflow:auto;\" >".$html_pgitemdescription."</textarea>";                             $popform .= "<br /><input type=\"submit\" value=\""._pg_Update."\" /></form>";                                                 //Add the localized Javascript Paramaters so that error messages are properly translated                             //$popform .="\n\n<script type=\"text/javascript\">\n";                             //$popform .="var _pg_TitleRequired='"._pg_TitleRequired."';\n";                             //$popform .="var _TitleVariable=document.PGformaction.".$this-> _getPagingParamName("pguitemtitle").";\n";                             //$popform .="</script>\n\n";                                                          $htmltext2 .= "<a href=\"javascript:void(0);\" name=\"PGeditForm".$k."\" id=\"PGeditForm".$k."\" onclick=\""                                 ."return overlib('".str_replace(array("&","\\",'"',"<",">","'","\n","\r"), array("&amp;","\\\\","&quot;","<",">","\'","\\n","\\r"),$popform)."', STICKY, CAPTION,'"._pg_EditPopup."', CENTER,CLOSECLICK,CLOSETEXT,'" ._UE_CLOSE_OVERLIB."',WIDTH,350, ANCHOR,'PGeditForm".$k."',ANCHORALIGN,'LR','UR');\">"._pg_Edit ."></a> ";                         }                         if ($isME || $isModerator) $htmltext2 .= "</td>";                         $htmltext2 .= "</tr>";                         break;                     case 'DF3': // image layout headings (none)                         if (!$pgitemapproved || !$pgitempublished) {                             $htmltext2.= "<div class=\"connectionBox\" style=\"border:1px dotted; position:relative;height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)."px;width:" .($tabparams["pgtnmaxwidth"]+$dparm[5])."px;\">";                         } else {                             $htmltext2.= "<div class=\"connectionBox\" style=\"position:relative; height:".($tabparams["pgtnmaxheight"]+$dparm[4]+$pg_extrasize)."px;width:".($tabparams[" pgtnmaxwidth"]+$dparm[5])."px;\">";                         }                         // Check file extension type                         //<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</ a>                         $inimagelist = in_array($pgitemtype,explode(",",$tabparams[" pgimagefiletypelist"]));                         if ($tabparams["pgopmode"]!="FILEMODE" && $inimagelist){                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath) . "\"  target=\"_blank\"><b>" . $html_pgitemtitle_formatted . "</b></a><br />"                                 . "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                     . "<a href=\"$pglivelink\" rel=\"lightbox[group]\" title=\" $html_pgitemlightbox\">"                                 . "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\"  height=\" $newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 . "</a>"                                 . "</div>"                                 . "<br /><br />";                         } else {                             $htmltext2.= "<a href=\"".sefRelToAbs($pgitemfilenameuserpath)."\"><b>"  . $html_pgitemtitle_formatted . "</b></a><br />"                                 . "<div style=\"height:".$tabparams["pgtnmaxheight"]."px;\">"                                 . "<a href=\"$pgitemfilenameuserpath\" target=\"_blank\">"                                 . "<img src=\"" . $pgitemthumbuserpath . "\" border=\"0\"  height=\" $newtn_height\" width=\"$newtn_width\" alt=\"\" title=\"" . $html_pgitemdescription . "\" />"                                 . "</a>"                                 . "</div>"                                 . "<br /><br />";                                                     }                         $htmltext2 .= "<form name=\"PGactionForm".$k."\" id=\"PGactionForm".$k."\"  method=\"post\" action=\"".$base_url."\">";                         $htmltext2 .= "<input type=\"hidden\" name=\"".$this->_getPagingParamName(" id")."\" value=\"".$pgitem->id."\" />";                         $htmltext2 .= "<input type=\"submit\" name=\"PGsubmitform\" style=\"display: none;\" />";                         $htmltext2 .= "<input type=\"hidden\" id=\"PGformaction\" name=\"".$this-> _getPagingParamName("PGformaction")."\" value=\"default\" /></form>";                         if ($isME || $isModerator) {                             $htmltext2 .= "<a href=\"javascript:if (confirm('" ._pg_DeleteWarning .  "')) { document.PGactionForm".$k.".PGformaction.value='delete';document.PGactionForm".$k.".submit(); }\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c1\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[0] . "\" alt=\""  ._pg_Delete."\" title=\""._pg_Delete."\"></a>";                                         if (!$pgitempublished) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='publish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c2\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[2] . "\" alt=\""  ._pg_Publish ."\" title=\""._pg_Publish."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='unpublish';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c3\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[1] . "\" alt=\""  ._pg_Unpublish ."\" title=\""._pg_Unpublish."\"></a>";                             }                         }                         if ($isModerator) {                             if (!$pgitemapproved) {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='approve';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c4\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[3] . "\" alt=\""  ._pg_Approve ."\" title=\""._pg_Approve."\"></a>";                             } else {                                 $htmltext2 .= "<a href=\"javascript:document.PGactionForm".$k." .PGformaction.value='revoke';document.PGactionForm".$k.".submit();\"><img style=\"cursor:pointer;border:0px;\" id=\"pg_c5\"  src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/images/" . $icon[4] . "\" alt=\""  ._pg_Revoke ."\" title=\""._pg_Revoke."\"></a>";                             }                         }                         if ($isME || $isModerator) {                             $popform=null;                             $popform .= "<form name=\"PGformaction".$k."\" id=\"PGformaction".$k."\"  method=\"post\" action=\"".$base_url."\">";                             $popform .= "<input type=\"hidden\" name=\"".$this-> _getPagingParamName("id")."\" value=\"".$pgitem->id."\" />";                             $popform .= "<input type=\"hidden\" name=\"".$this-> _getPagingParamName("PGformaction")."\" value=\"update\" />";                             $popform .= "<br /><b>"._pg_ItemTitle.":</b><br /><input class=\" inputbox\" type=\"text\" name=\"".$this->_getPagingParamName("pguitemtitle")."\" size=\"30\"  maxlength=\"255\" value=\"".$html_pgitemtitle."\"></input>";                             $popform .= "<br /><b>"._pg_ItemDescription.":</b><br /><textarea  class=\"inputbox\" cols=\"35\" rows=\"4\" name=\"".$this->_getPagingParamName("pguitemdescription") ."\" style=\"height:75px;width:400px;overflow:auto;\" >".$html_pgitemdescription."</textarea>";                             $popform .= "<br /><input type=\"submit\" value=\""._pg_Update."\" /></ form>";                                                 //Add the localized Javascript Param