-
- :
-
-
-
- 0) {
- //m_sortt: Sort by Text
- echo ''.$METEXT['M_SORT_T'].' ';
- echo '
- '.$METEXT['SORTERHELP'].'
';
- } else {
- echo ' ';
- }
- //Both Members and Alias can have a own score:
- if ($sort_mem_name == 3) {
- echo ''.$METEXT['M_SORT_V'].' ';
- echo '
';
- } else {
- echo ' ';
- }
-
-
-
- //-------------------------------------------------------------
- // the picture:
-
- if ($pic_loc <> "") {
-
- if ($isalias > 0) {
- //is an alias:
- $query = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE member_id = '".$isalias."'");
- if($query->numRows() <> 1) {
- //Maybe delete alias here and then die??
- die("Error: No such member");
- }
- $aliasof = $query->fetchRow();
- $picfile = $aliasof['m_picture'];
- if ($picfile == "" OR $pic_loc == "") { $previewpic = WB_URL . '/modules/'.$mod_dir.'/img/nopic.jpg'; } else { $previewpic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc.'/'.$picfile; }
- if ( strpos($picfile, '//') !== false) {$previewpic = $picfile;}
- echo ' ';
- } else {
- //is NO alias, get picture selection:
- echo $TEXT['IMAGE'].":";
- // this piece of code scans the given directory and creates the selector
-
- if ($pic_loc == "") { $file_dir = "";} else { $file_dir= WB_PATH.'/'.MEDIA_DIRECTORY.'/'.$pic_loc; }
- $picfile = $fetch_content['m_picture'];
- if ($picfile == "" OR $pic_loc == "") { $previewpic = WB_URL.'/modules/'.$mod_dir.'/img/nopic.jpg'; } else { $previewpic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc.'/'.$picfile; }
-
- if ($show_picture == 2) { //Options
- $check_pic_dir=is_dir("$file_dir");
- if ($check_pic_dir=='1') {
- $pic_dir=opendir($file_dir);
-
- echo ''."\n";
- echo "None selected \n";
-
- while ($file=readdir($pic_dir)) {
- if ($file != "." && $file != "..") {
- if (ereg($listextensions,$file)) {
- echo "".$file." \n";
- }
- }
- }
- echo " \n";
- } else {
- echo $METEXT['DIRECTORY'].$pic_loc.$METEXT['NOT_EXIST'];
- }
- }
-
- if ($show_picture == 1) { //AJAX
-
- echo ' ';
- //echo '';
- echo ''.$METEXT['OPENPICTABLE'].'
';
- }
-
-
- if ( strpos($picfile, '//') !== false) {$previewpic = $picfile;}
- echo ' ';
-
- } //end is NO Alias
- } // end if ($pic_loc <> "")
-
- ?>
-
-
-
- ';
- $the_divend = '" style="width: 99%;" maxlength="255" />'."\n";
-
- if ($isalias > 0) {
- //________________________________________________
- //Is Alias:
- echo ' ';
-
- echo ''.$METEXT['IS_ALIAS_OF'].' ';
- echo $the_div.$aliasof['m_name'].'';
-
-
- foreach ($memberfieldorderarray as $posfieldname) {
-
- if ($posfieldname=='short1') {
- $m_short1 = stripslashes($aliasof['m_short1']);
- if ($m_short1 <> "") {echo $the_div.stripslashes($settings_fetch['t_short1']).': '.stripslashes($aliasof['m_short1']).'';}
- }
- if ($posfieldname=='long1') {
- $m_long1 = stripslashes($aliasof['m_long1']);
- if ($m_long1 <> "") {echo $the_div.stripslashes($settings_fetch['t_long1']).': '.stripslashes($aliasof['m_long1']).'';}
- }
- if ($posfieldname=='short2') {
- $m_short2 = stripslashes($aliasof['m_short2']);
- if ($m_short2 <> "") {echo $the_div.stripslashes($settings_fetch['t_short2']).': '.stripslashes($aliasof['m_short2']).'';}
- }
- if ($posfieldname=='long2') {
- $m_long2 = stripslashes($aliasof['m_long2']);
- if ($m_long2 <> "") {echo $the_div.stripslashes($settings_fetch['t_long2']).': '.stripslashes($aliasof['m_long2']).'';}
- }
- if ($posfieldname=='memberpage_id') {
- $m_memberpage_id = stripslashes($aliasof['m_memberpage_id']);
- if ($m_memberpage_id > 0 ) {echo $the_div.stripslashes($settings_fetch['t_memberpage_id']).': '.stripslashes($aliasof['m_memberpage_id']).'';}
- }
- if ($posfieldname=='link') {
- $m_link = stripslashes($aliasof['m_link']);
- if ($m_link <> "") {echo $the_div.stripslashes($settings_fetch['t_link']).': '.stripslashes($aliasof['m_link']).'';}
- }
- }
-
- } else {
- //________________________________________________
- //is NO alias:
-
- $html_spch = 0;
- echo $the_div.$TEXT['NAME'].' ';
- } else { // use a simple area:
- echo $the_div.stripslashes($settings_fetch['t_long1']).': ';
- }
- }
- }
- if ($posfieldname=='short2') {
- if ($settings_fetch['t_short2'] <> '') {
- echo $the_div.stripslashes($settings_fetch['t_short2']).': ';
- } else { // use a simple area:
- echo $the_div.stripslashes($settings_fetch['t_long2']).': ';
- }
- }
- }
- if ($posfieldname=='link') {
- if ($settings_fetch['t_link'] <> '') { echo $the_div.stripslashes($settings_fetch['t_link']).': numRows() == 1) {
- $fetch_pages = $query_pages->fetchRow();
- $thememp = '(found: '.$fetch_pages['link'].PAGE_EXTENSION.')';
- } else {
- $thememp = 'page_id '.$memp.' not found ';
- }
- }
- echo "\n".$the_div.stripslashes($settings_fetch['t_memberpage_id']).': '.$thememp.' '."\n";
- }
- }
- } //end foreach
- //echo ''; if ($html_allowed != 1) {echo $METEXT['HTMLNOTALLOWED']; } else {echo $METEXT['HTMLALLOWED']; } echo '
';
- } //end is NO alias
-
- // Members AND Alias:
- echo ''.$TEXT['ACTIVE']; ?>:
-
/>
-
-
/>
-
-
-
- "") { echo '
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+ 0) {
+ //m_sortt: Sort by Text
+ echo ''.$METEXT['M_SORT_T'].' ';
+ echo '
+ '.$METEXT['SORTERHELP'].'
';
+ } else {
+ echo ' ';
+ }
+ //Both Members and Alias can have a own score:
+ if ($sort_mem_name == 3) {
+ echo ''.$METEXT['M_SORT_V'].' ';
+ echo '
';
+ } else {
+ echo ' ';
+ }
+
+
+
+ //-------------------------------------------------------------
+ // the picture:
+
+ if ($pic_loc <> "") {
+
+ if ($isalias > 0) {
+ //is an alias:
+ $query = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE member_id = '".$isalias."'");
+ if($query->numRows() <> 1) {
+ //Maybe delete alias here and then die??
+ die("Error: No such member");
+ }
+ $aliasof = $query->fetchRow();
+ $picfile = $aliasof['m_picture'];
+ if ($picfile == "" OR $pic_loc == "") { $previewpic = WB_URL . '/modules/'.$mod_dir.'/img/nopic.jpg'; } else { $previewpic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc.'/'.$picfile; }
+ if ( strpos($picfile, '//') !== false) {$previewpic = $picfile;}
+ echo ' ';
+ } else {
+ //is NO alias, get picture selection:
+ echo $TEXT['IMAGE'].":";
+ // this piece of code scans the given directory and creates the selector
+
+ if ($pic_loc == "") { $file_dir = "";} else { $file_dir= WB_PATH.'/'.MEDIA_DIRECTORY.'/'.$pic_loc; }
+ $picfile = $fetch_content['m_picture'];
+ if ($picfile == "" OR $pic_loc == "") { $previewpic = WB_URL.'/modules/'.$mod_dir.'/img/nopic.jpg'; } else { $previewpic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc.'/'.$picfile; }
+
+ if ($show_picture == 2) { //Options
+ $check_pic_dir=is_dir("$file_dir");
+ if ($check_pic_dir=='1') {
+ $pic_dir=opendir($file_dir);
+
+ echo ''."\n";
+ echo "None selected \n";
+
+ while ($file=readdir($pic_dir)) {
+ if ($file != "." && $file != "..") {
+ if (preg_match($listextensions,$file)) {
+ echo "".$file." \n";
+ }
+ }
+ }
+ echo " \n";
+ } else {
+ echo $METEXT['DIRECTORY'].$pic_loc.$METEXT['NOT_EXIST'];
+ }
+ }
+
+ if ($show_picture == 1) { //AJAX
+
+ echo ' ';
+ //echo '';
+ echo ''.$METEXT['OPENPICTABLE'].'
';
+ }
+
+
+ if ( strpos($picfile, '//') !== false) {$previewpic = $picfile;}
+ echo ' ';
+
+ } //end is NO Alias
+ } // end if ($pic_loc <> "")
+
+ ?>
+
+
+
+ ';
+ $the_divend = '" style="width: 99%;" maxlength="255" />'."\n";
+
+ if ($isalias > 0) {
+ //________________________________________________
+ //Is Alias:
+ echo ' ';
+
+ echo ''.$METEXT['IS_ALIAS_OF'].' ';
+ echo $the_div.$aliasof['m_name'].'';
+
+
+ foreach ($memberfieldorderarray as $posfieldname) {
+
+ if ($posfieldname=='short1') {
+ $m_short1 = stripslashes($aliasof['m_short1']);
+ if ($m_short1 <> "") {echo $the_div.stripslashes($settings_fetch['t_short1']).': '.stripslashes($aliasof['m_short1']).'';}
+ }
+ if ($posfieldname=='long1') {
+ $m_long1 = stripslashes($aliasof['m_long1']);
+ if ($m_long1 <> "") {echo $the_div.stripslashes($settings_fetch['t_long1']).': '.stripslashes($aliasof['m_long1']).'';}
+ }
+ if ($posfieldname=='short2') {
+ $m_short2 = stripslashes($aliasof['m_short2']);
+ if ($m_short2 <> "") {echo $the_div.stripslashes($settings_fetch['t_short2']).': '.stripslashes($aliasof['m_short2']).'';}
+ }
+ if ($posfieldname=='long2') {
+ $m_long2 = stripslashes($aliasof['m_long2']);
+ if ($m_long2 <> "") {echo $the_div.stripslashes($settings_fetch['t_long2']).': '.stripslashes($aliasof['m_long2']).'';}
+ }
+ if ($posfieldname=='memberpage_id') {
+ $m_memberpage_id = stripslashes($aliasof['m_memberpage_id']);
+ if ($m_memberpage_id > 0 ) {echo $the_div.stripslashes($settings_fetch['t_memberpage_id']).': '.stripslashes($aliasof['m_memberpage_id']).'';}
+ }
+ if ($posfieldname=='link') {
+ $m_link = stripslashes($aliasof['m_link']);
+ if ($m_link <> "") {echo $the_div.stripslashes($settings_fetch['t_link']).': '.stripslashes($aliasof['m_link']).'';}
+ }
+ }
+
+ } else {
+ //________________________________________________
+ //is NO alias:
+
+ $html_spch = 0;
+ echo $the_div.$TEXT['NAME'].' ';
+ } else { // use a simple area:
+ echo $the_div.stripslashes($settings_fetch['t_long1']).': ';
+ }
+ }
+ }
+ if ($posfieldname=='short2') {
+ if ($settings_fetch['t_short2'] <> '') {
+ echo $the_div.stripslashes($settings_fetch['t_short2']).': ';
+ } else { // use a simple area:
+ echo $the_div.stripslashes($settings_fetch['t_long2']).': ';
+ }
+ }
+ }
+ if ($posfieldname=='link') {
+ if ($settings_fetch['t_link'] <> '') { echo $the_div.stripslashes($settings_fetch['t_link']).': numRows() == 1) {
+ $fetch_pages = $query_pages->fetchRow();
+ $thememp = '(found: '.$fetch_pages['link'].PAGE_EXTENSION.')';
+ } else {
+ $thememp = 'page_id '.$memp.' not found ';
+ }
+ }
+ echo "\n".$the_div.stripslashes($settings_fetch['t_memberpage_id']).': '.$thememp.' '."\n";
+ }
+ }
+ } //end foreach
+ //echo ''; if ($html_allowed != 1) {echo $METEXT['HTMLNOTALLOWED']; } else {echo $METEXT['HTMLALLOWED']; } echo '
';
+ } //end is NO alias
+
+ // Members AND Alias:
+ echo ''.$TEXT['ACTIVE']; ?>:
+
/>
+
+
/>
+
+
+
+ "") { echo '
+
+
+
@@ -423,13 +423,13 @@ function show_wysiwyg_editor($name,$id,$content,$width,$height) {
-
+
is_authenticated() && $admin->get_permission('member', 'module'))) {
- die("Sorry, no access!");
+ die("Sorry, no access!");
} else {
- $mod_dir = basename(dirname(__FILE__));
- // Load Language file
- if(LANGUAGE_LOADED) {
- if(!file_exists(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php')) {
- require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/EN.php');
- } else {
- require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php');
- }
- }
-
-
- require_once(WB_PATH.'/modules/'.$mod_dir.'/kram/module_settings.default.php');
- require_once(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php');
-
- // Get Settings
- $query_settings = $database->query("SELECT pic_loc,extensions FROM ".TABLE_PREFIX."mod_members_settings WHERE section_id = '$section_id'");
- $fetch_settings = $query_settings->fetchRow();
- $picture_dir = MEDIA_DIRECTORY.$fetch_settings['pic_loc'];
- echo '
+ $mod_dir = basename(dirname(__FILE__));
+ // Load Language file
+ if(LANGUAGE_LOADED) {
+ if(!file_exists(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php')) {
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/EN.php');
+ } else {
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php');
+ }
+ }
+
+
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/kram/module_settings.default.php');
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php');
+
+ // Get Settings
+ $query_settings = $database->query("SELECT pic_loc,extensions FROM ".TABLE_PREFIX."mod_members_settings WHERE section_id = '$section_id'");
+ $fetch_settings = $query_settings->fetchRow();
+ $picture_dir = MEDIA_DIRECTORY.$fetch_settings['pic_loc'];
+ echo '
';
-
- if ($picture_dir != '') {
-
- $file_dir= WB_PATH.''.$picture_dir;
-
- $check_pic_dir=is_dir("$file_dir");
- $allpreviews = '';
- if ($check_pic_dir=='1') {
- $pic_dir=opendir($file_dir);
- $picextensions = ".gif|.GIF|.jpg|.JPG|.png|.PNG|.jpeg|.JPEG";
-
- $listextensions = $fetch_settings['extensions'];
- if (''.$listextensions=='') {
- $listextensions = ".gif|.GIF|.jpg|.JPG|.png|.PNG|.jpeg|.JPEG";
- } else {
- $learray = explode(' ', $listextensions);
- $listextensions = '';
- foreach ($learray as $ext) {
- $listextensions .= '|.'.$ext.'|.'.strtoupper($ext);
- }
- $listextensions = substr($listextensions, 1, strlen($listextensions));
- }
-
-
-
- while ($file=readdir($pic_dir)) {
- if ($file != "." && $file != "..") {
- if (ereg($listextensions,$file)) {
- if (ereg($picextensions,$file)) {
- $thepreview = '
';
- } else {
- $showfile = str_replace('-',' ',$file);
- $showfile = str_replace('_',' ',$showfile);
- $thepreview = '
';
- }
- $allpreviews = $thepreview.$allpreviews;
- }
- }
- }
- echo $allpreviews;
- } else {
- echo $METEXT['DIRECTORY'].$picture_dir.$METEXT['NOT_EXIST'];
- }
-
- } else {
- echo $METEXT['DIRECTORY'].$picture_dir.$METEXT['NOT_EXIST'];
- }
-
- echo '
+
+ if ($picture_dir != '') {
+
+ $file_dir= WB_PATH.''.$picture_dir;
+
+ $check_pic_dir=is_dir("$file_dir");
+ $allpreviews = '';
+ if ($check_pic_dir=='1') {
+ $pic_dir=opendir($file_dir);
+ $picextensions = ".gif|.GIF|.jpg|.JPG|.png|.PNG|.jpeg|.JPEG";
+
+ $listextensions = $fetch_settings['extensions'];
+ if (''.$listextensions=='') {
+ $listextensions = ".gif|.GIF|.jpg|.JPG|.png|.PNG|.jpeg|.JPEG";
+ } else {
+ $learray = explode(' ', $listextensions);
+ $listextensions = '';
+ foreach ($learray as $ext) {
+ $listextensions .= '|.'.$ext.'|.'.strtoupper($ext);
+ }
+ $listextensions = substr($listextensions, 1, strlen($listextensions));
+ }
+
+
+
+ while ($file=readdir($pic_dir)) {
+ if ($file != "." && $file != "..") {
+ if (preg_match('#'.$listextensions.'#',$file)) {
+ if (preg_match('#'.$picextensions.'#',$file)) {
+ $thepreview = ' ';
+ } else {
+ $showfile = str_replace('-',' ',$file);
+ $showfile = str_replace('_',' ',$showfile);
+ $thepreview = '';
+ }
+ $allpreviews = $thepreview.$allpreviews;
+ }
+ }
+ }
+ echo $allpreviews;
+ } else {
+ echo $METEXT['DIRECTORY'].$picture_dir.$METEXT['NOT_EXIST'];
+ }
+
+ } else {
+ echo $METEXT['DIRECTORY'].$picture_dir.$METEXT['NOT_EXIST'];
+ }
+
+ echo '
';
-
-}
+
+}
?>
\ No newline at end of file
diff --git a/modify_settings.php b/modify_settings.php
old mode 100755
new mode 100644
index 28e2504..d8a0bf3
--- a/modify_settings.php
+++ b/modify_settings.php
@@ -49,68 +49,69 @@
if ($use_presets) { echo 'Presets '; }
if ($use_getfrom || $use_presets) echo " ";
-if ($use_getfrom) {
- echo '';
- echo '
- Get from:
- NOTE: the get-from option will change the setting. If you dont want to keep the changes, do NOT save!
';
-
+if ($use_getfrom) {
+ echo '';
+ echo '
+ Get from:
+ NOTE: the get-from option will change the setting. If you dont want to keep the changes, do NOT save!
';
+
}
-if ($use_presets) {
- //get presets
- $thelanguage = strtolower(LANGUAGE);
- if (!is_dir(WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage)) { $thelanguage = 'en';}
- $presets_files = WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage;
- echo '';
+if ($use_presets) {
+ //get presets
+ $thelanguage = strtolower(LANGUAGE);
+ if (!is_dir(WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage)) { $thelanguage = 'en';}
+ $presets_files = WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage;
+ echo '';
- echo '
+ echo '
Presets:
- NOTE: the presets-option will change the setting. If you dont want to keep the changes, do NOT save!
';
-
-
- }
+
+ $presets_dir = opendir($presets_files);
+ while ($file=readdir($presets_dir)) {
+ if ($file != "." && $file != "..") {
+ $fileextensions = ".js";
+ if (preg_match('#'.$fileextensions.'#',$file)) {
+ $filename = substr($file, 0, -3);
+ if ($filename == "default") continue;
+ echo ''.$filename.' ';
+ }
+ }
+ }
+ echo '
+ NOTE: the presets-option will change the setting. If you dont want to keep the changes, do NOT save!
';
+
+
+ }
echo ' ';
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members_settings WHERE section_id = '$section_id'");
-$fetch_content = $query_content->fetchRow();
+$fetch_content = $query_content->fetchRow();
//Default:
$longusage1 = 0; $longusage2 = 0;
@@ -119,14 +120,14 @@
if ($html_allowed > 2) {$longusage1 = 2; $longusage2 = 2;}
if(!isset($fetch_content['various_values'])){
- $database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `various_values` VARCHAR(255) NOT NULL DEFAULT ''");
- echo 'Database Field "various_values" added ';
+ $database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `various_values` VARCHAR(255) NOT NULL DEFAULT ''");
+ echo 'Database Field "various_values" added ';
} else {
- if ($fetch_content['various_values'] != '') {
- $vv = explode(',',$fetch_content['various_values']);
- $longusage1 = (int) $vv[0];
- $longusage2 = (int) $vv[1];
- }
+ if ($fetch_content['various_values'] != '') {
+ $vv = explode(',',$fetch_content['various_values']);
+ $longusage1 = (int) $vv[0];
+ $longusage2 = (int) $vv[1];
+ }
}
@@ -135,94 +136,94 @@
-
+
-
-
-
-
- :
- 20) {$thefieldcontentlines = 20;}
- echo '
-
-
-
- :
- 20) {$thefieldcontentlines = 20;}
- echo '
-
-
-
-
-
-
-
- 20) {$thefieldcontentlines = 20;}
- echo '
-
-
-
-
-
-
-
-
-
- 20) {$thefieldcontentlines = 20;}
- echo '
-
-
-
-
-
- 20) {$thefieldcontentlines = 20;}
- echo '
-
-
-
-
-
+
+
+
+
+ :
+ 20) {$thefieldcontentlines = 20;}
+ echo '
+
+
+
+ :
+ 20) {$thefieldcontentlines = 20;}
+ echo '
+
+
+
+
+
+
+
+ 20) {$thefieldcontentlines = 20;}
+ echo '
+
+
+
+
+
+
+
+
+
+ 20) {$thefieldcontentlines = 20;}
+ echo '
+
+
+
+
+
+ 20) {$thefieldcontentlines = 20;}
+ echo '
+
+
+
+
+
-
+
Open presets file '; }
+if ($use_presets == true) { echo 'Open presets file
'; }
echo "\n\n \n\n";
// Print admin footer
$admin->print_footer();
diff --git a/modify_sort.php b/modify_sort.php
old mode 100755
new mode 100644
diff --git a/module_settings.php b/module_settings.php
new file mode 100644
index 0000000..756f24e
--- /dev/null
+++ b/module_settings.php
@@ -0,0 +1,38 @@
+
+
+ $previewpic_wha = 'width="150" alt="preview"'; //attribute of the preview pic (modify-member)
+
+?>
diff --git a/move_down.php b/move_down.php
old mode 100755
new mode 100644
diff --git a/move_up.php b/move_up.php
old mode 100755
new mode 100644
diff --git a/presets-en/asian-restaurant.js b/presets-en/asian-restaurant.js
old mode 100755
new mode 100644
diff --git a/presets-en/picture-menue.js b/presets-en/picture-menue.js
old mode 100755
new mode 100644
diff --git a/presets-en/portfolio-highslide.js b/presets-en/portfolio-highslide.js
old mode 100755
new mode 100644
diff --git a/presets-en/restaurant.js b/presets-en/restaurant.js
old mode 100755
new mode 100644
diff --git a/presets-en/speisekarte.js b/presets-en/speisekarte.js
old mode 100755
new mode 100644
diff --git a/presets-en/thumbshots.js b/presets-en/thumbshots.js
old mode 100755
new mode 100644
diff --git a/presets-en/turnier.js b/presets-en/turnier.js
old mode 100755
new mode 100644
diff --git a/save_group.php b/save_group.php
old mode 100755
new mode 100644
diff --git a/save_member.php b/save_member.php
old mode 100755
new mode 100644
diff --git a/save_settings.php b/save_settings.php
old mode 100755
new mode 100644
diff --git a/search.php b/search.php
old mode 100755
new mode 100644
diff --git a/uninstall.php b/uninstall.php
old mode 100755
new mode 100644
diff --git a/upgrade.php b/upgrade.php
old mode 100755
new mode 100644
index 2470764..f8ab684
--- a/upgrade.php
+++ b/upgrade.php
@@ -32,7 +32,7 @@
if($database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `extensions` VARCHAR(255) NOT NULL DEFAULT ''")) {
echo 'Database Field extensions added successfully ';
}
- echo ''.mysql_error().' ';
+ echo ''.mysqli_error().' ';
} else {
echo 'Database Field extensions exists, update not needed ';
}
@@ -41,7 +41,7 @@
if($database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `various_values` VARCHAR(255) NOT NULL DEFAULT ''")) {
echo 'Database Field various_values added successfully ';
}
- echo ''.mysql_error().' ';
+ echo ''.mysqli_error().' ';
} else {
echo 'Database Field various_values exists, update not needed ';
}
diff --git a/view.php b/view.php
old mode 100755
new mode 100644
index 5aa552c..c7cf936
--- a/view.php
+++ b/view.php
@@ -1,383 +1,383 @@
-
- Copyright (C) 2004-2007, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
-$mod_dir = basename(dirname(__FILE__));
-require(WB_PATH . '/modules/'.$mod_dir.'/kram/module_settings.default.php');
-require(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php');
-
-
-// Load Language file
-if(LANGUAGE_LOADED) {
- require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/EN.php');
- if(file_exists(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php')) {
- require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php');
- }
-}
-
-// Load CSS file
-// check if frontend.css file needs to be included into the of view.php
-if((!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/'.$mod_dir.'/frontend.css')) {
- echo '\n";
-
- echo '';
-}
-
-
-// Get information on what groups and members are sorted by
-$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members_settings WHERE section_id = '$section_id'");
-if($query_settings->numRows() <> 1) { die('No settings'); }
-$settings_fetch = $query_settings->fetchRow();
-
-$hide_email = (int)$settings_fetch['hide_email'];
-$pic_loc = $settings_fetch['pic_loc'];
-
-$sort_grp_name = $settings_fetch['sort_grp_name'];
-if ($sort_grp_name == 1) {$sort_grp_by = "group_name";} else {$sort_grp_by = "position";}
-
-
-//Handle long fields (text, html or wysiwyg)
-//Default:
-if ($html_allowed > 3) {$html_allowed = 3;}
-$longusage1 = 0; $longusage2 = 0;
-if ($html_allowed > 0) {$longusage1 = 1; $longusage2 = 1;}
-if ($html_allowed > 1) {$longusage1 = 2; $longusage2 = 0;}
-if ($html_allowed > 2) {$longusage1 = 2; $longusage2 = 2;}
-
-if(!isset($settings_fetch['various_values'])){
- $database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `various_values` VARCHAR(255) NOT NULL DEFAULT ''");
- echo 'Database Field "various_values" added ';
-} else {
- if ($settings_fetch['various_values'] != '') {
- $vv = explode(',',$settings_fetch['various_values']);
- $longusage1 = (int) $vv[0];
- $longusage2 = (int) $vv[1];
- }
-}
-
-$differentsorting = 0;
-if(isset($_GET['sort']) AND is_numeric($_GET['sort'])) {
- $differentsorting = (int)$_GET['sort'];
- $use_caching = 0;
-}
-
-
-
-
-
-
-$alloutput = '';
-
-// Loop through groups
-$query_groups = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members_groups WHERE section_id = '".$section_id."' AND active = '1' ORDER BY ".$sort_grp_by." ASC");
-
-if($query_groups->numRows() > 0) {
- $header = $settings_fetch['header'];
- $listgroup_links = 0;
- $listgroup_links_output = '';
- if ( strpos($header, '[LIST_GROUP_LINKS]') !== false) {$listgroup_links = 1;}
- if ( strpos($header, '[LIST_GROUP_LINKS_FULL]') !== false) {$listgroup_links = 2; $use_caching = 0;}
-
- $listmembers_links = 0;
- if ( strpos($settings_fetch['grp_head'], '[LIST_MEMBERS_LINKS]') !== false) {$listmembers_links = 1;}
-
-
-
-
- while($group = $query_groups->fetchRow()) {
- $group_id = (int)$group['group_id'];
-
- //Cache
- $output = '';
- if ($use_caching == 1) {
- $query_content = $database->query("SELECT group_cache FROM ".TABLE_PREFIX."mod_members_groups WHERE group_id = '$group_id'");
- if($query_content->numRows() > 0) {
- $fetch_cache = $query_content->fetchRow();
- $output = $fetch_cache['group_cache'];
- if (strlen($output) > 10) {
- $vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]' );
- $values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE);
- $output = str_replace($vars, $values, $output);
- $wb->preprocess($output);
- //echo cache and continue, dont do the rest.
- $alloutput .= $output; continue;
- }
- }
- }
-
- //create output and maybe rebuild cache:
- $output = '';
- $listmembers_links_output = '';
-
- $m_groupname = $group['group_name']; $f_groupname='';
- if ($m_groupname != '') {
- $f_groupname = '<'.$block_tag.' class="mgroup-name">'.$m_groupname.''.$block_tag.'>';
- if ($listgroup_links == 1) {$listgroup_links_output .= ''.$m_groupname." \n";}
- if ($listgroup_links == 2) {$listgroup_links_output .= ''.$m_groupname." \n\n";}
- }
-
- $m_groupdesc = nl2br($group['group_desc']); $f_groupdesc='';
- if ($m_groupdesc != '') { $f_groupdesc = '<'.$block_tag.' class="mgroup-desc">'.$m_groupdesc.''.$block_tag.'>'; }
-
-
-
-
- // Sort member by m_score - m_sortt - m_name or position
- $sort_mem_name = $settings_fetch['sort_mem_name'];
- $sort_mem_desc = $settings_fetch['sort_mem_desc'];
-
- // Sorting members by m_score - m_sortt - m_name or position
- if ($sort_mem_desc == 1) {$sort_ad = ' DESC';} else {$sort_ad = ' ASC';}
-
- if ($differentsorting != 0) { //different sorting by given parameter
- if ($differentsorting < 0) {
- $sort_ad = ' DESC';
- $sort_mem_name = -1 - $differentsorting;
- } else {
- $sort_ad = ' ASC';
- $sort_mem_name = $differentsorting - 1;
- }
- }
- $reversesorting = 0 - $differentsorting;
-
- $sort_by = "position".$sort_ad;
- // Sorting members by m_score - m_sortt - m_name or position
- if ($sort_mem_name == 1) {$sort_by = "m_name".$sort_ad;}
- if ($sort_mem_name == 2) {$sort_by = "m_sortt".$sort_ad.", m_name".$sort_ad;}
- if ($sort_mem_name == 3) {$sort_by = "m_score".$sort_ad.", m_sortt".$sort_ad.", m_name".$sort_ad;}
-
- // Query tem members in this group
- $query_members = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE group_id = '".$group_id."' AND active = '1' ORDER BY ".$sort_by );
- if($query_members->numRows() > 0) {
- $rowcount = 0;
- // Loop through all members in this group
- while($membersmember = $query_members->fetchRow()) {
- $member_id = (int)$membersmember['member_id'];
-
- $m_name = $membersmember['m_name'];
- if ($listmembers_links == 1) {$listmembers_links_output .= ''.$m_name.' ';}
- if ($listgroup_links > 1) {$listgroup_links_output .= ''.$m_name.' ';}
-
- $the_score = (int)$membersmember['m_score'];
- if ($the_score > 0) { $m_score = ''.$the_score; $f_score = ''.$m_score.'
'; } else {$m_score = ''; $f_score = '';}
-
-
-
- $isalias = (int)$membersmember['m_isalias'];
- if ($isalias == 0) {
- $the_member = $membersmember;
- } else {
- $query_alias = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE member_id = '".$isalias."'");
- $the_member = $query_alias->fetchRow();
- }
-
- $rowcount++;
- $mrow = $rowcount % 2;
-
- $m_sortt = $the_member['m_sortt']; $f_sortt='';
- if ($m_sortt != '') { $f_sortt = '<'.$block_tag.' class="member-sortt">'.$m_sortt.''.$block_tag.'>'; }
-
-
- /* Aus member 0.7
- $m_short1 = $the_member['m_short1']; $f_short1='';
- if ($settings_fetch['t_short1'] == '') {$m_short1 = ''; $f_short1 = '';} else {
- $m_short1 = stripslashes($m_short1);
- if ($backslash_to_br) $m_short1 = str_replace('\\', ' ', $m_short1);
- }
-
- $m_long1 = $the_member['m_long1']; $f_long1='';
- if ($settings_fetch['t_long1'] == '') { $m_long1 = ''; $f_long1 = ''; } else { if ($longusage1 == 0) { $m_long1 = nl2br(strip_tags($m_long1));} }
- if ($m_long1 != '') { $f_long1 = '<'.$block_tag.' class="member-long1">'.$m_long1.''.$block_tag.'>'; }
- */
-
-
- $f_short1 = ''; $m_short1 = '';
- if ($settings_fetch['t_short1'] != '') {
- $m_short1 = stripslashes($the_member['m_short1']);
- //$m_short1 = $the_member['m_short1'];
- if ($backslash_to_br) $m_short1 = str_replace('\\', ' ', $m_short1);
- $f_short1 = '<'.$block_tag.' class="member-short1">'.$m_short1.''.$block_tag.'>';
- }
-
- $f_long1 = ''; $m_long1 = '';
- if ($settings_fetch['t_long1'] != '') {
- //$m_long1 = stripslashes($the_member['m_long1']);
- $m_long1 = $the_member['m_long1'];
- if ($longusage1 == 0) { $m_long1 = nl2br(strip_tags($m_long1));}
- $f_long1 = '<'.$block_tag.' class="member-long1">'.$m_long1.''.$block_tag.'>';
- }
-
- $f_short2 = ''; $m_short2 = '';
- if ($settings_fetch['t_short2'] != '') {
- $m_short2 = stripslashes($the_member['m_short2']);
- //$m_short1 = $the_member['m_short2'];
- if ($backslash_to_br) $m_short2 = str_replace('\\', ' ', $m_short2);
- $f_short2 = '<'.$block_tag.' class="member-short2">'.$m_short2.''.$block_tag.'>';
- }
-
- $f_long2 = ''; $m_long2 = '';
- if ($settings_fetch['t_long2'] != '') {
- //$m_long2 = stripslashes($the_member['m_long2']);
- $m_long2 = $the_member['m_long2'];
- if ($longusage1 == 0) { $m_long2 = nl2br(strip_tags($m_long2));}
- $f_long2 = '<'.$block_tag.' class="member-long2">'.$m_long2.''.$block_tag.'>';
- }
-
-
-
- //m_link: could be: Mail, Link or Text
- $m_link = $the_member['m_link']; $f_link ='';
- if ($m_link != '') {
- require_once(WB_PATH.'/modules/'.$mod_dir.'/kram/functions.inc.php');
- $m_link = convert_member_link ($m_link, $hide_email);
- $f_link = '<'.$block_tag.' class="member-link">'.$m_link.''.$block_tag.'>';
- }
-
- //m_memberpage_id: must be a valid page_id
- $m_memberpage = '';
- $f_memberpage = '';
- $m_memberpage_id = (int)$the_member['m_memberpage_id'];
- if ($m_memberpage_id > 0) {
- $query_pages= $database->query("SELECT link, page_title FROM ".TABLE_PREFIX."pages WHERE page_id = '$m_memberpage_id'");
- if($query_pages->numRows() <> 1) {
- $m_memberpage = '';
- } else {
- $pages_fetch = $query_pages->fetchRow();
- $memberpage_text = $pages_fetch['page_title'];
- if ($use_caching == 1) {
- $m_memberpage = '[wblink'.$m_memberpage_id.']';
- $f_memberpage = '<'.$block_tag.' class="member-page">'.$memberpage_text.' '.$block_tag.'>';
- } else {
- $pagelink = PAGES_DIRECTORY.$pages_fetch['link'].PAGE_EXTENSION;
- $m_memberpage = WB_URL.$pagelink;
- $f_memberpage = '<'.$block_tag.' class="member-page">'.$memberpage_text.' '.$block_tag.'>';
- }
- }
- }
-
- $picname = ''.$the_member['m_picture'];
- if ($picname == '') {
- $members_pic = WB_URL. '/modules/'.$mod_dir.'/img/nopic.jpg';
- } else {
- if ( strpos($picname, '://') !== false) {$members_pic = $picname;} else { $members_pic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc . '/' . $picname; }
- }
-
-
-
- $vars = array( '[MEMBER_ID]', '[GROUP_ID]', '[IS_ALIAS]', '[PICNAME]', '[PICTURE]', '[NAME]', '[SCORE]','[SHORT1]', '[LONG1]', '[SHORT2]', '[LONG2]', '[LINK]', '[MEMBERPAGE]', '[SORTT]', '[ROWCOUNT]', '[MROW]', '{SCORE}','{SHORT1}', '{LONG1}', '{SHORT2}', '{LONG2}', '{LINK}', '{MEMBERPAGE}', '{SORTT}' );
- $values = array ($member_id, $group_id, $isalias, $picname, $members_pic, $m_name, $m_score, $m_short1, $m_long1, $m_short2, $m_long2, $m_link, $m_memberpage, $m_sortt, $rowcount, $mrow, $f_score, $f_short1, $f_long1, $f_short2, $f_long2, $f_link, $f_memberpage, $f_sortt );
-
- //output:
- if ($listgroup_links > 1 OR $listmembers_links > 0) { $output .= ' ';}
- $output .= str_replace($vars, $values, $settings_fetch['member_loop']);
-
- //if ($listgroup_links == 2) {$listgroup_links_output .= "\n \n \n";}
-
- }
- }
- if ($listgroup_links == 2) {$listgroup_links_output .= "\n\n\n";}
-
- //Group Header
-
-
- $vars = array( '[GROUPNAME]', '[GROUPDESC]', '[GROUP_ID]', '{GROUPNAME}', '{GROUPDESC}' );
- $values = array ($m_groupname, $m_groupdesc, $group_id, $f_groupname, $f_groupdesc);
- $groupheader = str_replace($vars, $values, $settings_fetch['grp_head']);
- if ($listmembers_links == 1) {
- $listmembers_links_output = ''.$listmembers_links_output.' ';
- $groupheader = str_replace('[LIST_MEMBERS_LINKS]', $listmembers_links_output, $groupheader);
- }
- if ($listgroup_links > 0) { $groupheader = ' '.$groupheader;}
- //Group Output
- $output = $groupheader.$output.$settings_fetch['grp_foot'];
- //Some values will not be cached, because the might have been changed in the meantime.
-
- //Prepare str_replace
- $vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]' );
- $values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE);
-
- //If we came here, the cache has to be rebuilt sometimes:
-
- //if one is logged in, we allways rebuild it; because most admins have a look at their pages before they log out.
- //So this will be the best way.
- if ($use_caching == 1 OR $wb->is_authenticated() ) {
- if ($differentsorting == 0) { //dont change cache, if sorting is different
- $database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_cache= '".$output."' WHERE group_id = '$group_id' ");
-
- //Prepare for search:
- $text = str_replace($vars, $values, $output);
- $text = strip_tags($text);
- $text = preg_replace('/\s+/', ' ', $text);
- $text = addslashes($text);
- $database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_search= '".$text."' WHERE group_id = '$group_id' ");
- echo "\n\n";
- }
- }
-
-
- $output = str_replace($vars, $values, $output);
- $wb->preprocess($output);
- $alloutput .= stripslashes($output);
-
- }
-
-}
-
-// Print header
-//echo "";
-$header = stripslashes($settings_fetch['header']);
-$vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]', '[REVERSESORTING]' );
-$values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE, $reversesorting);
-$header = str_replace($vars, $values, $header);
-
-//Footer
-$footer = stripslashes($settings_fetch['footer']);
-$footer = str_replace($vars, $values, $footer);
-
-if ($listgroup_links == 1) {
- $listgroup_links_output = ''.$listgroup_links_output.' ';
- $header = str_replace('[LIST_GROUP_LINKS]', $listgroup_links_output, $header);
-}
-if ($listgroup_links == 2) {
- $listgroup_links_output = ''.$listgroup_links_output.' ';
- $header = str_replace('[LIST_GROUP_LINKS_FULL]', $listgroup_links_output, $header);
-}
-
-echo $header;
-
-echo $alloutput;
-
-echo $footer;
-
+
+ Copyright (C) 2004-2007, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
+$mod_dir = basename(dirname(__FILE__));
+require(WB_PATH . '/modules/'.$mod_dir.'/kram/module_settings.default.php');
+require(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php');
+
+
+// Load Language file
+if(LANGUAGE_LOADED) {
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/EN.php');
+ if(file_exists(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php')) {
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/languages/'.LANGUAGE.'.php');
+ }
+}
+
+// Load CSS file
+// check if frontend.css file needs to be included into the of view.php
+if((!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/'.$mod_dir.'/frontend.css')) {
+ echo '\n";
+
+ echo '';
+}
+
+
+// Get information on what groups and members are sorted by
+$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members_settings WHERE section_id = '$section_id'");
+if($query_settings->numRows() <> 1) { die('No settings'); }
+$settings_fetch = $query_settings->fetchRow();
+
+$hide_email = (int)$settings_fetch['hide_email'];
+$pic_loc = $settings_fetch['pic_loc'];
+
+$sort_grp_name = $settings_fetch['sort_grp_name'];
+if ($sort_grp_name == 1) {$sort_grp_by = "group_name";} else {$sort_grp_by = "position";}
+
+
+//Handle long fields (text, html or wysiwyg)
+//Default:
+if ($html_allowed > 3) {$html_allowed = 3;}
+$longusage1 = 0; $longusage2 = 0;
+if ($html_allowed > 0) {$longusage1 = 1; $longusage2 = 1;}
+if ($html_allowed > 1) {$longusage1 = 2; $longusage2 = 0;}
+if ($html_allowed > 2) {$longusage1 = 2; $longusage2 = 2;}
+
+if(!isset($settings_fetch['various_values'])){
+ $database->query("ALTER TABLE `".TABLE_PREFIX."mod_members_settings` ADD `various_values` VARCHAR(255) NOT NULL DEFAULT ''");
+ echo 'Database Field "various_values" added ';
+} else {
+ if ($settings_fetch['various_values'] != '') {
+ $vv = explode(',',$settings_fetch['various_values']);
+ $longusage1 = (int) $vv[0];
+ $longusage2 = (int) $vv[1];
+ }
+}
+
+$differentsorting = 0;
+if(isset($_GET['sort']) AND is_numeric($_GET['sort'])) {
+ $differentsorting = (int)$_GET['sort'];
+ $use_caching = 0;
+}
+
+
+
+
+
+
+$alloutput = '';
+
+// Loop through groups
+$query_groups = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members_groups WHERE section_id = '".$section_id."' AND active = '1' ORDER BY ".$sort_grp_by." ASC");
+
+if($query_groups->numRows() > 0) {
+ $header = $settings_fetch['header'];
+ $listgroup_links = 0;
+ $listgroup_links_output = '';
+ if ( strpos($header, '[LIST_GROUP_LINKS]') !== false) {$listgroup_links = 1;}
+ if ( strpos($header, '[LIST_GROUP_LINKS_FULL]') !== false) {$listgroup_links = 2; $use_caching = 0;}
+
+ $listmembers_links = 0;
+ if ( strpos($settings_fetch['grp_head'], '[LIST_MEMBERS_LINKS]') !== false) {$listmembers_links = 1;}
+
+
+
+
+ while($group = $query_groups->fetchRow()) {
+ $group_id = (int)$group['group_id'];
+
+ //Cache
+ $output = '';
+ if ($use_caching == 1) {
+ $query_content = $database->query("SELECT group_cache FROM ".TABLE_PREFIX."mod_members_groups WHERE group_id = '$group_id'");
+ if($query_content->numRows() > 0) {
+ $fetch_cache = $query_content->fetchRow();
+ $output = $fetch_cache['group_cache'];
+ if (strlen($output) > 10) {
+ $vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]' );
+ $values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE);
+ $output = str_replace($vars, $values, $output);
+ //echo cache and continue, dont do the rest.
+ $alloutput .= $output; continue;
+ }
+ }
+ }
+
+ //create output and maybe rebuild cache:
+ $output = '';
+ $listmembers_links_output = '';
+
+ $m_groupname = $group['group_name']; $f_groupname='';
+ if ($m_groupname != '') {
+ $f_groupname = '<'.$block_tag.' class="mgroup-name">'.$m_groupname.''.$block_tag.'>';
+ if ($listgroup_links == 1) {$listgroup_links_output .= ''.$m_groupname." \n";}
+ if ($listgroup_links == 2) {$listgroup_links_output .= ''.$m_groupname." \n\n";}
+ }
+
+ $m_groupdesc = nl2br($group['group_desc']); $f_groupdesc='';
+ if ($m_groupdesc != '') { $f_groupdesc = '<'.$block_tag.' class="mgroup-desc">'.$m_groupdesc.''.$block_tag.'>'; }
+
+
+
+
+ // Sort member by m_score - m_sortt - m_name or position
+ $sort_mem_name = $settings_fetch['sort_mem_name'];
+ $sort_mem_desc = $settings_fetch['sort_mem_desc'];
+
+ // Sorting members by m_score - m_sortt - m_name or position
+ if ($sort_mem_desc == 1) {$sort_ad = ' DESC';} else {$sort_ad = ' ASC';}
+
+ if ($differentsorting != 0) { //different sorting by given parameter
+ if ($differentsorting < 0) {
+ $sort_ad = ' DESC';
+ $sort_mem_name = -1 - $differentsorting;
+ } else {
+ $sort_ad = ' ASC';
+ $sort_mem_name = $differentsorting - 1;
+ }
+ }
+ $reversesorting = 0 - $differentsorting;
+
+ $sort_by = "position".$sort_ad;
+ // Sorting members by m_score - m_sortt - m_name or position
+ if ($sort_mem_name == 1) {$sort_by = "m_name".$sort_ad;}
+ if ($sort_mem_name == 2) {$sort_by = "m_sortt".$sort_ad.", m_name".$sort_ad;}
+ if ($sort_mem_name == 3) {$sort_by = "m_score".$sort_ad.", m_sortt".$sort_ad.", m_name".$sort_ad;}
+
+ // Query tem members in this group
+ $query_members = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE group_id = '".$group_id."' AND active = '1' ORDER BY ".$sort_by );
+ if($query_members->numRows() > 0) {
+ $rowcount = 0;
+ // Loop through all members in this group
+ while($membersmember = $query_members->fetchRow()) {
+ $member_id = (int)$membersmember['member_id'];
+
+ $m_name = $membersmember['m_name'];
+ if ($listmembers_links == 1) {$listmembers_links_output .= ''.$m_name.' ';}
+ if ($listgroup_links > 1) {$listgroup_links_output .= ''.$m_name.' ';}
+
+ $the_score = (int)$membersmember['m_score'];
+ if ($the_score > 0) { $m_score = ''.$the_score; $f_score = ''.$m_score.'
'; } else {$m_score = ''; $f_score = '';}
+
+
+
+ $isalias = (int)$membersmember['m_isalias'];
+ if ($isalias == 0) {
+ $the_member = $membersmember;
+ } else {
+ $query_alias = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_members WHERE member_id = '".$isalias."'");
+ $the_member = $query_alias->fetchRow();
+ }
+
+ $rowcount++;
+ $mrow = $rowcount % 2;
+
+ $m_sortt = $the_member['m_sortt']; $f_sortt='';
+ if ($m_sortt != '') { $f_sortt = '<'.$block_tag.' class="member-sortt">'.$m_sortt.''.$block_tag.'>'; }
+
+
+ /* Aus member 0.7
+ $m_short1 = $the_member['m_short1']; $f_short1='';
+ if ($settings_fetch['t_short1'] == '') {$m_short1 = ''; $f_short1 = '';} else {
+ $m_short1 = stripslashes($m_short1);
+ if ($backslash_to_br) $m_short1 = str_replace('\\', ' ', $m_short1);
+ }
+
+ $m_long1 = $the_member['m_long1']; $f_long1='';
+ if ($settings_fetch['t_long1'] == '') { $m_long1 = ''; $f_long1 = ''; } else { if ($longusage1 == 0) { $m_long1 = nl2br(strip_tags($m_long1));} }
+ if ($m_long1 != '') { $f_long1 = '<'.$block_tag.' class="member-long1">'.$m_long1.''.$block_tag.'>'; }
+ */
+
+
+ $f_short1 = ''; $m_short1 = '';
+ if ($settings_fetch['t_short1'] != '') {
+ $m_short1 = stripslashes($the_member['m_short1']);
+ //$m_short1 = $the_member['m_short1'];
+ if ($backslash_to_br) $m_short1 = str_replace('\\', ' ', $m_short1);
+ $f_short1 = '<'.$block_tag.' class="member-short1">'.$m_short1.''.$block_tag.'>';
+ }
+
+ $f_long1 = ''; $m_long1 = '';
+ if ($settings_fetch['t_long1'] != '') {
+ //$m_long1 = stripslashes($the_member['m_long1']);
+ $m_long1 = $the_member['m_long1'];
+ if ($longusage1 == 0) { $m_long1 = nl2br(strip_tags($m_long1));}
+ $f_long1 = '<'.$block_tag.' class="member-long1">'.$m_long1.''.$block_tag.'>';
+ }
+
+ $f_short2 = ''; $m_short2 = '';
+ if ($settings_fetch['t_short2'] != '') {
+ $m_short2 = stripslashes($the_member['m_short2']);
+ //$m_short1 = $the_member['m_short2'];
+ if ($backslash_to_br) $m_short2 = str_replace('\\', ' ', $m_short2);
+ $f_short2 = '<'.$block_tag.' class="member-short2">'.$m_short2.''.$block_tag.'>';
+ }
+
+ $f_long2 = ''; $m_long2 = '';
+ if ($settings_fetch['t_long2'] != '') {
+ //$m_long2 = stripslashes($the_member['m_long2']);
+ $m_long2 = $the_member['m_long2'];
+ if ($longusage1 == 0) { $m_long2 = nl2br(strip_tags($m_long2));}
+ $f_long2 = '<'.$block_tag.' class="member-long2">'.$m_long2.''.$block_tag.'>';
+ }
+
+
+
+ //m_link: could be: Mail, Link or Text
+ $m_link = $the_member['m_link']; $f_link ='';
+ if ($m_link != '') {
+ require_once(WB_PATH.'/modules/'.$mod_dir.'/kram/functions.inc.php');
+ $m_link = convert_member_link ($m_link, $hide_email);
+ $f_link = '<'.$block_tag.' class="member-link">'.$m_link.''.$block_tag.'>';
+ }
+
+ //m_memberpage_id: must be a valid page_id
+ $m_memberpage = '';
+ $f_memberpage = '';
+ $f_memberpage_link = '';
+ $m_memberpage_id = (int)$the_member['m_memberpage_id'];
+ if ($m_memberpage_id > 0) {
+ $query_pages= $database->query("SELECT link, page_title FROM ".TABLE_PREFIX."pages WHERE page_id = '$m_memberpage_id'");
+ if($query_pages->numRows() <> 1) {
+ $m_memberpage = '';
+ } else {
+ $pages_fetch = $query_pages->fetchRow();
+ $memberpage_text = $pages_fetch['page_title'];
+ if ($use_caching == 1) {
+ $m_memberpage = '[wblink'.$m_memberpage_id.']';
+ $f_memberpage = '<'.$block_tag.' class="member-page">'.$memberpage_text.' '.$block_tag.'>';
+ } else {
+ $pagelink = PAGES_DIRECTORY.$pages_fetch['link'].PAGE_EXTENSION;
+ $m_memberpage = WB_URL.$pagelink;
+ $f_memberpage = '<'.$block_tag.' class="member-page">'.$memberpage_text.' '.$block_tag.'>';
+ $f_memberpage_link = '';
+ }
+ }
+ }
+
+ $picname = ''.$the_member['m_picture'];
+ if ($picname == '') {
+ $members_pic = WB_URL. '/modules/'.$mod_dir.'/img/nopic.jpg';
+ } else {
+ if ( strpos($picname, '://') !== false) {$members_pic = $picname;} else { $members_pic = WB_URL.''.MEDIA_DIRECTORY.''.$pic_loc . '/' . $picname; }
+ }
+
+
+
+ $vars = array( '[MEMBER_ID]', '[GROUP_ID]', '[IS_ALIAS]', '[PICNAME]', '[PICTURE]', '[NAME]', '[SCORE]','[SHORT1]', '[LONG1]', '[SHORT2]', '[LONG2]', '[LINK]', '[MEMBERPAGE]', '[SORTT]', '[ROWCOUNT]', '[MROW]', '{SCORE}','{SHORT1}', '{LONG1}', '{SHORT2}', '{LONG2}', '{LINK}', '{MEMBERPAGE}', '{SORTT}', '[MY_LINK]' );
+ $values = array ($member_id, $group_id, $isalias, $picname, $members_pic, $m_name, $m_score, $m_short1, $m_long1, $m_short2, $m_long2, $m_link, $m_memberpage, $m_sortt, $rowcount, $mrow, $f_score, $f_short1, $f_long1, $f_short2, $f_long2, $f_link, $f_memberpage, $f_sortt, $f_memberpage_link );
+
+ //output:
+ if ($listgroup_links > 1 OR $listmembers_links > 0) { $output .= ' ';}
+ $output .= str_replace($vars, $values, $settings_fetch['member_loop']);
+
+ //if ($listgroup_links == 2) {$listgroup_links_output .= "\n \n \n";}
+
+ }
+ }
+ if ($listgroup_links == 2) {$listgroup_links_output .= "\n\n\n";}
+
+ //Group Header
+
+
+ $vars = array( '[GROUPNAME]', '[GROUPDESC]', '[GROUP_ID]', '{GROUPNAME}', '{GROUPDESC}' );
+ $values = array ($m_groupname, $m_groupdesc, $group_id, $f_groupname, $f_groupdesc);
+ $groupheader = str_replace($vars, $values, $settings_fetch['grp_head']);
+ if ($listmembers_links == 1) {
+ $listmembers_links_output = ''.$listmembers_links_output.' ';
+ $groupheader = str_replace('[LIST_MEMBERS_LINKS]', $listmembers_links_output, $groupheader);
+ }
+ if ($listgroup_links > 0) { $groupheader = ' '.$groupheader;}
+ //Group Output
+ $output = $groupheader.$output.$settings_fetch['grp_foot'];
+ //Some values will not be cached, because the might have been changed in the meantime.
+
+ //Prepare str_replace
+ $vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]' );
+ $values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE);
+
+ //If we came here, the cache has to be rebuilt sometimes:
+
+ //if one is logged in, we allways rebuild it; because most admins have a look at their pages before they log out.
+ //So this will be the best way.
+ if ($use_caching == 1 OR $wb->is_authenticated() ) {
+ if ($differentsorting == 0) { //dont change cache, if sorting is different
+ $database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_cache= '".$output."' WHERE group_id = '$group_id' ");
+
+ //Prepare for search:
+ $text = str_replace($vars, $values, $output);
+ $text = strip_tags($text);
+ $text = preg_replace('/\s+/', ' ', $text);
+ $text = addslashes($text);
+ $database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_search= '".$text."' WHERE group_id = '$group_id' ");
+ echo "\n\n";
+ }
+ }
+
+
+ $output = str_replace($vars, $values, $output);
+ $alloutput .= stripslashes($output);
+
+ }
+
+}
+
+// Print header
+//echo "";
+$header = stripslashes($settings_fetch['header']);
+$vars = array( '[WB_URL]', '[PAGE_TITLE]', '[MENU_TITLE]', '[PAGES_DIRECTORY]', '[MEDIA_DIRECTORY]', '[LANGUAGE]', '[REVERSESORTING]' );
+$values = array (WB_URL, PAGE_TITLE, MENU_TITLE, PAGES_DIRECTORY, MEDIA_DIRECTORY, LANGUAGE, $reversesorting);
+$header = str_replace($vars, $values, $header);
+
+//Footer
+$footer = stripslashes($settings_fetch['footer']);
+$footer = str_replace($vars, $values, $footer);
+
+if ($listgroup_links == 1) {
+ $listgroup_links_output = ''.$listgroup_links_output.' ';
+ $header = str_replace('[LIST_GROUP_LINKS]', $listgroup_links_output, $header);
+}
+if ($listgroup_links == 2) {
+ $listgroup_links_output = ''.$listgroup_links_output.' ';
+ $header = str_replace('[LIST_GROUP_LINKS_FULL]', $listgroup_links_output, $header);
+}
+
+echo $header;
+
+echo $alloutput;
+
+echo $footer;
+
?>
\ No newline at end of file