اخر المواضيع

آخر الأخبار
إختر لونك المفضل

عرض المحتوي

بحث

الجمعة، 15 ديسمبر 2023

طريقة عمل مشرف 4images

السفراني | ديسمبر 15, 2023 |
السلام عليكم

  الملفات الجديدة

install_moderador.php

---------------------------------------

الملفات التي سيتم التعديل علية

details.php

lang/main.php

lang/admin.php

include/constans.php

include/page_header.php

templates/defauld/footer.html

admin/admin_functions.php

admin/email.php

admin/admin_global.php

admin/index.php

admin/users.php

--------------------------------------

افتح صفحة

details.php 

ابحث عن

$admin_links = "";

      if ($user_info['user_level'] == ADMIN) {

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";

      }

      elseif ($is_image_owner) {

        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";

      }

استبدلة با

///// Nuevo tipo de usuarios /////

      /* ******* Antes ********

      $admin_links = "";

      if ($user_info['user_level'] == ADMIN) {

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";

      }

      elseif ($is_image_owner) {

        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";

      }

      // ******* Ahora *********

      */

      $admin_links = "";

      if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {

      $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";

      }

      elseif ($is_image_owner) {

        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";

        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";

      }

      ///// Fin nuevo tipo de usuario /////

ابحث مرة اخري

$admin_links = "";

if ($user_info['user_level'] == ADMIN) {

  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";

}

elseif ($is_image_owner) {

  $admin_links .= ($config['user_edit_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= ($config['user_delete_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";

}

استبدلة با

///// Nuevo tipo de usuarios /////

/* ******* Antes ********

// Admin Links

$admin_links = "";

if ($user_info['user_level'] == ADMIN) {

  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";

}

elseif ($is_image_owner) {

  $admin_links .= ($config['user_edit_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= ($config['user_delete_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";

}

// ******* Ahora *********

*/

$admin_links = "";

if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {

        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";

}

elseif ($is_image_owner) {

  $admin_links .= ($config['user_edit_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";

  $admin_links .= ($config['user_delete_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";

}

///// Fin nuevo tipo de usuario /////

افتح صفحة

 lang/ملف اللغة العربية/main.php

ابحث عن

$lang['userlevel_admin'] = "مدير";

اضف بعدة

////// Nuevo tipo usuario /////

$lang['userlevel_moderador'] = "مشرف";

///// Fin nuevo tipo usuario ///////

افتح صفحة

lang/ملف اللغة العربية/admin.php

ابحث عن

$lang['userlevel_admin'] = "مدير";

اضف بعدة

///// Nuevo tipo de usuario /////

$lang['userlevel_moderador'] = "Moderadores";

/////// Fin nuevo tipo de usuario /////

ابحث مرة اخري

$lang['field_usergroup_name'] = "عنوان المجموعة";

اضف بعدة

/////// Nuevo tipo de usuario //////////

$lang['field_moderador_categorias'] = "التحكم با الاقسام ? :";

$lang['field_moderador_imagenes'] = "التحكم با الصور  ? :";

$lang['field_moderador_comentarios'] = "التحكم با التعليقات ? :";

$lang['field_moderador_usuarios'] = "التحكم با الاعضاء ? :";

/////// Fin nuevo tipo de usuario ////////

ابحث مرة اخري

$lang['nav_users_email'] = "أرسل بريد";

اضف بعدة

////// Nuevo tipo de usuario //////

$lang['nav_users_moderadores_main'] = "مشرف";

$lang['nav_users_moderadores_edit'] = "تعديل المشرف";

///// Fin nuevo tipo de usuario //////

افتح صفحة

include/constans.php

// User levels

define('GUEST', -1);

define('USER_AWAITING', 1);

define('USER', 2);

define('ADMIN', 9);

اضف بعدة

///// Nuevo tipo de usuario //////

define('MODERADOR', 5);

////// Fin nuevo tipo de usuario ///////

ابحث عن

// Permission levels

define('AUTH_ALL', 0);

define('AUTH_USER', 2);

define('AUTH_ACL', 3);

define('AUTH_ADMIN', 9);

اضف بعدة

///// Nuevo tipo de usuario //////

define('AUTH_MODERADOR', 5);

////// Fin nuevo tipo de usuario ///////

ابحث عن

define('ADMIN_SAFE_LOGIN', 0);

اضف بعدة

///// Nuevo tipo de usuario //////

define('MODERADOR_SAFE_LOGIN', 0);

////// Fin nuevo tipo de usuario ///////

افتح صفحة

 include/page_header.php

ابحث عن

  "cp_link" => ($user_info['user_level'] != ADMIN) ? "" : "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Admin Control Panel</a>]</p>\n",

اضف بعدة

///// Nuevo tipo de usuario //////

  "cp_moderador" => ($user_info['user_level'] != MODERADOR) ? "" : "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Moderador Control Panel</a>]</p>\n",

  ////// Fin nuevo tipo de usuario ///////

افتح صفحة

templates/الثيم المستخدم/footer.html

ابحث عن

{cp_link}

استبدلة با

{cp_link}{cp_moderador}

افتح صفحة

 admin/admin_functions.php

ابحث عن

  echo ">".$lang['userlevel_admin']."</option>\n";

اضف بعدة

///// Nuevo tipo de usuario //////

  echo "<option value=\"".MODERADOR."\"";

  if ($userlevel == MODERADOR && $userlevel != "") {

    echo " selected=\"selected\"";

  }

  echo ">".$lang['userlevel_moderador']."</option>\n";

   ////// Fin nuevo tipo de usuario ///////

ابحث مرة اخري

echo ">".$lang['userlevel_registered_awaiting']."</option>\n";

  echo "</select>\n</td>\n</tr>\n";

}

اضف بعدة

///// Nuevo tipo de usuario //////

function show_userlevel_select_row_moderadores($title, $name = "user_level", $userlevel = "") {

  global $lang, $error, $HTTP_POST_VARS;

  if (isset($error[$name])) {

    $title = sprintf("<span class=\"marktext\">%s *</span>", $title);

  }

  if (isset($HTTP_POST_VARS[$name])/* && $userlevel == ""*/) {

    $userlevel = stripslashes($HTTP_POST_VARS[$name]);

  }

  echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">".$title."</p></td>\n<td>\n";

  echo "<select name=".$name.">\n";

  echo "<option value=\"".GUEST."\"";

  if ($userlevel == GUEST || $userlevel == "") {

    echo " selected=\"selected\"";

  }

  echo ">--</option>\n";

  echo "<option value=\"".USER."\"";

  if ($userlevel == USER && $userlevel != "") {

    echo " selected=\"selected\"";

  }

   echo ">".$lang['userlevel_registered']."</option>\n";

  echo "<option value=\"".USER_AWAITING."\"";

  if ($userlevel == USER_AWAITING && $userlevel != "") {

    echo " selected=\"selected\"";

  }

  echo ">".$lang['userlevel_registered_awaiting']."</option>\n";

  echo "</select>\n</td>\n</tr>\n";

}

//////// Fin nuevo tipo de usuario //////

افتح صفحة

admin/email.php

$select .= "<option value=\"0\" class=\"dropdownmarker\">".$lang['userlevel_admin']."</option>\n";

    }

اضف بعدة

///// Nuevo tipo de usuario //////

    elseif ($level != $user_level && $user_level == MODERADOR) {

      $select .= "<option value=\"0\">__________________________</option>\n";

      $select .= "<option value=\"0\" class=\"dropdownmarker\">".$lang['userlevel_moderador']."</option>\n";

    }

////// Fin nuevo tipo de usuario //////

admin/admin_global.php

ابحث عن

if (defined('ADMIN_SAFE_LOGIN') && ADMIN_SAFE_LOGIN == 1) {

  if ($user_info['user_level'] != GUEST && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

    setcookie("adminon", 1, 0, '/');

    $HTTP_COOKIE_VARS['adminon'] = 1;

  }

  else {

    if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER || $user_info['user_level'] == USER_AWAITING) {

      $HTTP_COOKIE_VARS['adminon'] = 0;

    }

  }


  if (!isset($HTTP_COOKIE_VARS['adminon']) || $HTTP_COOKIE_VARS['adminon'] == 0) {

    $user_info['user_level'] = GUEST;

  }

  else {

    if ($user_info['user_level'] != GUEST  && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

      setcookie("adminon", 1, 0, '/');

      $HTTP_COOKIE_VARS['adminon'] = 1;

    }

  }

}

استبدلة با

/////// Nuevo tipo de usuario ///////

/*

///// Antes

if (defined('ADMIN_SAFE_LOGIN') && ADMIN_SAFE_LOGIN == 1) {

  if ($user_info['user_level'] != GUEST && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

    setcookie("adminon", 1, 0, '/');

    $HTTP_COOKIE_VARS['adminon'] = 1;

  }

  else {

    if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER || $user_info['user_level'] == USER_AWAITING) {

      $HTTP_COOKIE_VARS['adminon'] = 0;

    }

  }


  if (!isset($HTTP_COOKIE_VARS['adminon']) || $HTTP_COOKIE_VARS['adminon'] == 0) {

    $user_info['user_level'] = GUEST;

  }

  else {

    if ($user_info['user_level'] != GUEST  && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

      setcookie("adminon", 1, 0, '/');

      $HTTP_COOKIE_VARS['adminon'] = 1;

    }

  }

}

*/

///////// Ahora

if ((defined('ADMIN_SAFE_LOGIN') && ADMIN_SAFE_LOGIN == 1) || (defined('MODERADOR_SAFE_LOGIN') && MODERADOR_SAFE_LOGIN == 1)){

  if ($user_info['user_level'] != GUEST && $user_info['user_level'] != MODERADOR && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

    setcookie("adminon", 1, 0, '/');

    $HTTP_COOKIE_VARS['adminon'] = 1;

  }

  else {

    if ($user_info['user_level'] == GUEST || $user_info['user_level'] == MODERADOR || $user_info['user_level'] == USER || $user_info['user_level'] == USER_AWAITING) {

      $HTTP_COOKIE_VARS['adminon'] = 0;

    }

  }

if ($user_info['user_level'] != GUEST && $user_info['user_level'] == MODERADOR && $user_info['user_level'] != ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

    setcookie("moderadoron", 1, 0, '/');

    $HTTP_COOKIE_VARS['moderadoron'] = 1;

  }

  else {

    if ($user_info['user_level'] == GUEST || $user_info['user_level'] == ADMIN || $user_info['user_level'] == USER || $user_info['user_level'] == USER_AWAITING) {

      $HTTP_COOKIE_VARS['moderadoron'] = 0;

    }

  }

  if (!isset($HTTP_COOKIE_VARS['adminon']) || $HTTP_COOKIE_VARS['adminon'] == 0 || !isset($HTTP_COOKIE_VARS['moderadoron']) || $HTTP_COOKIE_VARS['moderadoron'] == 0) {

    $user_info['user_level'] = GUEST;

  }

  else {

    if ($user_info['user_level'] != GUEST  && $user_info['user_level'] != MODERADOR && $user_info['user_level'] == ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

      setcookie("adminon", 1, 0, '/');

      $HTTP_COOKIE_VARS['adminon'] = 1;

    }


else {

    if ($user_info['user_level'] != GUEST  && $user_info['user_level'] == MODERADOR  && $user_info['user_level'] != ADMIN && isset($HTTP_POST_VARS['loginusername'])) {

      setcookie("moderadoron", 1, 0, '/');

      $HTTP_COOKIE_VARS['moderadoron'] = 1;

    }

  }

  }

}

////// Fin nuevo tipo de usuario ///////

ابحث مرة اخري

if ($user_info['user_level'] != ADMIN) {

استبدلة با

if ($user_info['user_level'] != ADMIN) {

افتح

 admin/index.php

ابحث عن

show_nav_header($lang['nav_categories_main']);

          show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");

          show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");


          show_nav_header($lang['nav_images_main']);

          show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");

          show_nav_option($lang['nav_images_add'], "images.php?action=addimages");

          show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");

          show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");

          show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");

          show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");


          show_nav_header($lang['nav_comments_main']);

          show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");


          show_nav_header($lang['nav_users_main']);

          show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_add'], "users.php?action=addusers");

          }

          show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");

          }


          show_nav_header($lang['nav_general_main']);

          show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");

          show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");

          show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");

          show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");

show_nav_option("phpinfo()", "phpinfo.php");


          if (@is_dir("plugins")) {

            show_nav_header("PlugIns");

            $handle = @opendir("plugins/");

            while ($file = @readdir($handle)) {

              if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {

                continue;

              }

              $plugin_file = file("./plugins/".$file);

              $plugin_file[0] = trim($plugin_file[0]);

              if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {

                show_nav_option(trim($regs[1]), "./plugins/".$file);

              }

              else {

                show_nav_option($file, "./plugins/".$file);

              }

            }

استبدلة با

      //// Nuevo tipo de usuario /////////////

          /*

          // ********* Antes ************

          show_nav_header($lang['nav_categories_main']);

          show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");

          show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");


          show_nav_header($lang['nav_images_main']);

          show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");

          show_nav_option($lang['nav_images_add'], "images.php?action=addimages");

          show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");

          show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");

          show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");

          show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");


          show_nav_header($lang['nav_comments_main']);

          show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");


          show_nav_header($lang['nav_users_main']);

          show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_add'], "users.php?action=addusers");

          }

          show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");

          }


          show_nav_header($lang['nav_general_main']);

          show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");

          show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");

          show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");

          show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");

show_nav_option("phpinfo()", "phpinfo.php");


          if (@is_dir("plugins")) {

            show_nav_header("PlugIns");

            $handle = @opendir("plugins/");

            while ($file = @readdir($handle)) {

              if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {

                continue;

              }

              $plugin_file = file("./plugins/".$file);

              $plugin_file[0] = trim($plugin_file[0]);

              if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {

                show_nav_option(trim($regs[1]), "./plugins/".$file);

              }

              else {

                show_nav_option($file, "./plugins/".$file);

              }

            }

          // ********* Ahora ************

          */

          if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_categorias'] == 1)) {

          show_nav_header($lang['nav_categories_main']);

          show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");

          show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");

          }

          if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {

          show_nav_header($lang['nav_images_main']);

          show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");

          show_nav_option($lang['nav_images_add'], "images.php?action=addimages");

          show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");

          show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");

          show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");

          show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");

          }

          if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {

          show_nav_header($lang['nav_comments_main']);

          show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");

          }

          if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_usuarios'] == 1)) {

          show_nav_header($lang['nav_users_main']);

          show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_add'], "users.php?action=addusers");

          }

          show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");

          if (!defined('USER_INTEGRATION')) {

            show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");

          }

          }

         

         

    if ($user_info['user_level'] == ADMIN && $user_info['user_level'] != MODERADOR && $user_info['user_level'] != GUEST) {

          show_nav_header($lang['nav_users_moderadores_main']);

          show_nav_option($lang['nav_users_moderadores_edit'], "users.php?action=findusers&usuario=moderadores");

          show_nav_header($lang['nav_general_main']);

          show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");

          show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");

          show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");

          show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");

    show_nav_option("phpinfo()", "phpinfo.php");

          if (@is_dir("plugins")) {

            show_nav_header("PlugIns");

            $handle = @opendir("plugins/");

            while ($file = @readdir($handle)) {

              if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {

                continue;

              }

              $plugin_file = file("./plugins/".$file);

              $plugin_file[0] = trim($plugin_file[0]);

              if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {

                show_nav_option(trim($regs[1]), "./plugins/".$file);

              }

              else {

                show_nav_option($file, "./plugins/".$file);

              }

            }

          }

          ////////// Fin nuevo tipo de usuario //////

افتح

admin/users.php

ابحث عن

$user_invisible = intval($HTTP_POST_VARS['user_invisible']);

استبدلة با

////// Nuevo tipo de usuario //////

   $user_moderador_categorias = intval($HTTP_POST_VARS['user_moderador_categorias']);

  $user_moderador_imagenes = intval($HTTP_POST_VARS['user_moderador_imagenes']);

  $user_moderador_comentarios = intval($HTTP_POST_VARS['user_moderador_comentarios']);

  $user_moderador_usuarios = intval($HTTP_POST_VARS['user_moderador_usuarios']);

  //// Fin nuevo tipo de usuario ////

ابحث مرة اخري

$sql = "UPDATE ".USERS_TABLE."

            SET ".get_user_table_field("", "user_level")." = $user_level, ".get_user_table_field("", "user_name")." = '$user_name',$passinsert ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_joindate")." = $user_joindate, ".get_user_table_field("", "user_lastaction")." = $user_lastaction, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq'".$additional_sql."

            WHERE ".get_user_table_field("", "user_id")." = $user_id";

    $result = $site_db->query($sql);

استبدلة با

////////// Nuevo tipo de usuario //////

/* **** Antes *******

 $sql = "UPDATE ".USERS_TABLE."

            SET ".get_user_table_field("", "user_level")." = $user_level, ".get_user_table_field("", "user_name")." = '$user_name',$passinsert ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_joindate")." = $user_joindate, ".get_user_table_field("", "user_lastaction")." = $user_lastaction, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq'".$additional_sql."

            WHERE ".get_user_table_field("", "user_id")." = $user_id";

    $result = $site_db->query($sql);

// ********* Ahora ************

*/

  $sql = "UPDATE ".USERS_TABLE."

            SET ".get_user_table_field("", "user_level")." = $user_level, ".get_user_table_field("", "user_name")." = '$user_name',$passinsert ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_joindate")." = $user_joindate, ".get_user_table_field("", "user_lastaction")." = $user_lastaction, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq', user_moderador_categorias = '$user_moderador_categorias', user_moderador_imagenes = '$user_moderador_imagenes', user_moderador_comentarios = '$user_moderador_comentarios', user_moderador_usuarios = '$user_moderador_usuarios'".$additional_sql."

            WHERE ".get_user_table_field("", "user_id")." = $user_id";

    $result = $site_db->query($sql);

/////// Fin nuevo tipo de usuario //////

ابحث عن

show_userlevel_select_row($lang['field_userlevel'], "user_level", $user_row['user_level']);

استبدلة با

///// Nuevo tipo de usuario //////

  /* ***** Antes *****

  show_userlevel_select_row($lang['field_userlevel'], "user_level", $user_row['user_level']);

  */

  // ******** Ahora ******

  if ($user_info['user_level'] == ADMIN){

  show_userlevel_select_row($lang['field_userlevel'], "user_level", $user_row['user_level']);

  }

  else {

  show_userlevel_select_row_moderadores($lang['field_userlevel'], "user_level", $user_row['user_level']);

  }

  ////////// Fin nuevo tipo de usuario //////

ابحث عن

show_date_input_row($lang['field_lastaction'].$lang['date_desc'], "user_lastaction", $user_row['user_lastaction'], $textinput_size);

اضف بعدة

///// Nuevo tipo de usuario //////

 if ($user_info['user_level'] == ADMIN && $user_row['user_level'] == MODERADOR){

 show_radio_row($lang['field_moderador_categorias'], "user_moderador_categorias", $user_row['user_moderador_categorias'],1);

 show_radio_row($lang['field_moderador_imagenes'], "user_moderador_imagenes", $user_row['user_moderador_imagenes'], 1);

 show_radio_row($lang['field_moderador_comentarios'], "user_moderador_comentarios", $user_row['user_moderador_comentarios'], 1);

 show_radio_row($lang['field_moderador_usuarios'], "user_moderador_usuarios", $user_row['user_moderador_usuarios'], 1);

 }

////////// Fin nuevo tipo de usuario ///////

ابحث عن

show_userlevel_select_row($lang['field_userlevel']);

اضف بعدة

//// Nuevo tipo de usuario //////

   /* ***** Antes *****

  show_userlevel_select_row($lang['field_userlevel']);

  */

  // ******** Ahora ******

  if ($user_info['user_level'] == ADMIN){

  show_userlevel_select_row($lang['field_userlevel']);

  }

  else {

  show_userlevel_select_row_moderadores($lang['field_userlevel']);

  }

   ////////// Fin nuevo tipo de usuario //////

ابحث عن

$sql = "SELECT COUNT(*) AS users

          FROM ".USERS_TABLE."

          WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST;

استبدل با

//// Nuevo tipo de usuario /////////////

/* ***** Antes *********

 $sql = "SELECT COUNT(*) AS users

          FROM ".USERS_TABLE."

          WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST;

*/

// ***** Ahora ********

if (($user_info['user_level'] == ADMIN) && ($usuario <> "moderadores")) {

 $sql = "SELECT COUNT(*) AS users

          FROM ".USERS_TABLE."

          WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST;

}

else {

if (($user_info['user_level'] == ADMIN) && ($usuario == "moderadores")) {

 $sql = "SELECT COUNT(*) AS users

          FROM ".USERS_TABLE."

          WHERE user_level = 5";

 }

 }

if ($user_info['user_level'] == MODERADOR) {

 $sql = "SELECT COUNT(*) AS users

          FROM ".USERS_TABLE."

          WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST;

 }

////////// Fin nuevo tipo de usuario //////

ابحث عن

$sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_lastaction")."

            FROM ".USERS_TABLE."

            WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST."

            ORDER BY $orderby $direction

            LIMIT $limitstart, $limitnumber";

استبدل با

//// Nuevo tipo de usuario /////////////

  /* ***** Antes *********

    $sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_lastaction")."

            FROM ".USERS_TABLE."

            WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST."

            ORDER BY $orderby $direction

            LIMIT $limitstart, $limitnumber";

*/

// ***** Ahora *******

if (($user_info['user_level'] == ADMIN) && ($usuario <> "moderadores")) {

    $sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_lastaction")."

            FROM ".USERS_TABLE."

            WHERE $condition AND ".get_user_table_field("", "user_id")." <> ".GUEST."

            ORDER BY $orderby $direction

            LIMIT $limitstart, $limitnumber";

}

else {

if (($user_info['user_level'] == ADMIN) && ($usuario == "moderadores")) {

    $sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_lastaction")."

            FROM ".USERS_TABLE."

            WHERE user_level = 5";

}

}

if ($user_info['user_level'] == MODERADOR) {

    $sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_lastaction")."

            FROM ".USERS_TABLE."

            WHERE $condition AND user_level = 1 OR user_level = 2

            ORDER BY $orderby $direction

            LIMIT $limitstart, $limitnumber";

}

////////// Fin nuevo tipo de usuario //////

استبدلة با

show_text_link($lang['permissions'], "usergroups.php?action=editpermissions&user_id=".$user_row[$user_table_fields['user_id']]);

   show_text_link($lang['nav_usergroups'], "usergroups.php?action=edituser&user_id=".$user_row[$user_table_fields['user_id']]);

ابحث عن

//// Nuevo tipo de usuario /////////////

      /* ****** Antes *********

   show_text_link($lang['permissions'], "usergroups.php?action=editpermissions&user_id=".$user_row[$user_table_fields['user_id']]);

   show_text_link($lang['nav_usergroups'], "usergroups.php?action=edituser&user_id=".$user_row[$user_table_fields['user_id']]);

   */

   // ***** Ahora ********

   if ($user_info['user_level'] == ADMIN){

   show_text_link($lang['permissions'], "usergroups.php?action=editpermissions&user_id=".$user_row[$user_table_fields['user_id']]);

   show_text_link($lang['nav_usergroups'], "usergroups.php?action=edituser&user_id=".$user_row[$user_table_fields['user_id']]);

   }

    ////////// Fin nuevo tipo de usuario //////

ابحث عن

$user_invisible = intval($HTTP_POST_VARS['user_invisible_'.$i]);

اضف بعدة

////// Nuevo tipo de usuario //////

  $user_moderador_categorias = intval($HTTP_POST_VARS['user_moderador_categorias_'.$i]);

  $user_moderador_imagenes = intval($HTTP_POST_VARS['user_moderador_imagenes_'.$i]);

  $user_moderador_comentarios = intval($HTTP_POST_VARS['user_moderador_comentarios_'.$i]);

  $user_moderador_usuarios = intval($HTTP_POST_VARS['user_moderador_usuarios_'.$i]);

   ////////// Fin nuevo tipo de usuario ////////

ابحث عن

show_userlevel_select_row($lang['field_userlevel'], "user_level_".$i);

استبدل با

///// Nuevo tipo de usuario //////

     /* **** Antes *****

    show_userlevel_select_row($lang['field_userlevel'], "user_level_".$i);

    */

    // ******** Ahora ******

    if ($user_info['user_level'] == ADMIN){

    show_userlevel_select_row($lang['field_userlevel'], "user_level_".$i);

    }

    else {

    show_userlevel_select_row_moderadores($lang['field_userlevel'], "user_level_".$i);

    }

     ////////// Fin nuevo tipo de usuario ///////

ارسل الصفحة

install_moderador.php

الي الملف الرئيسي

install_moderador.php

للتحميل صفحة install_moderador.php

http://swalfbnat.com/up/download.php?filename=e7927667f3.rar

============

لاظهار عبارة مشرف في التعليقات

افتح

details.php

وابحث عن

      elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {

          $comment_user_info = $lang['userlevel_admin'];


واضف بداله

      elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {

          $comment_user_info = $lang['userlevel_admin'];


        }elseif ($comment_row[$i][$user_table_fields['user_level']] == MODERADOR){

          $comment_user_info = $lang['userlevel_moderador'];

        }

مثال :

http://www.143.ae/image/details.php?image_id=435

المشرف في التعليقات اسمه

هايف

Moderator

اللي حاب يلون يروح الـ

main.php

والموجوف في مجلد

lang

وهنا مثال

////// Nuevo tipo usuario /////

$lang['userlevel_moderador'] = "مشرف";

///// Fin nuevo tipo usuario ///////

نفيره الى

$lang['userlevel_moderador'] = "<font color='Gray'>مشرف</font>";

وهذا بيغير فقط المشرف

واذا تريد تغير اللون الى لون آخر غير

Gray

الى اللون المطلوب

واللي يريد يعتمد الالوان عندي

هذا هو الكود كامل

//-----------------------------------------------------

//--- Userlevel ---------------------------------------

//-----------------------------------------------------

$lang['userlevel_admin'] = "<font color='red'>مدير</font>";

$lang['userlevel_moderador'] = "<font color='Gray'>مشرف</font>";

$lang['userlevel_user'] = "<font color='Silver'>عضو</font>";

//$lang['userlevel_guest'] = "Guest";

وسلامتكم
author

ليست هناك تعليقات:

اضف تعليقك هنا