Merge branch 'contrib' into 'master'
authorRoland Haeder <roland@mxchange.org>
Mon, 3 Feb 2014 19:20:11 +0000 (20:20 +0100)
committerRoland Haeder <roland@mxchange.org>
Mon, 3 Feb 2014 19:20:11 +0000 (20:20 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
Conflicts:
.gitattributes
.gitignore

51 files changed:
.gitattributes
.gitignore
contrib/autoreg_output.php [new file with mode: 0644]
contrib/autoreg_test.php [new file with mode: 0644]
contrib/captcha-base.xcf [new file with mode: 0644]
contrib/code_swarm/README [new file with mode: 0644]
contrib/code_swarm/mailer.config [new file with mode: 0644]
contrib/code_swarm/mailer.sh [new file with mode: 0755]
contrib/debug-lines.sh [new file with mode: 0755]
contrib/ext-partner/earnstar-datenimport.pdf [new file with mode: 0644]
contrib/final-checker.sh [new file with mode: 0755]
contrib/get_Global.php [new file with mode: 0644]
contrib/ideas/000-README.txt [new file with mode: 0644]
contrib/ideas/ext-affiliate.php [new file with mode: 0644]
contrib/ideas/ext-club.php [new file with mode: 0644]
contrib/ideas/ext-coupon.php [new file with mode: 0644]
contrib/ideas/ext-digit.php [new file with mode: 0644]
contrib/ideas/ext-engine.php [new file with mode: 0644]
contrib/ideas/ext-refund.php [new file with mode: 0644]
contrib/ideas/ext-shop.php [new file with mode: 0644]
contrib/ideas/ext-shredder.php [new file with mode: 0644]
contrib/ideas/ext-signup.php [new file with mode: 0644]
contrib/ideas/ext_coupon.tpl [new file with mode: 0644]
contrib/ideas/ext_signup.tpl [new file with mode: 0644]
contrib/install_svn.php [new file with mode: 0644]
contrib/interface_test.php [new file with mode: 0644]
contrib/lint.sh [new file with mode: 0755]
contrib/merge-exp.sh [new file with mode: 0755]
contrib/mt_konverter/AENDERUNGEN.txt [new file with mode: 0644]
contrib/mt_konverter/INHALT.txt [new file with mode: 0644]
contrib/mt_konverter/Lizenzdatei.txt [new file with mode: 0644]
contrib/mt_konverter/mt_mxchange_converter.php [new file with mode: 0644]
contrib/mt_konverter/readme_konverter.txt [new file with mode: 0644]
contrib/patch_core.sh [new file with mode: 0755]
contrib/prop-set.sh [new file with mode: 0755]
contrib/remove-deprecated.sh [new file with mode: 0755]
contrib/teaser.txt [new file with mode: 0644]
contrib/todo-builder.sh [new file with mode: 0755]
contrib/updater/.cmds.sh [new file with mode: 0755]
contrib/updater/.cms.sh [new file with mode: 0755]
contrib/updater/.config.sh [new file with mode: 0755]
contrib/updater/.cvs.sh [new file with mode: 0755]
contrib/updater/.extensions.sh [new file with mode: 0755]
contrib/updater/.ftp.sh [new file with mode: 0755]
contrib/updater/.functions.sh [new file with mode: 0755]
contrib/updater/.hp.sh [new file with mode: 0755]
contrib/updater/.themes.sh [new file with mode: 0755]
contrib/updater/LICENSE [new file with mode: 0644]
contrib/updater/cvs-updater.sh [new file with mode: 0755]
contrib/validator.sh [new file with mode: 0755]
contrib/wrapper.sh [new file with mode: 0755]

index c0556d8eadb2174eaaf4f601ade7e6675a3c46f0..39b1aedccde874a8c75a7b4fd39b92da463bfc4c 100644 (file)
@@ -33,6 +33,54 @@ application/mailer/templates/de/code/mailer_main.ctp svneol=native#text/plain
 application/mailer/templates/de/menu/.htaccess svneol=native#text/plain
 application/mailer/templates/de/menu/base_menu.xml svneol=native#text/plain
 application/mailer/templates/de/menu/generic_menu_entries.xml svneol=native#text/plain
+contrib/autoreg_output.php svneol=native#text/plain
+contrib/autoreg_test.php -text svneol=unset#text/plain
+contrib/captcha-base.xcf -text svneol=unset#application/x-xcf
+contrib/code_swarm/README -text
+contrib/code_swarm/mailer.config -text
+contrib/code_swarm/mailer.sh svneol=native#text/plain
+contrib/debug-lines.sh svneol=native#text/plain
+contrib/ext-partner/earnstar-datenimport.pdf -text svneol=unset#application/pdf
+contrib/final-checker.sh svneol=native#text/plain
+contrib/get_Global.php -text svneol=unset#text/plain
+contrib/ideas/000-README.txt svneol=native#text/plain
+contrib/ideas/ext-affiliate.php svneol=native#text/plain
+contrib/ideas/ext-club.php svneol=native#text/plain
+contrib/ideas/ext-coupon.php svneol=native#text/plain
+contrib/ideas/ext-digit.php svneol=native#text/plain
+contrib/ideas/ext-engine.php svneol=native#text/plain
+contrib/ideas/ext-refund.php svneol=native#text/plain
+contrib/ideas/ext-shop.php svneol=native#text/plain
+contrib/ideas/ext-shredder.php svneol=native#text/plain
+contrib/ideas/ext-signup.php svneol=native#text/plain
+contrib/ideas/ext_coupon.tpl svneol=native#text/plain
+contrib/ideas/ext_signup.tpl svneol=native#text/plain
+contrib/install_svn.php svneol=native#text/plain
+contrib/interface_test.php -text svneol=unset#text/plain
+contrib/lint.sh svneol=native#text/plain
+contrib/merge-exp.sh svneol=native#text/plain
+contrib/mt_konverter/AENDERUNGEN.txt svneol=native#text/plain
+contrib/mt_konverter/INHALT.txt svneol=native#text/plain
+contrib/mt_konverter/Lizenzdatei.txt svneol=native#text/plain
+contrib/mt_konverter/mt_mxchange_converter.php svneol=native#text/plain
+contrib/mt_konverter/readme_konverter.txt svneol=native#text/plain
+contrib/patch_core.sh svneol=native#text/plain
+contrib/prop-set.sh svneol=native#text/plain
+contrib/remove-deprecated.sh svneol=native#text/plain
+contrib/teaser.txt svneol=native#text/plain
+contrib/todo-builder.sh svneol=native#text/plain
+contrib/updater/.cmds.sh svneol=native#text/plain
+contrib/updater/.cms.sh svneol=native#text/plain
+contrib/updater/.config.sh svneol=native#text/plain
+contrib/updater/.cvs.sh svneol=native#text/plain
+contrib/updater/.extensions.sh svneol=native#text/plain
+contrib/updater/.ftp.sh svneol=native#text/plain
+contrib/updater/.functions.sh svneol=native#text/plain
+contrib/updater/.hp.sh svneol=native#text/plain
+contrib/updater/.themes.sh svneol=native#text/plain
+contrib/updater/LICENSE -text
+contrib/updater/cvs-updater.sh svneol=native#text/plain
+contrib/validator.sh svneol=native#text/plain
 db/.htaccess -text
 db/news/.htaccess -text
 docs/COPYING -text
index 5e4afd2d1a2425109d616696a58f967c0a29a4b7..fb5ab8be63f4384b60d8cedfb24f95350f859469 100644 (file)
@@ -1,3 +1,4 @@
 /.cache
 /.project
 /.settings
+contrib/seitwert_www_mxchange_org.pdf
diff --git a/contrib/autoreg_output.php b/contrib/autoreg_output.php
new file mode 100644 (file)
index 0000000..d2d13be
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+// Auto-registration module, decoded
+/* Dateiname */
+$dateiname = '/registrieren_send.php';
+/* Badword */
+$badword = 'Achtung:';
+/* HTTP-POST-Query zusammenbauen */
+$register .= 'formular_username='.$data['nickname'];
+$register .= '&formular_kennwort='.$data['kennwort'];
+$register .= '&anrede='.$data['anrede'];
+$register .= '&vorname='.$data['vorname'];
+$register .= '&nachname='.$data['nachname'];
+$register .= '&gtag='.$data['gtag'];
+$register .= '&gmonat='.$data['gmonat'];
+$register .= '&gjahr='.$data['gjahr'];
+$register .= '&strasse='.$data['strasse'];
+$register .= '&plz='.$data['plz'];
+$register .= '&stadt='.$data['ort'];
+$register .= '&land='.$data['land'];
+$register .= '&email='.$data['email'];
+$register .= '&art=Text';
+$register .= '&land='.$data['land'];
+$register .= '&newsletter=Ja';
+$register .= '&ref='.$anbieter['refid'];
+$register .= '&land='.$data['land'];
+$register .= '&k1=1';
+$register .= '&k2=1';
+$register .= '&k3=1';
+$register .= '&k4=1';
+$register .= '&k5=1';
+$register .= '&k6=1';
+$register .= '&k7=1';
+$register .= '&k8=1';
+$register .= '&k9=1';
+$register .= '&k10=1';
+$register .= '&k11=1';
+$register .= '&k12=1';
+$register .= '&k13=1';
+$register .= '&k14=1';
+$register .= '&k15=1';
+$register .= '&k16=1';
+$register .= '&k17=1';
+$register .= '&k18=1';
+$register .= '&k19=1';
+$register .= '&k20=1';
+$register .= '&k21=1';
+$register .= '&k22=1';
+$register .= '&agb=on';
+/* Die Registrierung abschicken */
+$url = parse_url($anbieter['reflink']);
+$reg = reg($url['host'],$dateiname,$register);
+/* Fehlercheck anhand des Badwords */
+if (stripos($reg,$badword) !== FALSE) $erfolg = FALSE;
+       else $erfolg = TRUE;
+?>
diff --git a/contrib/autoreg_test.php b/contrib/autoreg_test.php
new file mode 100644 (file)
index 0000000..76e51eb
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Test script for checking all requirements and optional PHP extensions for
+ * ext-autoreg. This is public domain software because I don't care what you do
+ * with it.
+ *
+ * If this script sets your computer on fire or eats your children, it is your
+ * OWN risk to use this software, but it may not do this.
+ */
+
+// Init counter variables
+$good = 0;
+$bad = 0;
+
+// Check for required base64_encode function
+if (function_exists('base64_encode')) {
+       // Required function exist
+       print basename(__FILE__) . ': BASE-64 support detected. <font color="green">Good!</font><br />';
+       $good++;
+} else {
+       print basename(__FILE__) . ': BASE-64 support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
+       $bad++;
+}
+
+// Check for required urlencode function
+if (function_exists('urlencode')) {
+       // Required function exist
+       print basename(__FILE__) . ': URL encode support detected. <font color="green">Good!</font><br />';
+       $good++;
+} else {
+       print basename(__FILE__) . ': URL encode support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
+       $bad++;
+}
+
+// Check for required gzcompress function
+if (function_exists('gzcompress')) {
+       // Required function exist
+       print basename(__FILE__) . ': GZIP support detected. <font color="green">Good!</font><br />';
+       $good++;
+} else {
+       print basename(__FILE__) . ': GZIP support <strong>NOT</strong> detected. <font color="red">Failed!</font> :-(<br />';
+       $bad++;
+}
+
+// Check for optional mcrypt_encrypt() function
+if (function_exists('mcrypt_encrypt')) {
+       // Optional function found, good!
+       print basename(__FILE__) . ': mcrypt support detected. <font color="green">Good</font>!<br />';
+       $good++;
+} else {
+       // Not detected, not bad but would be good to have
+       print basename(__FILE__) . ': mcrypt support <strong>NOT</strong> detected. <font color="yellow">Fix me!</font><br />';
+}
+
+// Output total result
+print '<br />';
+print 'Analysis summary: good=' . $good . ', bad=' . $bad . '<br />';
+print '<br />';
+print 'Result: ';
+
+// Is something missing?
+if ($bad > 0) {
+       // Some required functions not found!
+       print '<font color="red">Failed!</<font>';
+} else {
+       // All fine
+       print '<font color="green">Passed!</font>';
+}
+
+// [EOF]
+?>
diff --git a/contrib/captcha-base.xcf b/contrib/captcha-base.xcf
new file mode 100644 (file)
index 0000000..688f5d2
Binary files /dev/null and b/contrib/captcha-base.xcf differ
diff --git a/contrib/code_swarm/README b/contrib/code_swarm/README
new file mode 100644 (file)
index 0000000..f10963b
--- /dev/null
@@ -0,0 +1,110 @@
+code_swarm is an experiment in organic software visualization.\r
+\r
+See http://vis.cs.ucdavis.edu/~ogawa/codeswarm for a picture of what we want\r
+to produce.\r
+\r
+Google Code Project :      http://code.google.com/p/codeswarm/\r
+Google Group/Mailing List: http://groups.google.com/group/codeswarm \r
+\r
+\r
+I) How to build Java code_swarm in different environments.\r
+\r
+Please visit http://code.google.com/p/codeswarm/wiki/HowtoBuild for more \r
+detailed and up-to-date information.\r
+\r
+This quick guide explains how to setup your development environment to build\r
+the binary (ie. jar) version of code_swarm from Java sources.\r
+Explanations require at least an understanding of computing and of your\r
+Operating System, even if no Java skills are needed.\r
+\r
+I.1) Setup\r
+You will need the "Ant" software building tool, and Sun's Java Development Kit,\r
+version 1.5 or later (OpenJDK may work but is untested).\r
+\r
+I.1.a) Linux\r
+This guide is written with a Debian based Linux, Ubuntu 8.04. It requires\r
+some minor adaptation to use on other distribution (other packaging systems).\r
+\r
+ * install ant with the following command (or with your favorite graphical \r
+   package manager):\r
+     sudo apt-get install ant \r
+\r
+ * install sun-java-jdk 1.5 or 1.6 following your distribution recommendation \r
+    sudo apt-get install sun-java6-jdk \r
+\r
+ * configure the Java SDK to specify the new installation path, for instance \r
+   on Ubuntu: \r
+     sudo update-java-alternatives -s java-6-sun \r
+\r
+   See http://doc.ubuntu-fr.org/java\r
+\r
+I.1.b) Windows\r
+ * download ant for all platforms at http://ant.apache.org/bindownload.cgi\r
+\r
+ * unpack it where you want it to be installed, and add the location of\r
+   its binaries to the the "PATH" environment variable. For instance,\r
+   add at the end : "C:\apache-ant-1.7.0\bin;"\r
+\r
+ * download Sun Java SDK at http://java.sun.com/javase/downloads/index.jsp\r
+\r
+ * install it and add the "javac" Java compiler to the PATH : \r
+   "C:\Program Files\Java\jdk1.6.0_06\bin;" \r
+\r
+ * then create a new environment variable called JAVA_HOME and set its path to \r
+   something like "C:\Program Files\Java\jdk1.6.X", where X is the specific\r
+   version number.\r
+\r
+I.2) Getting the sources\r
+\r
+code_swarm sources are under a Google Code Subversion repository (svn) :\r
+http://codeswarm.googlecode.com/svn/trunk/\r
+\r
+See the Subversion homepage on subversion.tigris.org for all appropriate tools \r
+and documents. I would recommend "TortoiseSVN" for Windows users. \r
+Unix-like users should get their native "Subversion" package.\r
+\r
+See http://code.google.com/p/codeswarm/source/ for further instructions on\r
+how to browse and checkout the sources.\r
+\r
+I.3) Building the sources\r
+\r
+Quick build :\r
+ * Open a terminal/command line shell, change directory to the root of\r
+   the code_swarm source folder.\r
+\r
+ * Compile the sources by typing "ant".\r
+\r
+\r
+\r
+\r
+Other commands :\r
+ * "ant all" will also generate the Javadoc HTML sources documentation\r
+ * "ant clean" will delete all intermediate and binary files \r
+\r
+I.4) Running code_swarm\r
+\r
+These instructions are meant to be generic to cover most popular version\r
+control systems.\r
+Please visit http://code.google.com/p/codeswarm/wiki/GeneratingAVideo for more \r
+detailed and up-to-date information.\r
+\r
+ * Obtain the log from your software version control system.\r
+   Save it as a text file.\r
+\r
+ * Convert your log file to the code_swarm XML data format:\r
+     Change directory to "convert_logs."\r
+     Generally, the syntax is:\r
+\r
+         convert_logs.py -Y input_log.txt -o output.xml\r
+\r
+     where -Y is a flag for your particular version control system.\r
+     Type "convert_logs.py --help" for details.\r
+\r
+ * Create your own configuration by copying "data/sample.config" and editing \r
+   it to your preferences.\r
+\r
+ * To launch code_swarm, type "run.bat" in Windows or "run.sh" in Unix.\r
+   You will be prompted for the config file from the previous step.\r
+\r
+ * If you have specified TakeSnapshots=true in the config, saved images\r
+   will be in the "frames" directory.\r
diff --git a/contrib/code_swarm/mailer.config b/contrib/code_swarm/mailer.config
new file mode 100644 (file)
index 0000000..251184a
--- /dev/null
@@ -0,0 +1,131 @@
+# This is a sample configuration file for code_swarm
+
+# Frame width
+Width=800
+
+# Frame height
+Height=600
+
+# Input file
+InputFile=mailer.xml
+
+# Particle sprite file
+ParticleSpriteFile=src/particle.png
+
+#Font Settings
+Font=SansSerif
+BoldFont=SansSerif
+InfoFont=SansSerif
+FontSize=10
+BoldFontSize=14
+InfoFontSize=20
+
+# Project time per frame
+MillisecondsPerFrame=21600000
+
+# Maximum number of Background processes
+MaxThreads=4
+
+# Optional Method instead of MillisecondsPerFrame
+FramesPerDay=10
+
+# Background in R,G,B
+Background=0,0,0
+
+# Color assignment rules
+# Keep in order, do not skip numbers. Numbers start
+# at 1.
+# 
+# Pattern:  "Label", "regex", R,G,B, R,G,B
+# Label is optional.  If it is omitted, the regex
+# will be used.
+#
+ColorAssign1="Docs",".*.txt", 0,0,255, 0,0,255
+ColorAssign2="PHP",".*.php", 0,255,255, 0,255,255
+ColorAssign3="Template",".*.tpl", 102,0,255, 102,0,255
+ColorAssign4="CSS",".*.css", 255,0,0, 255,0,0
+ColorAssign5="JavaScript",".*.js", 255,255,0, 255,255,0
+ColorAssign6="Shell",".*.sh", 119,68,119, 119,68,119
+#ColorAssign7="Code6",".*src6.*", 136,51,17, 136,51,17
+#ColorAssign8="Code7",".*src7.*", 250,110,110, 250,110,130
+#ColorAssign9="Code8",".*src8.*", 238,102,68, 238,102,68
+#ColorAssign10=".*src9.*", 238,68,119, 238,68,119
+
+# Save each frame to an image?
+TakeSnapshots=true
+
+# Where to save each frame
+SnapshotLocation=mailer-swarm-######.png
+
+# Draw names (combinatory) :
+# Draw sharp names?
+DrawNamesSharp=true
+# And draw a glow around names? (Runs slower)
+DrawNamesHalos=true
+
+# Draw files (combinatory) :
+# Draw sharp files
+DrawFilesSharp=true
+# Draw fuzzy files
+DrawFilesFuzzy=true
+# Draw jelly files
+DrawFilesJelly=true
+
+# Show the Legend at start
+ShowLegend=true
+
+# Show the History at start
+ShowHistory=true
+
+# Show the Activity histogram at bottom
+ShowActivity=true
+
+# Show the Date at start
+ShowDate=true
+
+# Show edges between authors and files, mostly for debug purpose
+ShowEdges=false
+
+# Turn on Debug counts.
+ShowDebug=false
+
+# Natural distance of files to people
+EdgeLength=25
+
+# Amount of life to decrement
+EdgeDecrement=-2
+FileDecrement=-2
+PersonDecrement=-1
+
+#Speeds.
+#Optional: NodeSpeed=7.0, If used, FileSpeed and PersonSpeed need not be set.
+#
+FileSpeed=7.0
+PersonSpeed=2.0
+
+#Masses
+FileMass=1.0
+PersonMass=10.0
+
+# Life of an Edge
+EdgeLife=250
+
+# Life of a File
+FileLife=200
+
+# Life of a Person
+PersonLife=255
+
+# Highlight percent.
+# This is the amount of time that the person or
+# file will be highlighted.
+HighlightPct=5
+
+## Physics engine selection and configuration
+# Directory physics engine config files reside in.
+PhysicsEngineConfigDir=physics_engine
+# Force calculation algorithms ("PhysicsEngineLegacy", "PhysicsEngineSimple"...) :
+PhysicsEngineSelection=PhysicsEngineLegacy
+
+# OpenGL is experimental. Use at your own risk.
+UseOpenGL=false
diff --git a/contrib/code_swarm/mailer.sh b/contrib/code_swarm/mailer.sh
new file mode 100755 (executable)
index 0000000..4b9049b
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+svn log http://mxchange.org/repos/mailer/branches/0.2.1-FINAL/ -v > mailer.log
+python ./convert_logs/convert_logs.py -s ./mailer.log -o mailer.xml
diff --git a/contrib/debug-lines.sh b/contrib/debug-lines.sh
new file mode 100755 (executable)
index 0000000..f9fd3ef
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Shell script to determine where in the code are commented-in debug lines
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+svn diff |grep -v "svn diff" | grep "DEBUG" | grep "+" | grep -v "//\* DEBUG" > DOCS/debug-lines.log
diff --git a/contrib/ext-partner/earnstar-datenimport.pdf b/contrib/ext-partner/earnstar-datenimport.pdf
new file mode 100644 (file)
index 0000000..c4cd4a5
Binary files /dev/null and b/contrib/ext-partner/earnstar-datenimport.pdf differ
diff --git a/contrib/final-checker.sh b/contrib/final-checker.sh
new file mode 100755 (executable)
index 0000000..8fdd3ff
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Shell script to determine how close we are to final release
+# If one of these values are bigger zero we still have to do something
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+echo "$0: Analyzing..."
+echo " - TODOs in PHP..."
+TODOS_PHP=`find -type f -name "*.php" -exec grep "@TODO" {} \; | grep "@" --count`
+echo " - TODOs in TPL..."
+TODOS_TPL=`find -type f -name "*.tpl" -exec grep "@TODO" {} \; | grep "@" --count`
+echo " - TODOs in XML..."
+TODOS_XML=`find -type f -name "*.xml" -exec grep "@TODO" {} \; | grep "@" --count`
+echo " - DEPRECATED in PHP..."
+DEPRECATED_PHP=`find -type f -name "*.php" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
+echo " - DEPRECATED in TPL..."
+DEPRECATED_TPL=`find -type f -name "*.tpl" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
+echo " - DEPRECATED in XML..."
+DEPRECATED_XML=`find -type f -name "*.xml" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
+echo " - global statements..."
+GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "security_functions.php" | grep -v "phpmailer" --count`
+echo "$0: Result..."
+echo "--------------------------------------"
+echo " - Open TODOs: ${TODOS_PHP}/${TODOS_TPL}/${TODOS_XML}"
+echo " - Open DEPRECATED: ${DEPRECATED_PHP}/${DEPRECATED_TPL}/${DEPRECATED_XML}"
+echo " - global statements: ${GLOBALS}"
+echo "--------------------------------------"
+echo "$0: Thanks for waiting for the final release 0.2.1-FINAL! :-)"
+echo
+exit 0
diff --git a/contrib/get_Global.php b/contrib/get_Global.php
new file mode 100644 (file)
index 0000000..f551ef4
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// @DEPRECATED
+?>
diff --git a/contrib/ideas/000-README.txt b/contrib/ideas/000-README.txt
new file mode 100644 (file)
index 0000000..03c74fe
--- /dev/null
@@ -0,0 +1,16 @@
+Achtung!
+========
+
+Die hier veroeffentlichten Erweiterungen kommen aus einer uralten Zeit, wo die
+"API" vom Mailer-Projekt komplett anders (und "dummer") war. Folglich
+funktionieren diese Erweiterungen *NICHT* mit der neusten Revision der Branch
+0.2.1-FINAL und schon gar nicht mit trunk.
+
+Bitte sehen Sie daher von einer Verwendung - auch wenn das eine oder andere
+schoene Feature dabei sein mag - ab. Es gibt auch absolut keinen Support auf die
+Verwendung dieser Erweiterungen!
+
+Vielleicht werden sie eines Tages, an die neue API vollstaendig angepasst,
+aufgenommen. Die Zeit wird es zeigen.
+
+[EOF]
diff --git a/contrib/ideas/ext-affiliate.php b/contrib/ideas/ext-affiliate.php
new file mode 100644 (file)
index 0000000..d29d9d5
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// @DEPRECATED (see ext-network)
+?>
diff --git a/contrib/ideas/ext-club.php b/contrib/ideas/ext-club.php
new file mode 100644 (file)
index 0000000..c03cd68
--- /dev/null
@@ -0,0 +1,101 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 04/23/2005 *
+ * ==========================                   Last change: 04/23/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-club.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : Club memberships                                 *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Clubmitgliedschaften                             *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/contrib/ideas/ext-coupon.php b/contrib/ideas/ext-coupon.php
new file mode 100644 (file)
index 0000000..1dba4dc
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// @DEPRECATED Moved to branch 0.2.1-FINAL
+?>
diff --git a/contrib/ideas/ext-digit.php b/contrib/ideas/ext-digit.php
new file mode 100644 (file)
index 0000000..1327784
--- /dev/null
@@ -0,0 +1,101 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 10/27/2005 *
+ * ==========================                   Last change: 10/27/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-digit.php                                    *
+ * -------------------------------------------------------------------- *
+ * Short description : Extra numbers in member area                     *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Zusatzzahl im Mitgliedsbereich                   *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/contrib/ideas/ext-engine.php b/contrib/ideas/ext-engine.php
new file mode 100644 (file)
index 0000000..df55007
--- /dev/null
@@ -0,0 +1,201 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 09/25/2004 *
+ * ==========================                   Last change: 09/25/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-engine.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Game engine system                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Game-Engine System                               *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // SQL commands to run
+               addConfigAddSql('engine_free_transfers', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+               addConfigAddSql('engine_start_transfers', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10000');
+               addConfigAddSql('engine_daily_transfers', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100');
+               addConfigAddSql('engine_start_costs', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 5.00000');
+               addConfigAddSql('engine_mode', "ENUM('SERVER','CLIENT') NOT NULL DEFAULT 'SERVER'");
+               addConfigAddSql('engine_always_free', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+               addConfigAddSql('engine_rates', 'LONGTEXT');
+               addConfigAddSql('engine_rate_multiOA', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10000');
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_config` SET `engine_rates`='1:2:3:4:5:10:20:30:40:50:100:200:300:400:500:1000' WHERE `config`=0 LIMIT 1");
+
+               // Engine accounts
+               addDropTableSql('engine_accounts');
+               addCreateTableSql('engine_accounts', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`password` VARCHAR(255) NOT NULL DEFAULT '',
+`status` ENUM('ACTIVE','LOCKED','UNCONFIRMED') NOT NULL DEFAULT 'UNCONFIRMED',
+`query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`query_free` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`query_used` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`last_changed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`userid`),
+PRIMARY KEY (`id`)",
+                       'Accounts for the game engine');
+
+               // Tresors
+               addDropTableSql('engine_safe');
+               addCreateTableSql('engine_safe', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`engine_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`password` VARCHAR(255) NOT NULL DEFAULT '',
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`engine_userid`),
+PRIMARY KEY (`id`)",
+                       'Safes for engine account');
+
+               // Access logbook
+               addDropTableSql('engine_log');
+               addCreateTableSql('engine_log', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`engine_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`cmd_type` VARCHAR(255) NOT NULL DEFAULT 'status',
+`cmd_code` VARCHAR(255) NOT NULL DEFAULT 'status',
+`log_level` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`reason` LONGTEXT NOT NULL,
+`remote_addr` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
+`timemark` VARCHAR(10) NOT NULL DEFAULT '',
+KEY (`engine_userid`),
+PRIMARY KEY (`id`)",
+                       'Logged engine account accesses');
+
+               // Export URLs
+               addDropTableSql('engine_urls');
+               addCreateTableSql('engine_urls',"
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`title` VARCHAR(255) NOT NULL DEFAULT '',
+`base_url` LONGTEXT,
+`var1` VARCHAR(20) NOT NULL DEFAULT 'userid',
+`val1` VARCHAR(10) NOT NULL DEFAULT '%userid%',
+`var2` VARCHAR(20) NOT NULL DEFAULT 'pass',
+`val2` VARCHAR(10) NOT NULL DEFAULT '%pass%',
+`var3` VARCHAR(20) NOT NULL DEFAULT 'cmd',
+`val3` VARCHAR(10) NOT NULL DEFAULT '%cmd%',
+`var4` VARCHAR(20) NOT NULL DEFAULT 'points',
+`val4` VARCHAR(10) NOT NULL DEFAULT '%points%',
+`var5` VARCHAR(20) NOT NULL DEFAULT 'reason',
+`val5` VARCHAR(10) NOT NULL DEFAULT '%reason%',
+PRIMARY KEY (`id`)",
+                       '');
+
+               // Admin menu
+               addAdminMenuSql('engine', NULL, 'Game-Engine', 'Einstellungen an der Game-Engine (Export-Account) vornehmen, Export-URLs einstellen.', 8);
+               addAdminMenuSql('engine', 'config_engine', 'Einstellungen', 'Einstellungen an der Game-Engine (Export-Account) vornehmen.', 1);
+               addAdminMenuSql('engine', 'engine_urls', 'Export-URLs', 'Export-URLs hinzuf&uuml;gen, bearbeiten oder l&ouml;schen.', 2);
+               addAdminMenuSql('engine', 'unlock_engine', 'Accounts freigeben', 'Geben Sie hier neu angemeldete Export-Account f&uuml;r die Game-Engine frei. Erst dann werden die von Ihnen eingestellten &quot;Anfragen bei Freischaltung&quot; aufgebucht.', 3);
+               addAdminMenuSql('engine', 'edit_engine', 'Accounts editieren', 'Editieren Sie hier bestehende Export-Accounts (derzeit nur das Engine-Passwort).', 4);
+               addAdminMenuSql('engine', 'lock_engine', 'Accounts ent-/sperren', 'Sperren Sie freigegebene Export-Accounts bei Regelverstoss, etc. oder entsperren Sie diese wieder.', 5);
+               addAdminMenuSql('engine', 'del_engine', 'Accounts l&ouml;schen', 'L&ouml;schen Sie bestehende Export-Accounts, egal welcher Status sie haben.', 6);
+               addAdminMenuSql('engine', 'add_engine', 'Anfragen aufbuchen', 'Buchen Sie dem Export-Account weitere Anfragen auf (query_amount).', 7);
+               addAdminMenuSql('engine', 'sub_engine', 'Anfragen abziehen', 'Ziehen Sie dem Export-Account Anfragen ab (query_used).', 8);
+
+               // Guest menu
+               addGuestMenuSql('main', 'engine', 'Export-Account', 'Y', 'Y', 10);
+
+               // Member menu
+               addMemberMenuSql('main', 'engine', 'Export-Account', 'Y', 'Y', 4);
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='engine'");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module` LIKE 'engine%'");
+
+               // Remove tables as well
+               addDropTableSql('engine_accounts');
+               addDropTableSql('engine_safe');
+               addDropTableSql('engine_log');
+               addDropTableSql('engine_urls');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module` LIKE 'engine%'");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='Y' WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='Y' WHERE `what`='engine' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module` LIKE 'engine%'");
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/contrib/ideas/ext-refund.php b/contrib/ideas/ext-refund.php
new file mode 100644 (file)
index 0000000..f6b8397
--- /dev/null
@@ -0,0 +1,101 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 12/26/2005 *
+ * ==========================                   Last change: 12/26/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-refund.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Payback-points system                            *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Treuepunkte-System                               *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql('');
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/contrib/ideas/ext-shop.php b/contrib/ideas/ext-shop.php
new file mode 100644 (file)
index 0000000..4bc6f03
--- /dev/null
@@ -0,0 +1,315 @@
+<?php
+/************************************************************************
+ * Mailer-Project 0.2.1-FINAL                         Start: 06/04/2004 *
+ * ==========================                   Last change: 08/08/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : ext-shop.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : Shop system with referal and reseller programs   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Shop-System mit Referal- und Reseller-Programmen *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       exit();
+} // END - if
+
+// Version number
+setThisExtensionVersion('0.0.0');
+
+// Version history array (add more with , '0.1' and so on)
+setExtensionVersionHistory(array('0.0.0'));
+
+// This extension is in development (non-productive)
+enableExtensionProductive(false);
+
+switch (getExtensionMode()) {
+       case 'register': // Do stuff when installtion is running
+               // Create tables
+               addDropTableSql('shop_config');
+               addCreateTableSql('shop_config', "
+`config` TINYINT(1) UNSIGNED NOT NULL AUTO_INCREMENT,
+`allow_item_history` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`allow_item_gallery` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`allow_votes` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`allow_vote_comments` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`allow_save_search` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`allow_points_system` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`enable_reseller` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`enable_search` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`enable_member_preview` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+`shop_title` VARCHAR(255) NOT NULL DEFAULT '{?MAIN_TITLE?} Shop',
+`points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100',
+`num_preview_guest` TINYINT(4) UNSIGNED NOT NULL DEFAULT '3',
+`num_preview_member` TINYINT(4) UNSIGNED NOT NULL DEFAULT '3',
+`show_links_num` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+PRIMARY KEY (`config`)",
+                       'Shop configuration data');
+
+               addExtensionSql("INSERT INTO {?_MYSQL_PREFIX?}_shop_config (`config`) VALUES (0)");
+
+               addDropTableSql('shop_basket');
+               addCreateTableSql('shop_basket', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`item_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`customer_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`guest_session` VARCHAR(32) NOT NULL DEFAULT '',
+`amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`item_id`),
+INDEX (`customer_id`),
+PRIMARY KEY (`id`)",
+                       'Shopping baskets');
+
+               addDropTableSql('shop_cats');
+               addCreateTableSql('shop_cats', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`parent_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`title` VARCHAR(255) NOT NULL DEFAULT '',
+`short_descr` MEDIUMTEXT,
+`long_descr` LONGTEXT,
+`cat_icon` VARCHAR(255),
+`counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`show_links_num` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+INDEX (`parent_id`),
+PRIMARY KEY (`id`)",
+                       'Shopping categories');
+
+               addDropTableSql('shop_items');
+               addCreateTableSql('shop_items', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`catid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`required_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`suggested_by` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`title` VARCHAR(255) NOT NULL DEFAULT '',
+`version_no` VARCHAR(255) NOT NULL DEFAULT '',
+`licence` VARCHAR(255) NOT NULL DEFAULT '',
+`default_price` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`short_descr` MEDIUMTEXT,
+`long_descr` LONGTEXT,
+`item_icon` VARCHAR(255) NOT NULL DEFAULT 0,
+`item_created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`item_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT '-1',
+`admin_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`admin_unlock` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`tax_type` VARCHAR(255) NOT NULL DEFAULT '',
+`tax_rate` INT(3) UNSIGNED NOT NULL DEFAULT 0,
+`counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`point_costs` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`point_earned` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`suggested_by`),
+INDEX (`required_by`),
+INDEX (`admin_unlock`),
+INDEX (`admin_created`),
+INDEX (`default_price`),
+INDEX (`catid`),
+PRIMARY KEY (`id`)",
+                       'Shop items');
+
+               addDropTableSql('shop_item_gallery');
+               addCreateTableSql('shop_item_gallery', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`item_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`item_pic_url` VARCHAR(255) NOT NULL DEFAULT '',
+`item_pic_descr` MEDIUMTEXT,
+`is_private` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`item_id`),
+PRIMARY KEY (`id`)",
+                       'Optional item gallery');
+
+               addDropTableSql('shop_item_votes');
+               addCreateTableSql('shop_item_votes', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`item_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`vote_value` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`item_id`),
+PRIMARY KEY (`id`)",
+                       'Votings on the items');
+
+               addDropTableSql('shop_customers');
+               addCreateTableSql('shop_customers', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`reseller_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`salut` ENUM('M','F') NOT NULL DEFAULT 'M',
+`company` VARCHAR(255) NOT NULL DEFAULT '',
+`surname` VARCHAR(255) NOT NULL DEFAULT '',
+`family` VARCHAR(255) NOT NULL DEFAULT '',
+`street_nr` VARCHAR(255) NOT NULL DEFAULT '',
+`street_nr2` VARCHAR(255) NOT NULL DEFAULT '',
+`zip` VARCHAR(7) NOT NULL DEFAULT '',
+`city` VARCHAR(255) NOT NULL DEFAULT '',
+`country` VARCHAR(2) NOT NULL DEFAULT 'DE',
+`email` VARCHAR(255) NOT NULL DEFAULT '',
+`phone` VARCHAR(255) NOT NULL DEFAULT '',
+`fax` VARCHAR(255) NOT NULL DEFAULT '',
+`b_surname` VARCHAR(255) NOT NULL DEFAULT '',
+`b_family` VARCHAR(255) NOT NULL DEFAULT '',
+`b_street_nr` VARCHAR(255) NOT NULL DEFAULT '',
+`b_street_nr2` VARCHAR(255) NOT NULL DEFAULT '',
+`b_zip` VARCHAR(7) NOT NULL DEFAULT '',
+`b_city` VARCHAR(255) NOT NULL DEFAULT '',
+`b_country` VARCHAR(2) NOT NULL DEFAULT 'DE',
+`b_email` VARCHAR(255) NOT NULL DEFAULT '',
+`b_phone` VARCHAR(255) NOT NULL DEFAULT '',
+`b_fax` VARCHAR(255) NOT NULL DEFAULT '',
+`joined` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`updated` TIMESTAMP NULL DEFAULT NULL,
+`status` ENUM('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED',
+`unlock_key` VARCHAR(255) NULL NULL,
+`points_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+INDEX (`reseller_id`),
+UNIQUE KEY (`unlock_key`),
+PRIMARY KEY (`id`)",
+                       'Shop customer data');
+
+               addDropTableSql('shop_resellers');
+               addCreateTableSql('shop_resellers', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`reseller_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`salut` ENUM('M','F') NOT NULL DEFAULT 'M',
+`company` VARCHAR(255) NOT NULL DEFAULT '',
+`surname` VARCHAR(255) NOT NULL DEFAULT '',
+`family` VARCHAR(255) NOT NULL DEFAULT '',
+`street_nr` VARCHAR(255) NOT NULL DEFAULT '',
+`street_nr2` VARCHAR(255) NOT NULL DEFAULT '',
+`zip` VARCHAR(7) NOT NULL DEFAULT '',
+`city` VARCHAR(255) NOT NULL DEFAULT '',
+`country` VARCHAR(2) NOT NULL DEFAULT 'DE',
+`email` VARCHAR(255) NOT NULL DEFAULT '',
+`phone` VARCHAR(255) NOT NULL DEFAULT '',
+`fax` VARCHAR(255) NOT NULL DEFAULT '',
+`joined` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`updated` TIMESTAMP NULL DEFAULT NULL,
+`status` ENUM('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED',
+`unlock_key` VARCHAR(255) NULL NULL,
+INDEX (`reseller_id`),
+UNIQUE KEY (`unlock_key`),
+PRIMARY KEY (`id`)",
+                       'Shop reseller data');
+
+               addDropTableSql('shop_saved_searches');
+               addCreateTableSql('shop_saved_searches', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`customer_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`reseller_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`catid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`search_words` VARCHAR(255) NOT NULL DEFAULT '',
+INDEX (`catid`),
+INDEX (`customer_id`),
+INDEX (`reseller_id`),
+PRIMARY KEY (`id`)",
+                       'Saved shop searched for customers and resellers');
+
+               addDropTableSql('shop_price_types');
+               addCreateTableSql('shop_price_types', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`price_type` VARCHAR(255) NOT NULL DEFAULT '',
+`rate` FLOAT (20,5) NOT NULL DEFAULT '0.0000',
+PRIMARY KEY (`id`)",
+                       'Shop prices');
+
+               // Add admin menu system
+               addAdminMenuSql('shop', NULL, 'Shop-Verwaltung', 'Stellen Sie hier alles am Shop-System ein. Hier k&ouml;nnen Sie auch die Kunden verwalten.', '6');
+               addAdminMenuSql('shop', 'config_shop', 'Shop-Einstellungen', 'Allgemeine Einstellungen zum Shop.', 1);
+               addAdminMenuSql('shop', 'add_shop_cat', 'Warenkategorien hinzuf&uuml;gen', 'Neue Warenkategorien hinzuf&uuml;gen.', 2);
+               addAdminMenuSql('shop', 'edit_shop_cat', 'Warenkategorien &auml;ndern', 'Bestehende Warenkategorien &auml;ndern.', 3);
+               addAdminMenuSql('shop', 'add_shop_items', 'Neue Ware hinzuf&uuml;gen', 'Neue Waren in die Warenkategorien einsortieren.', 5);
+               addAdminMenuSql('shop', 'edit_shop_items', 'Ware &auml;ndern', 'Bestehende Ware &auml;ndern oder verschieben.', 6);
+               addAdminMenuSql('shop', 'add_shop_ptypes', 'Buchungspaket hinzuf&uuml;gen', 'F&uuml;gen Sie eine Bezahlungalternative zum direkten Geld hinzu. Beispiele: Klammlose, MyPoints, Wedis, usw.', 8);
+               addAdminMenuSql('shop', 'edit_shop_ptypes', 'Buchungspaket &auml;ndern', 'Bestehende Buchungspakete &auml;ndern.', 9);
+               addAdminMenuSql('shop', 'import_shop_ptyes', 'Import Buchungspakete', 'Importieren Sie bei installierter payout-Erweiterung die bestehenden Auszahlungsarten als Buchungspakete! Banner-Auszahlungsarten werden dabei ignoriert.', 11);
+
+               // Add guest and member menu entries (just redirects)
+               addGuestMenuSql('main', 'shop', 'Zum Shop...', 'Y', 'Y', 7);
+               addMemberMenuSql('main', 'shop', 'Zum Shop...', 'Y', 'Y', 7);
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               addDropTableSql('shop_basket');
+               addDropTableSql('shop_config');
+               addDropTableSql('shop_cats');
+               addDropTableSql('shop_items');
+               addDropTableSql('shop_item_gallery');
+               addDropTableSql('shop_item_votes');
+               addDropTableSql('shop_saved_searches');
+               addDropTableSql('shop_customers');
+               addDropTableSql('shop_resellers');
+               addDropTableSql('shop_price_types');
+
+               // Admin / guest / member menu
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='shop' LIMIT 12");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='shop' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='shop' LIMIT 1");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='shop' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='shop' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='Y' WHERE `what`='shop' LIMIT 1");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='Y' WHERE `what`='shop' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch (getCurrentExtensionVersion()) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               addExtensionSql('');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes('');
+                               break;
+               } // END - switch
+               break;
+
+       case 'modify': // When the extension got modified
+               break;
+
+       case 'test': // For testing purposes
+               break;
+
+       case 'init': // Do stuff when extension is initialized
+               break;
+
+       default: // Unknown extension mode
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               break;
+} // END - switch
+
+// [EOF]
+?>
diff --git a/contrib/ideas/ext-shredder.php b/contrib/ideas/ext-shredder.php
new file mode 100644 (file)
index 0000000..1dba4dc
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// @DEPRECATED Moved to branch 0.2.1-FINAL
+?>
diff --git a/contrib/ideas/ext-signup.php b/contrib/ideas/ext-signup.php
new file mode 100644 (file)
index 0000000..1dba4dc
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// @DEPRECATED Moved to branch 0.2.1-FINAL
+?>
diff --git a/contrib/ideas/ext_coupon.tpl b/contrib/ideas/ext_coupon.tpl
new file mode 100644 (file)
index 0000000..74cecf3
--- /dev/null
@@ -0,0 +1 @@
+<!-- @DEPRECATED Moved to branch 0.2.1-FINAL //-->
diff --git a/contrib/ideas/ext_signup.tpl b/contrib/ideas/ext_signup.tpl
new file mode 100644 (file)
index 0000000..74cecf3
--- /dev/null
@@ -0,0 +1 @@
+<!-- @DEPRECATED Moved to branch 0.2.1-FINAL //-->
diff --git a/contrib/install_svn.php b/contrib/install_svn.php
new file mode 100644 (file)
index 0000000..3893665
--- /dev/null
@@ -0,0 +1,483 @@
+<?php
+/**
+ ******************************************************************************************************
+ ******************************************************************************************************
+ *** $HeadURL::                                                                                   $ ***
+ *** $Author::                                                                                    $ ***
+ *** $Revision::                                                                                  $ ***
+ *** $Date::                                                                                      $ ***
+ *** $Copyright:: ©2008, Profi-Concept aka Wolfgang Stelzhammer , All rights reserved.            $ ***
+ *** $ License:: The BSD License                                                                  $ ***
+ *** $ Redistribution and use in source and binary forms, with or without modification,           $ ***
+ *** $ are permitted provided that the following conditions are met:                              $ ***
+ *** $                                                                                            $ ***
+ *** $ - Redistributions of source code must retain the above copyright notice,                   $ ***
+ *** $   this list of conditions and the following disclaimer.                                    $ ***
+ *** $ - Redistributions in binary form must reproduce the above copyright notice,                $ ***
+ *** $   this list of conditions and the following disclaimer in the documentation and/or         $ ***
+ *** $   other materials provided with the distribution.                                          $ ***
+ *** $ - Neither the name "Profi-Concept" or "Wolfgang Stelzhammer" nor the names of its          $ ***
+ *** $   contributors may be used to endorse or promote products derived from this software       $ ***
+ *** $   without specific prior written permission.                                               $ ***
+ *** $                                                                                            $ ***
+ *** $ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY        $ ***
+ *** $ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF    $ ***
+ *** $ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL     $ ***
+ *** $ THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,        $ ***
+ *** $ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT   $ ***
+ *** $ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)  $ ***
+ *** $ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,      $ ***
+ *** $ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS      $ ***
+ *** $ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                               $ ***
+ ******************************************************************************************************
+ *** With some XHTML hacks and mcedit ("Cool Edit") improvements by Roland Haeder                   ***
+ ******************************************************************************************************
+ ******************************************************************************************************
+ **/
+define('SVN_REPO_URL', "http://mxchange.org/repos/mailer/branches/0.2.1-FINAL");
+//define('SVN_REPO_URL', "file:///E:/Webscripte/MXChange/local_mirror/branches/0.2.1-FINAL");
+define('SVN_UUID', "");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<title>SVN-Installer --&gt; [Mailer - Mail Exchange] v0.2.1-FINAL</title>
+<style type="text/css">
+<!--
+body {
+       background-color: #EEFFEE;
+       color: #000000;
+       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+       font-size: 12px;
+       letter-spacing: 1px;
+       scrollbar-base-color: #E9E4AE;
+       scrollbar-face-color: #CDEFCD;
+       scrollbar-highlight-color: #EEFFEE;
+       scrollbar-shadow-color: #CDEFCD;
+       scrollbar-3dlight-color: #DDDDDD;
+       scrollbar-arrow-color: #000000;
+       scrollbar-track-color: #CCEFCC;
+       scrollbar-darkshadow-color: #999999;
+       margin: 20px;
+}
+
+table {
+       table-layout: auto;
+       border-spacing: 0px;
+       overflow: auto;
+}
+
+td {
+       vertical-align: top;
+}
+
+A {
+       font-style: normal;
+       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+       text-decoration: none;
+}
+
+A:link {
+       color: #2e51a9;
+}
+
+A:visited {
+       color: #AA0044;
+}
+
+A:active {
+       color: #2e51a9;
+       background-color: transparent;
+}
+
+A:hover {
+       background-color: transparent;
+}
+
+input,textarea {
+       color: #009900;
+       background-color: #EEFFEE;
+       border: 1px solid #AA0044;
+       text-decoration: none;
+       border-style: groove;
+}
+
+select,option {
+       background-color: #EEFFEE;
+       border: solid 1px #009900;
+       color: #AA0044;
+       text-decoration: none;
+       border-style: groove;
+}
+
+ul,ol {
+       margin-top: 0px;
+       margin-bottom: 0px;
+}
+
+.hl {
+       font-weight: 900;
+}
+
+.pos {
+       color: #32cd32;
+       background-color: #fffff0;
+       padding: 10px;
+}
+
+.neg {
+       color: #ff0000;
+       background-color: #fffff0;
+       padding: 10px;
+}
+-->
+</style>
+
+
+</head>
+<body>
+<br />
+<h2>SVN-Installer --&gt; [Mailer - Mail Exchange] v0.2.1-FINAL<br />
+<span style="font-size: 8pt;">Installer-Version 0.1.1<br />
+&copy;2008, Profi-Concept aka Wolfgang Stelzhammer , All rights
+reserved.</span></h2>
+
+<span class="hl">Pr&uuml;fe SVN-Version: </span>
+...
+<br />
+<br />
+<?php
+function doSetup () {
+       $rev = '';
+       if ((isset($_GET['revision'])) && (!empty($_GET['revision']))) {
+               $rev = '-r '.$_GET['revision'];
+       } // END - if
+
+
+       switch ($_GET['type']) {
+               case 'checkout':
+                       $befehl = 'svn checkout '.$rev.$_GET['svn_url'].' '.$_GET['path'];
+                       break;
+               case 'export':
+                       $befehl = 'svn export --force '.$rev.$_GET['svn_url'].' '.$_GET['path'];
+                       break;
+       } // END - switch
+
+       $ausg = proc_get($befehl);
+       //echo '<pre>$befehl:'.print_r($befehl, true).'</pre>';
+
+       //echo '<pre>$ausg:'.print_r($ausg, true).'</pre>';
+       echo '<p class="hl">F&uuml;hre SVN-'.$_GET['type'].' durch ...</p>';
+
+       if (!isset($_GET['svn_detail']) || $_GET['svn_detail'] != '1') $t[] = $ausg[count($ausg)-1];
+       else $t = $ausg;
+
+
+       ?>
+<table border="1" cellpadding="5" cellspacing="1"
+       style="margin-left: 20px;">
+       <tr>
+               <td class="hl">SVN Ausgabe</td>
+               <td class="pos" style="border: #00000 1px solid;"><?php echo implode("<br />\n",$t) ?></td>
+       </tr>
+</table>
+<br />
+<br />
+       <?php
+
+       $owner = fileowner($_GET['path']);
+       $uid = uniqid();
+       mkdir($_GET['path']. $uid);
+       $nowner = fileowner($_GET['path']. $uid);
+       //$group = filegroup($_GET['path']);
+       rmdir($_GET['path']. $uid);
+
+
+       if ($owner != $nowner) {
+               //echo '<pre>$owner:'.print_r($owner, true).'</pre>';
+               //echo '<pre>$nowner:'.print_r($nowner, true).'</pre>';
+               echo '<span class="hl">Setze Dateirechte, da Webserver-Benuzter von Ordner-Eigent&uuml;ber abweicht ...</span>';
+               proc_get('chmod -R 0766 '.$_GET['path']);
+               echo '<span class="pos">Dateirechte auf 0766 gesetzt</span><br /><br />';
+       } // END - if
+
+
+       ?>
+<span class="pos">SVN-Installation erfolgreich abgeschlossen.</span>
+<br />
+<br />
+<br />
+<form action="<?php echo $_GET['mailer_url'] . "\"";  ?> method="GET">
+<div style="margin-left: 20px;"><input type="submit" name="submit"
+       value="Installations-Script von Mailer aufrufen" /></div>
+</form>
+       <?php
+       return $t;
+}
+
+function proc_get ($cmd) {
+
+       $res = popen($cmd, 'r');
+       $buffer = array();
+       while ($res && !feof($res)) {
+               $t = trim(fgets($res));
+               if (!empty($t)) {
+                       $buffer[] = t$t;
+               } // END - if
+               //echo $t;
+       } // END - while
+       pclose($res);
+       if (count($buffer) <= 0) {
+               return false;
+       } else {
+               return $buffer;
+       }
+}
+
+$ausg = proc_get('svn --version --quiet');
+
+if (!$ausg) {
+       echo '<h2 style="text-align:center; padding-top: 10px; padding-bottom: 10px;" class="neg">Fehler: Es konnte kein SVN-Client gefunden werden!<br />
+       Bitte installieren Sie SVN (<a href="http://http://subversion.tigris.org/">http://subversion.tigris.org/</a>).</h2>';
+       exit;
+} // END - if
+
+echo '<span class="hl">Installierte SVN Version: </span><span class="pos">'.$ausg[0].'</span><br />';
+//echo '<pre>$ausg:'.print_r($ausg, true).'</pre>';
+if (!isset($_GET['step'])) {
+       $step = 1;
+} else {
+       $step = $_GET['step'];
+}
+
+switch ($step) {
+       case '1':
+               ?>
+<br />
+<form action="" method="GET">
+<div style="margin-left: 20px;"><input type="hidden" name="step"
+       value="2" />
+<p class="hl">Installations-Parameter</p>
+<table border="1" cellpadding="5" cellspacing="1">
+       <tr>
+               <td class="hl" nowrap style="border-bottom: 0px solid;">Setup-Art:</td>
+               <td colspan="2"><select name="type">
+                       <option value="checkout">checkout (Standard)</option>
+                       <option value="export">export</option>
+               </select></td>
+       </tr>
+       <tr>
+               <td style="border-top: 0px solid; border-bottom: 0px solid;"></td>
+               <td class="hl" nowrap>Chekout:<br />
+               (Standard)</td>
+               <td width="400">Bei dieser Option wird ein Working-Direktory erstellt.
+               Hiermit kann ganz einfach mittels eines SVN-Updates das Script
+               geupdated werden.</td>
+       </tr>
+       <tr>
+               <td style="border-top: 0px solid;"></td>
+               <td class="hl" nowrap>Export:</td>
+               <td width="400">Hier wird nur ein &quot;einfacher&quot; Export
+               ausgef&uuml;hrt und keine Versions-Information gespeichert.</td>
+       </tr>
+       <tr>
+               <td class="hl" nowrap style="border-bottom: 0px solid;">Setup-Verzeichnis:</td>
+               <td colspan="2"><input size="80" maxlength="254" type="text"
+                       name="path"
+                       value="<?php echo str_replace("\\", '/', dirname(__FILE__)) . "/\"";  ?> /></td>
+</tr>
+<tr>
+       <td style="border-top: 0px solid;"></td>
+       <td class="hl" nowrap>Absoluter Pfad:</td>
+       <td width="400">Standardm&auml;&szlig;ig ist hier der Pfad des Scriptes angegeben. Ein nicht vorhandenes Verzeichniss wird erstellt.</td>
+</tr>
+<tr>
+       <td class="hl" nowrap style="border-bottom: 0px solid;">Mailer-URL:</td>
+       <td colspan="2"><input size="80" maxlength="254" type="text" name="mailer_url" value="<?php echo 'http://' . getenv('SERVER_NAME') . str_replace("\\", '/', dirname($_SERVER['PHP_SELF']))."/\"";  ?> /></td>
+</tr>
+<tr>
+       <td style="border-top: 0px solid;"></td>
+       <td class="hl" nowrap>Mailer-URL:</td>
+       <td width="400">Dies ist die URL von wo aus der Mailer aufgerufen werden kann. Standardm&auml;&szlig;ig ist hier die URL des Scriptes angegeben.</td>
+</tr>
+<tr>
+       <td class="hl" nowrap style="border-bottom: 0px solid;">SVN-Repository:</td>
+       <td colspan="2"><input size="80" maxlength="254" type="text" name="svn_url" value="<?php echo constant('SVN_REPO_URL') . "\"";  ?> /></td>
+</tr>
+<tr>
+       <td style="border-top: 0px solid;"></td>
+       <td class="hl" nowrap>SVN-Server-URL:</td>
+       <td width="400">URL zum SVN-Server von [Mailer - Mail Exchange] v0.2.1-FINAL. Standard-URL ist hier <span class="hl"><?php echo constant('SVN_REPO_URL');  ?></span>. Bitte nur &auml;ndern, wenn Sie einen lokalen SVN-Mirror erstellt haben oder eine andere Version von Mailer-Project installieren m&ouml;chten.</td>
+</tr>
+<tr>
+       <td class="hl" nowrap style="border-bottom: 0px solid;">Optionen:</td>
+       <td colspan="2" class="hl">
+               Head-Revision: <input type="checkbox" name="head_revision" value="1" checked="checked"><br />
+               SVN Detail-Ausgabe: <input type="checkbox" name="svn_detail" value="1">
+</tr>
+<tr>
+       <td style="border-top: 0px solid;border-bottom: 0px solid;"></td>
+       <td class="hl" nowrap>Head-Revision:</td>
+       <td width="400">Wird diese Option gew&auml;hlt, so wird automatisch die HEAD-Revision verwendet. Sonst kann in einem weiteren Schritt eine entsprechende Revision ausgew&auml;hlt werden.</td>
+</tr>
+<tr>
+       <td style="border-top: 0px solid;"></td>
+       <td class="hl" nowrap>SVN Detail-Ausgabe:</td>
+       <td width="400">Aktiviert zeigt es s&auml;mtliche SVN-Detail-Ausgaben an. Sollte nur zum Debuggen aktiviert werden.</td>
+</tr>
+
+</table>
+<br />
+<input type="submit" name="submit" value="Setup fortsetzen">
+
+</div>
+</form>
+<?php
+       break;
+       case '2':
+               if (!preg_match('@(.*)/$@',$_GET['path'],$match)) {
+                       $_GET['path'] = $_GET['path'].'/';
+                       //echo '<pre>$_GET:'.print_r($_GET, true).'</pre>';
+               } // END - if
+               //echo '<pre>$_GET:'.print_r($_GET, true).'</pre>';
+?>
+<br />
+<span class="hl">Pr&uuml;fe Setup-Verzeichniss <?php echo $_GET['path']; ?> ...<br /><br />
+<?php
+$t = uniqid();
+$erg = @mkdir($_GET['path']. $t.'/');
+if (file_exists($_GET['path']) && $erg) {
+       echo $_GET['path'].'</span><span class="pos">vorhanden und beschreibar</span>';
+       rmdir($_GET['path']. $t.'/');
+} elseif(file_exists($_GET['path']) && !$erg) {
+       echo '<span class="hl">'.$_GET['path'].' </span>';
+       echo '<span class="neg">Fehler</span><br /><br />';
+       echo '<h2 style="text-align:center; padding-top: 10px; padding-bottom: 10px;" class="neg">Fehler: Das Verzeichniss<br />'.$_GET['path'].'<br />hat Nicht gen&uuml;gende Schreibrechte.';
+       exit;
+
+} elseif (!file_exists($_GET['path'])) {
+       //echo '<span class="neg">nicht vorhanden</span><br /><br />';
+       $t = explode('/',$_GET['path']);
+       //echo '<pre>$t:'.print_r($t, true).'</pre>';
+       $dir = '';
+       foreach($t as $last) {
+               if (!empty($last)) {
+                       $tdir = $dir;
+                       $dir .= $last.'/';
+
+                       //echo '<pre>fileperms($tdir):'.print_r(fileperms($tdir), true).'</pre>';
+                       //echo '<pre>fileperms($dir):'.print_r(fileperms($dir), true).'</pre>';
+
+
+                       //echo '<pre>$dir:'.print_r($dir, true).'</pre>';
+
+                       if (!file_exists($dir)) {
+                               $erg = @mkdir($dir);
+                               if (!$erg) {
+                                       echo '<span class="hl">'.$dir.' </span>';
+                                       echo '<span class="neg">Fehler</span><br /><br />';
+                                       echo '<h2 style="text-align:center; padding-top: 10px; padding-bottom: 10px;" class="neg">Fehler: Das Verzeichniss<br />'.$tdir.'<br />hat Nicht gen&uuml;gende Schreibrechte.';
+                                       exit;
+                               } else {
+                                       echo '<span class="hl">'.$dir.' </span>';
+                                       echo '<span class="pos">erstellt</span><br /><br />';
+                               }
+                       }
+               } // END - if
+       } // END - foreach
+}
+echo '<p class="hl">Pr&uuml;fe SVN-Server '.$_GET['svn_url']. ' ...</p>';
+echo '<span class="hl">'.$_GET['svn_url'].' </span>';
+
+$svn_server_readable = proc_get('svn info '.$_GET['svn_url'].'');
+$svn_server = proc_get('svn info --xml '.$_GET['svn_url'].'');
+
+if (!$svn_server_readable) {
+       echo '<span class="neg">Fehler</span><br />';
+       echo '<h2 style="text-align:center; padding-top: 10px; padding-bottom: 10px;" class="neg">Fehler: Kann den SVN-Server<br />'.$_GET['svn_url'].'<br />nicht erreichen.';
+       exit;
+} // END - if
+
+$svn_ausg = implode('<br />',$svn_server_readable);
+$svn_server = implode("\n",$svn_server);
+?>
+<span class="pos">erreichbar</span><br /><br />
+<table border="1" cellpadding="5" cellspacing="1" style="margin-left: 20px;">
+<tr>
+       <td class="hl">SVN Informationen</td>
+       <td class="pos" style="border: #00000 1px solid;"><?php echo $svn_ausg ?></td>
+</tr>
+</table>
+<?php
+if (!isset($_GET['head_revision']) || $_GET['head_revision'] != '1') {
+?>
+<br />
+<form action="" method="GET">
+<div style="margin-left: 20px;">
+<input type="hidden" name="step" value="3" />
+<input type="hidden" name="past" value="<?php echo urlencode(serialize($_GET))."\""; ?> />
+<table border="1" cellpadding="5" cellspacing="1">
+<tr>
+       <td class="hl" nowrap style="border-bottom: 0px solid;">Revision:</td>
+       <td colspan="2"><input size="10" maxlength="10" type="text" name="revision" value="<?php
+//echo '<pre>$svn_server:<textarea cols="80" rows="20" name="fgsgfsdg">'.print_r($svn_server, true).'</textarea></pre>';
+
+
+$xml = new SimpleXMLElement($svn_server);
+//echo '<pre>$xml:'.print_r($xml, true).'</pre>';
+$t = $xml->entry[0]->commit[0]['revision'];
+echo $t."\"";
+?>></td>
+
+</tr>
+<tr>
+       <td style="border-top: 0px solid;"></td>
+       <td class="hl" nowrap>Revision:</td>
+       <td width="400">Revision von [Mailer-Project - Mail Exchange] v0.2.1-FINAL die installiert werden soll. Nach m&ouml;glichkeit immer die HEAD-Revison benutzen um alle Updates bereits includiert zu erhalten.</td>
+</tr>
+</table>
+<br />
+<input type="submit" name="submit" value="Setup fortsetzen">
+
+</div>
+</form>
+<?php
+} else {
+       $ausg = doSetup();
+}
+       break;
+
+       case '3':
+               $t = unserialize(urldecode($_GET['past']));
+               unset($_GET['past']);
+               $_GET = array_merge($t, $_GET);
+               echo '<p class="hl">Pr&uuml;fe SVN-Server '.$_GET['svn_url']. ' ...</p>';
+               echo '<span class="hl">'.$_GET['svn_url'].' </span>';
+
+               $svn_server_readable = proc_get('svn info '.$_GET['svn_url'].'');
+               $svn_server = proc_get('svn info --xml '.$_GET['svn_url'].'');
+               if (!$svn_server_readable) {
+                       echo '<span class="neg">Fehler</span><br />';
+                       echo '<h2 style="text-align:center; padding-top: 10px; padding-bottom: 10px;" class="neg">Fehler: Kann den SVN-Server<br />'.$_GET['svn_url'].'<br />nicht erreichen.';
+                       exit;
+               } // END - if
+               $svn_ausg = implode('<br />',$svn_server_readable);
+               $svn_server = implode("\n",$svn_server);
+?>
+<span class="pos">erreichbar</span><br /><br />
+<table border="1" cellpadding="5" cellspacing="1" style="margin-left: 20px;">
+<tr>
+       <td class="hl">SVN Informationen</td>
+       <td class="pos" style="border: #00000 1px solid;"><?php echo $svn_ausg ?></td>
+</tr>
+</table>
+<?php
+                       $ausg = doSetup();
+                       break;
+} // END - switch
+?>
+</body>
+</html>
diff --git a/contrib/interface_test.php b/contrib/interface_test.php
new file mode 100644 (file)
index 0000000..d0daf95
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+$test = str_replace("\r", '', base64_decode("PD9waHANCg0KDQoNCg0KDQoNCg0KLyogRGF0ZWluYW1lICovDQoNCg0KDQoNCg0KDQoNCiRkYXRlaW5hbWUgPSAnL3JlZ2lzdHJpZXJlbl9zZW5kLnBocCc7DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQovKiBCYWR3b3JkICovDQoNCg0KDQokYmFkd29yZCA9ICdBY2h0dW5nOic7DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQovKiBIVFRQLVBPU1QtUXVlcnkgenVzYW1tZW5iYXVlbiAqLw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJ2Zvcm11bGFyX3VzZXJuYW1lPScuJGRhdGFbJ25pY2tuYW1lJ107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmZvcm11bGFyX2tlbm53b3J0PScuJGRhdGFbJ2tlbm53b3J0J107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmFucmVkZT0nLiRkYXRhWydhbnJlZGUnXTsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmdm9ybmFtZT0nLiRkYXRhWyd2b3JuYW1lJ107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJm5hY2huYW1lPScuJGRhdGFbJ25hY2huYW1lJ107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmd0YWc9Jy4kZGF0YVsnZ3RhZyddOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZnbW9uYXQ9Jy4kZGF0YVsnZ21vbmF0J107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmdqYWhyPScuJGRhdGFbJ2dqYWhyJ107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJnN0cmFzc2U9Jy4kZGF0YVsnc3RyYXNzZSddOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZwbHo9Jy4kZGF0YVsncGx6J107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJnN0YWR0PScuJGRhdGFbJ29ydCddOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZsYW5kPScuJGRhdGFbJ2xhbmQnXTsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmZW1haWw9Jy4kZGF0YVsnZW1haWwnXTsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmYXJ0PVRleHQnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZsYW5kPScuJGRhdGFbJ2xhbmQnXTsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmbmV3c2xldHRlcj1KYSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJnJlZj0nLiRhbmJpZXRlclsncmVmaWQnXTsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmbGFuZD0nLiRkYXRhWydsYW5kJ107DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsxPTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrMj0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazM9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJms0PTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrNT0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazY9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJms3PTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrOD0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazk9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsxMD0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazExPTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrMTI9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsxMz0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazE0PTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrMTU9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsxNj0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazE3PTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrMTg9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsxOT0xJzsNCg0KDQoNCg0KDQoNCg0KJHJlZ2lzdGVyIC49ICcmazIwPTEnOw0KDQoNCg0KDQoNCg0KDQokcmVnaXN0ZXIgLj0gJyZrMjE9MSc7DQoNCg0KDQoNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmsyMj0xJzsNCg0KDQoNCiRyZWdpc3RlciAuPSAnJmFnYj1vbic7DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KLyogRGllIFJlZ2lzdHJpZXJ1bmcgYWJzY2hpY2tlbiAqLw0KDQoNCg0KDQoNCg0KDQokdXJsID0gcGFyc2VfdXJsKCRhbmJpZXRlclsncmVmbGluayddKTsNCg0KDQoNCg0KDQoNCg0KJHJlZyA9IHJlZygkdXJsWydob3N0J10sJGRhdGVpbmFtZSwkcmVnaXN0ZXIpOw0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KLyogRmVobGVyY2hlY2sgYW5oYW5kIGRlcyBCYWR3b3JkcyAqLw0KDQoNCg0KDQoNCg0KDQppZiAoc3RyaXBvcygkcmVnLCRiYWR3b3JkKSAhPT0gRkFMU0UpICRlcmZvbGcgPSBGQUxTRTsNCg0KDQoNCg0KDQoNCg0KCWVsc2UgJGVyZm9sZyA9IFRSVUU7DQoNCg0KDQoNCg0KDQoNCj8+"));
+while (strpos($test, "\n\n") !== false) {
+       $test = str_replace("\n\n", "\n", $test);
+}
+print $test;
+?>
diff --git a/contrib/lint.sh b/contrib/lint.sh
new file mode 100755 (executable)
index 0000000..1cee61c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+echo "$0: Analysing PHP scripts for syntax errors (lint) ..."
+LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in" | grep -v "FUSE_EDEADLK" | sort --unique`
+
+if test "${LINT}" != ""; then
+       echo "${LINT}"
+else
+       echo "$0: No syntax errors found."
+fi
diff --git a/contrib/merge-exp.sh b/contrib/merge-exp.sh
new file mode 100755 (executable)
index 0000000..fcc0461
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+svn merge --dry-run http://mxchange.org/repos/mailer/branches/0.2.1-FINAL-expression_language_BROKEN/ http://mxchange.org/repos/mailer/branches/0.2.1-FINAL .
diff --git a/contrib/mt_konverter/AENDERUNGEN.txt b/contrib/mt_konverter/AENDERUNGEN.txt
new file mode 100644 (file)
index 0000000..407aa6e
--- /dev/null
@@ -0,0 +1,24 @@
+Aenderungen an der Software
+---------------------------
+
+Es wurden folgende Aenderungen vorgenommen:
+
+05.09.2008 - 01:31
+ - mxchange.php    - Nach mt_mxchange_converter.php umbenannt und mit vollem
+                     Header fuer die GNU GPL versehen
+ - Lizenzdatei.txt - Dieser Konverter ist nun auch GNU GPL v2!
+
+04.09.2008 - 01:08
+ - DESIGN.txt      - Aus der SVN-Branch 0.2.1-FINAL kopiert
+                     (DOCs/de/theme/README.txt)
+ - Lizenzdatei.txt - Adresse angepasst, Gerichsstand auf Krefeld geaendert
+
+27.12.2007 - 17:07
+ - Lizenzdatei.txt - PayPal und Wernis-Account entfernt, Adresse aktualisiert
+
+03.04.2005 - 23:26:
+
+ - Lizenzdatei.txt - Komplett ueberarbeitet!
+ - INHALT.txt - Neue Datei im Archiv, ist das Inhaltsverzeichnis dieses
+   Archives
+ - AENDERUNGEN.txt - Neue Datei im Archiv, diese Datei selber.
diff --git a/contrib/mt_konverter/INHALT.txt b/contrib/mt_konverter/INHALT.txt
new file mode 100644 (file)
index 0000000..bc8cbc9
--- /dev/null
@@ -0,0 +1,12 @@
+Inhalt dieses Archives:
+-----------------------
+
+Es sind in diesem Archiv folgende Dateien vorhanden:
+
+- AENDERUNGEN.txt - Aenderungsprotokoll
+- INHALT.txt - Diese Datei selber
+- Lizenzdatei.txt - Lizenzbestimmungen zur Software
+- mxchange.php - Die Software selber
+- readme_konverter.txt - Vorgehensweise und Hinweise zum Umgang mit dieser Software
+
+Bitte lesen Sie sich unbedingt die README-Datei durch!
diff --git a/contrib/mt_konverter/Lizenzdatei.txt b/contrib/mt_konverter/Lizenzdatei.txt
new file mode 100644 (file)
index 0000000..d511905
--- /dev/null
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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.
+
+    This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/contrib/mt_konverter/mt_mxchange_converter.php b/contrib/mt_konverter/mt_mxchange_converter.php
new file mode 100644 (file)
index 0000000..61686ea
--- /dev/null
@@ -0,0 +1,217 @@
+<?php
+/************************************************************************
+ * mt_konverter 0.1                                   Start: 07/18/2004 *
+ * ================                             Last change: 09/05/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : mxchange.php                                     *
+ * -------------------------------------------------------------------- *
+ * Short description : Data converter for Danny Bubolz mail exchange    *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Datenkonverter fuer Danny Bubolz's Mailtausch    *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program 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.                                  *
+ *                                                                      *
+ * This program 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 this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Verbindung oeffnen...
+require("config/config.php");
+
+// Header ausgeben
+echo "<DIV align=\"center\"><STRONG>Datenkonverter nach MXChange-Datenbank</STRONG></DIV><BR>\n";
+
+// Umgebung testen
+echo "Teste Umgebung.... ";
+if (!file_exists("tmp"))       exit("Verzeichnis tmp mit CHMOD 777 bitte anlegen!");
+@touch("tmp/test.sql") or exit("Bitte CHMOD 777 auf tmp setzen!");
+unlink("tmp/test.sql");
+echo "<B>OKAY</B><BR>\n";
+
+echo "Konvertiere Daten... ";
+@touch("tmp/mxchange-db.sql");
+$fp = @fopen("tmp/mxchange-db.sql", 'w');
+
+// Daten geht's mit den Userdaten los!
+$result = mysql_query("SELECT ID,user,vorname,nachname,land,plz,strasse,ort,email,pwd,session,guthaben,refpunkte,bonuspunkte,extrapunkte,mailpunkte,mailsamtag,punkteabzug,geworbenvon,popuppunkte,jackpotpunkte,refpunkte1,refpunkte2,refpunkte3,refpunkte4,refpunkte5,refpunkte6,refpunkte7,refpunkte8,refpunkte9,refpunkte10,lastaction FROM mt_user ORDER BY ID")
+       or exit(__FILE__." (".__LINE__."): ".mysql_error());
+while ($DATA = mysql_fetch_array($result)) {
+       $data_k   = array(); $data_v   = array();
+       $points_k = array(); $points_v = array();
+       foreach ($DATA as $key=>$value) {
+               if ((intval($key) == "0") && ($key != "0")) {
+                       switch ($key) {
+                               case "ID":
+                                       echo "User <B>".$value."</B>...\n";
+                                       $data_k[] = "userid"; $data_v[] = $value;
+                                       $ID = $value;
+                                       break;
+
+                               case "user":
+                                       $data_k[] = "nickname"; $data_v[] = $value;
+                                       $NICK = $value;
+                                       break;
+
+                               case "vorname":
+                                       $data_k[] = "surname"; $data_v[] = $value;
+                                       break;
+
+                               case "nachname":
+                                       $data_k[] = "family"; $data_v[] = $value;
+                                       break;
+
+                               case "land":
+                                       $data_k[] = "country"; $data_v[] = $value;
+                                       break;
+
+                               case "plz":
+                                       $data_k[] = "zip"; $data_v[] = $value;
+                                       break;
+
+                               case "strasse":
+                                       $data_k[] = "street_nr"; $data_v[] = $value;
+                                       break;
+
+                               case "ort":
+                                       $data_k[] = "city"; $data_v[] = $value;
+                                       break;
+
+                               case "email":
+                                       $data_k[] = "email"; $data_v[] = $value;
+                                       break;
+
+                               case "pwd":
+                                       $data_k[] = "password"; $data_v[] = md5($value);
+                                       break;
+
+                               case "mailsamtag":
+                                       $data_k[] = "max_mails"; $data_v[] = $value;
+                                       $data_k[] = "receive_mails"; $data_v[] = $value;
+                                       break;
+
+                               case "lastaction":
+                                       $data_k[] = "joined";      $data_v[] = $value;
+                                       $data_k[] = "last_online"; $data_v[] = $value;
+                                       $data_k[] = "last_module"; $data_v[] = "login";
+                                       $data_k[] = "last_update"; $data_v[] = $value;
+                                       break;
+
+                               case "session":
+                                       $data_k[] = "user_hash"; $data_v[] = $value;
+                                       break;
+
+                               case "geworbenvon":
+                                       $ref_res = mysql_query("SELECT ID FROM mt_user WHERE user='".$value."' LIMIT 1")
+                                or exit(__FILE__." (".__LINE__."): ".mysql_error());
+                                list($value) = mysql_fetch_row($ref_res);
+                                if ($value == "") $value = "0";
+                                $data_k[] = "refid"; $data_v[] = $value;
+                                break;
+
+                                /********* Ab hier Punkte! *********/
+                               case "punkteabzug":
+                                       $data_k[] = "used_points"; $data_v[] = abs($value);
+                                       break;
+
+                               case "guthaben":
+                                       $points_k['check'] = "check"; $points_v['check'] = $value;
+                                       break;
+
+                               case "refpunkte":
+                               case "bonuspunkte":
+                               case "extrapunkte":
+                               case "mailpunkte":
+                               case "jackpotpunkte":
+                               case "popuppunkte":
+                                       if (!in_array("points0", $points_k))
+                                       {
+                                               $points_k[] = "points0";
+                                       }
+                                       $pos = array_search("points0", $points_k);
+                                       $points_v[$pos] += $value;
+                                       break;
+
+                               case "refpunkte1":
+                               case "refpunkte2":
+                               case "refpunkte3":
+                               case "refpunkte4":
+                               case "refpunkte5":
+                               case "refpunkte6":
+                               case "refpunkte7":
+                               case "refpunkte8":
+                               case "refpunkte9":
+                               case "refpunkte10":
+                                       $ref = substr($key, 9);
+                                       $points_k[$ref] = "points".$ref.""; $points_v[$ref] = $value;
+                                       break;
+
+                               default:
+                                       echo "Spalte <B>".$key."</B> mit Wert ".$value." konnte nicht konvertiert werden!<BR>\n";
+                       }
+               }
+       }
+       $SQL = "INSERT INTO mxchange_user_data (";
+       foreach ($data_k as $key=>$value) {
+               $SQL .= $value.",";
+       }
+       $SQL .= "status) VALUES ('";
+       foreach ($data_v as $key=>$value) {
+               $SQL .= $value."','";
+       }
+       $SQL .= "CONFIRMED');\n";
+       fwrite($fp, $SQL); $lvl0 = false;
+       $lvl0_points = "0";
+       foreach ($points_v as $level=>$points) {
+               if ($level != "check") {
+                       // Refs pruefen
+                       $result_ref = mysql_query("SELECT user FROM mt_refs WHERE ref".$level."='".$NICK."'")
+                               or exit(__FILE__." (".__LINE__."): ".mysql_error());
+                       if ($points != "0.00") {
+                               $SQL1 = "INSERT INTO mxchange_user_points (userid,ref_depth,points) VALUES ('".$ID."','".$level."','".$points."');\n";
+                               $SQL2 = "INSERT INTO mxchange_refsystem (userid,level,counter) VALUES('".$ID."','".$level."','".mysql_num_rows($result_ref)."');\n";
+                               fwrite($fp, $SQL1);
+                               fwrite($fp, $SQL2);
+                       }
+               } else {
+                       if (!$lvl0) {
+                               $lvl0_points = $points;
+                               $lvl0 = true;
+                       } else {
+                               $lvl0_points = $lvl0_points + $points;
+                               fwrite($fp, "INSERT INTO mxchange_user_points (userid,ref_depth,points) VALUES ('".$ID."','0','".$lvl0_points."');\n");
+                               $lvl0_points = "0"; $lvl0 = false;
+                       }
+               }
+       }
+}
+
+// Alles klar! (hoffentlich?)
+echo "<B>OKAY</B><BR>\n";
+fclose($fp);
+
+// Und wieder zu damit...
+mysql_close($db);
+
+echo "<BR>\n";
+echo "Datei <B>tmp/mxchange-db.sql</B> mit <B>".filesize("tmp/mxchange-db.sql")." Bytes</B> erzeugt.<BR><BR>Datenkonvertierung abgeschlossen...<BR>
+<BR>
+Bevor Sie jedoch den Dump einspielen, m&uuml;ssen Sie unbedingt die <A href=\"http://www.mxchange.org\">nickname-Erweiterung</A> meines Scriptes eingerichtet haben! Anderfalls kommt es zu Fehlermeldungen und die User-Daten konnten nicht importiert werden.\n";
+
+//
+?>
diff --git a/contrib/mt_konverter/readme_konverter.txt b/contrib/mt_konverter/readme_konverter.txt
new file mode 100644 (file)
index 0000000..496186f
--- /dev/null
@@ -0,0 +1,40 @@
+--------------------------------------------------------------------------------
+Wie Sie die Daten Ihres bestehenden Tausches nach MXChange konvertiert bekommen:
+--------------------------------------------------------------------------------
+
+------------------------- SEHR WICHTIGER HINWEIS: -----------------------------
+Installieren Sie die nickname-Erweiterung *BEVOR* Sie den Dump vom Konverter
+einspielen!!!
+------------------------- SEHR WICHTIGER HINWEIS: -----------------------------
+
+Folgende Daten sollten importiert werden koennen:
+- Vorname, Nachname, Strasse, PLZ, Ort, Land (Nur die ersten zwei Buchstaben)
+- EMail-Adresse, Passwort (welches automatisch nach MD5 verschluesselt wird)
+- Punkteguthaben und verbrauchte Punkte
+- Ref-Punkte, Ref-IDs (wer wen geworben hat)
+
+Was leider nicht geht:
+- Ref-Banner
+- News
+- Design (muessen Sie selber "importieren", siehe dazu DESIGN.txt
+- Ralleys (Punkte jedoch schon)
+- Jackpot-Stand (bitte vorher notieren!)
+
+Was im neuen Script fuer Verwirrung sorgen kann:
+- Anzahl Refs in den Ebenen (evtl.)
+- Anrede steht immer auf "Herr"
+
+Hier koennten Ihre Mitglieder sich bei Ihnen melden!
+
+Senden Sie einen Newsletter aus mit folgenden Hinweisen:
+- Die oben gennanten Information leider fehlerhaft sind, aber dennoch alle Punkte
+  und Refs korrekt importiert worden sind
+
+- Machen Sie Ihre Mitglieder zusaetzlich darauf aufmerksam, dass sie noch die
+  Kategorien und die Anrede aendern sollten
+
+- Der Ref-Link hat sich evtl. geaendert.
+
+Vielen Dank fuer Ihr Interesse an meinem Script.
+
+Roland Haeder (webmaster@mxchange.org)
diff --git a/contrib/patch_core.sh b/contrib/patch_core.sh
new file mode 100755 (executable)
index 0000000..f25ed1f
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+svn diff inc/ > ../../core/trunk/i || exit 1
+cd ../../core/trunk/ || exit 1
+sh ../contrib/patch_i.sh || exit 1
+cd -
+svn up inc/
diff --git a/contrib/prop-set.sh b/contrib/prop-set.sh
new file mode 100755 (executable)
index 0000000..2de0edd
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+echo -n "" > DOCS/svn-errors.log
+find -type f -name "*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*-" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*_" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "_*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.xml" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.js" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; 2>> DOCS/svn-errors.log
+
+find -type f -name "*.php" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*-" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*_" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "_*.php" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.jpg" -exec svn propset svn:mime-type "image/jpeg" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.xml" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.js" -exec svn propset svn:mime-type "text/javascript" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.css" -exec svn propset svn:mime-type "text/css" {} \; 2>> DOCS/svn-errors.log
+find -type f -name ".htaccess" -exec svn propset svn:mime-type "text/plain" {} \; 2>> DOCS/svn-errors.log
+
+find -type f -name "_*.php" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*-" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*_" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.php" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.txt" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.tpl" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.xml" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.js" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name "*.css" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
+find -type f -name ".htaccess" -exec svn propset svn:eol-style "native" {} \; 2>> DOCS/svn-errors.log
diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh
new file mode 100755 (executable)
index 0000000..99ea271
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+echo "$0: Searching for deprecated PHP scripts ..."
+LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;`
+
+echo "$0: Searching for deprecated templates ..."
+LIST2=`find -type f -name "*.tpl" -exec grep -H "@DEPRECATED" {} \;`
+
+LIST="${LIST1} ${LIST2}"
+
+if test "${LIST}" != " "; then
+       echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del
+       sh ../../contrib/todo-builder.sh
+fi
diff --git a/contrib/teaser.txt b/contrib/teaser.txt
new file mode 100644 (file)
index 0000000..ec1d031
--- /dev/null
@@ -0,0 +1,13 @@
+Das freie Mailtausch- und Paidmailer-Script - kurz Mailer-Project - ist ein in PHP5 geschriebenes Script und laeuft auch (noch) auf PHP4. Es steht bis einschliesslich Version 0.2.1-FINAL unter der GNU GPL v2 und wechselt ab Version 0.3.0 auf die GNU GPL 3.
+
+Es bietet eine einfache aber weiterhin sehr flexible und robuste Template-Engine mit einer eigens entwickelten Expression-Language, sowie neben vielen bereits fertiggestellten Funktionalitaeten, wie z.B. Bettel-Link, Verdoppler (mit Internet-Waehrungen empfehlenswert), verschiedene Rallyes auch eine kontinuierliche Weiterentwicklung, kostenlosen Support per Forum (bitte von Anrufen absehen!) sowie eine hilfsbereite Community oben drauf.
+
+Die Expression-Language ist flexible und bietet die Moeglichkeit mit wenig Programmieraufwand neue  "Tags" zu programmieren, so dass aus den Templates z.B. heraus auf weitere Datenbanktabellen ein einfacher Zugriff moeglich und kein Umweg ueber die PHP-Scripte noetig ist.
+
+Dies und weitere Funktionalitaeten sind auf der Projekt-Webseite ausfuehrlicher beschrieben.
+------------------------------------------------------------------------------
+Mailer-Project ist ein freies PHP-Script, mit dem Sie einen eigenen Mailtausch- oder Paidmailer-Dienst starten koennen.
+
+Es kommt mit einer komforablen Installationsroutine, EMail- und HTML-Templates, dynamisches Referal-System mit beliebig vielen Ebenen, Multi-Language-Support, einer eigens entwickelten Expression-Language uvm.
+
+Den Umfang runden Erweiterungen von einem einfachen Besuchertausch, Bettel-Link, Doppler, Sponsorenbereich oder eine Anbindung an diverse Werbenetzwerke.
diff --git a/contrib/todo-builder.sh b/contrib/todo-builder.sh
new file mode 100755 (executable)
index 0000000..0e144eb
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# This script helps building the file DOCS/TODOs.txt and should be executed by
+# developers with SVN write-access
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+TODO="DOCS/TODOs.txt"
+LOG="DOCS/template-warnings.log"
+
+echo "$0: Generating TODOs.txt ..."
+echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=${UID}/user=${USER}) ###" > ${TODO}
+echo "### DO NOT EDIT THIS FILE. ###" >> ${TODO}
+echo "$0: Searching for @TODO ..."
+find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+find -type f -name "*.tpl" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+find -type f -name "*.xml" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+find -type f -name "*.js" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+find -type f -name ".htaccess" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+echo "### ### DEPRECATION FOLLOWS: ### ###" >> ${TODO}
+echo "$0: Searching for @DEPRECATED ..."
+find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+find -type f -name "*.xml" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+find -type f -name "*.js" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+find -type f -name ".htaccess" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+echo "$0: Checking for template-warnings.log ..."
+if test -e "${LOG}"; then
+       echo "$0: Found a template-warnings.log, adding it..."
+       echo "### ### template-warnings.log follows: ### ###" >> ${TODO}
+       cat ${LOG} >> ${TODO}
+fi
+echo "$0: Done."
+exit 0
diff --git a/contrib/updater/.cmds.sh b/contrib/updater/.cmds.sh
new file mode 100755 (executable)
index 0000000..002a72f
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".cmds.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# Base directory holding the files
+CMDS="cmds"
+CMDS_DIR="mxchange_$CMDS"
+
+# Upload directory on server
+CMDS_FTP_DIR="htdocs/$CMDS/"
+
+# Sections on FTP server
+CMDS_SECTIONS="status safe intern extern rmember wmember export"
+
+# Status command files
+STATUS_CMDS="active beg bonus engine member order status rlevels"
+
+# Export-Account command files
+RMEMBER_CMDS="nickname order persona points rpoints"
+
+# Read-Only member command files
+EXPORT_CMDS="nickname order persona points rpoints"
+
+# Command files to upload on FTP server
+UPLOAD_CMDS=""
diff --git a/contrib/updater/.cms.sh b/contrib/updater/.cms.sh
new file mode 100755 (executable)
index 0000000..2188830
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".cms.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# General config stuff
+CMS_EXT_DIR="mxchange_ext_cms"
+
+# Versions
+CMS_VER="0.0.1"
+CMS_PRE=""
+
+# FTP directory
+CMS_UPLOAD_DIR="$BASEDIR/$CMS_EXT_DIR"
+CMS_FTP_DIR="content/htdocs/extensions"
+
+# Archive stuff
+if test "$CMS_PRE" != ""; then
+       CMS_TAR="$BASENAME-$CMS-$CMS_VER-pre$CMS_PRE.tar"
+       CMS_ZIP="$BASENAME-$CMS-$CMS_VER-pre$CMS_PRE.zip"
+ else
+       CMS_TAR="$BASENAME-$CMS-$CMS_VER.tar"
+       CMS_ZIP="$BASENAME-$CMS-$CMS_VER.zip"
+fi
+
+# Files stuff which will be archived
+CMS_FILES="ChangeLog* README $CMS/ $CMS/DOCS/LICENSE*"
+
+# Base CMS extensions
+CMS_EXT="support user register mydata other online sql_patches newsletter mediadata update country theme"
+
+# Extra ported extensions
+CMS_EXTRA_EXT="autopurge bonus task club admins"
+
+# Extensions to be uploaded
+#UPLOAD_CMS_EXT="$CMS_EXT $CMS_EXTRA_EXT"
+UPLOAD_CMS_EXT=""
diff --git a/contrib/updater/.config.sh b/contrib/updater/.config.sh
new file mode 100755 (executable)
index 0000000..0fe868e
--- /dev/null
@@ -0,0 +1,100 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".config.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# General config stuff
+THIS_DIR="/Homepages/MXChange"
+BASEDIR="$HOME/Test/Projects"
+EXT_DIR="mxchange_ext"
+THEME_DIR="mxchange_themes"
+UPLOAD_DIR="$BASEDIR/$EXT_DIR"
+EXT="ext"
+THEME="theme"
+HTML="html"
+CMS="cms"
+HP="hp"
+
+BASENAME="mxchange"
+VER="0.3.0"
+PRE=""
+
+SMALL="small"
+MEDIUM="medium"
+MAX="max"
+
+ZIP="/usr/bin/zip"
+BZIP2="/usr/bin/bzip2"
+
+# Target directory
+TARGET=$BASEDIR/$BASENAME
+
+# Archive stuff
+if test "$PRE" != ""; then
+       TAR_ARC="$BASENAME-$VER-pre$PRE.tar"
+       ZIP_ARC="$BASENAME-$VER-pre$PRE.zip"
+       TAR_SMALL=""
+       ZIP_SMALL=""
+       TAR_MEDIUM=""
+       ZIP_MEDIUM=""
+       TAR_MAX=""
+       ZIP_MAX=""
+ else
+       TAR_ARC="$BASENAME-$VER.tar"
+       ZIP_ARC="$BASENAME-$VER.zip"
+       TAR_SMALL="$BASENAME-$SMALL-$VER.tar"
+       ZIP_SMALL="$BASENAME-$SMALL-$VER.zip"
+       TAR_MEDIUM="$BASENAME-$MEDIUM-$VER.tar"
+       ZIP_MEDIUM="$BASENAME-$MEDIUM-$VER.zip"
+       TAR_MAX="$BASENAME-$MAX-$VER.tar"
+       ZIP_MAX="$BASENAME-$MAX-$VER.zip"
+fi
+
+# Files stuff which will be archived
+CP_FILES="ChangeLog* README $HTML/ $HTML/DOCS/??/LICENSE*"
+
+# Convert files
+cd $BASEDIR
+CONV_FILES="ChangeLog* README DOCS/??/* *.de *.en *.php *.css *.sql robots.txt .htaccess *.tpl DOCS/??/*"
+
+# Files to be removed before any archiving steps
+RM_FILES="$BASENAME-$VER/$HTML/*.zip $BASENAME-$VER/$HTML/temp/ $BASENAME-$VER/$HTML/upgrade???to*.sql"
+RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/inc/class.*.php $BASENAME-$VER/$HTML/.htaccess $BASENAME/$HTML/test.php"
+RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/inc/cache/*.cache $BASENAME/$HTML/inc/cache/*.cache $BASENAME/$HTML/*.log"
+RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/test.php $BASENAME-$VER/$HTML/*.log $BASENAME-$VER/$HTML/sql_fixes.sql"
+RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/jackpot.sql"
+
+# Files to be remove before CVS update
+RM_FILES_CVS="../$BASENAME-$VER/$HTML/inc/cache/*.cache ../$BASENAME-$CMS-$CMS_VER/$HTML/inc/cache/*.cache"
+RM_FILES_CVS="$RM_FILES_CVS $HTML/inc/cache/*.cache ../$BASENAME-$HP-$HP_VER/$HTML/inc/cache/*.cache"
+
+# Files to be added in extension archives
+EXT_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/EXTENSIONS.*"
+
+# Files to be added in command archives
+CMDS_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/README_engine.*"
+
+# Files to be added in theme archives
+THEME_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/README_themes*"
+
+# Copy options and target directories
+CP_OPTIONS="--parent -R --verbose --preserve=all"
+
+# Importing CVS settings
+. $THIS_DIR/.cvs.sh
+
+if test "$CVS_ENABLE" = "auto"; then
+       # Auto-detect CVS update
+       if test "$1" = ""; then
+               # Switch off CVS update
+               CVS="no"
+        else
+               # Switch on CVS update
+               CVS="yes"
+       fi
+ else
+       CVS="$CVS_ENABLE"
+fi
+cd - > /dev/null 2>&1
diff --git a/contrib/updater/.cvs.sh b/contrib/updater/.cvs.sh
new file mode 100755 (executable)
index 0000000..057dd11
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".cvs.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# CVS stuff
+CVS_USER="user"
+CVS_HOST="www.mxchange.org"
+CVS_BASE="cvsroot"
+CVSROOT=":pserver:$CVS_USER@$CVS_HOST:/$CVS_BASE/$BASENAME"
+CVS_RSH="ssh"
+CVS_LOG="cvs.log"
+STATS_OUT="statcvs-xml-out"
+STATS_FTP_DIR="stats/htdocs/"
+STATS_CVS="/Homepages/Tripod/Files/Java/statcvs-xml-0.9.6-full.jar"
+JAVA="/opt/jdk/bin/java"
+LOG_MSG="$1"
+
+export CVSROOT
+export CVS_RSH
diff --git a/contrib/updater/.extensions.sh b/contrib/updater/.extensions.sh
new file mode 100755 (executable)
index 0000000..abb409c
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".extensions.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# Debugging extensions (will be moved first!)
+DEBUG_EXT="sql-upgrades"
+
+# Addional extensions
+BASE_EXT="support order user register mydata mailid other online sql_patches newsletter mediadata theme"
+BASE_EXT="$BASE_EXT repair html_mail filter"
+
+# Extensions for compilation "Small"
+SMALL_EXT="forum birthday nickname profile msgs transfer signup cache active popup optimize beg caution"
+SMALL_EXT="$SMALL_EXT top10 doubler experience country autopurge holiday rallye contact maintenance"
+SMALL_EXT="$SMALL_EXT digit"
+
+# Extensions for compilation "Medium"
+MEDIUM_EXT="admins bonus payout paidlinks paidstart partner admintheme demo task shredder sponsor gbook"
+MEDIUM_EXT="$MEDIUM_EXT jackpot downline cancel guestnl recycle blocks lists mods premium clock blog"
+
+# Extensions for compilation "Max"
+MAX_EXT="shop directory help auctions affiliate usrlog dbhistory editcfg resolv faq layer downloads"
+MAX_EXT="$MAX_EXT gallery club engine readonly rewrite survey anonstats classifieds coupon tracksys"
+MAX_EXT="$MAX_EXT surf project product jobs tracking dbstats deposit edittpl jokes party shout lottery"
+MAX_EXT="$MAX_EXT howto ticker donate exchange search marathon xmas trade toplist refund"
+
+# Extensions to upload on FTP server
+UPLOAD_EXT=""
diff --git a/contrib/updater/.ftp.sh b/contrib/updater/.ftp.sh
new file mode 100755 (executable)
index 0000000..bc54df3
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".ftp.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# FTP stuff
+FTP="/usr/bin/ncftpput"
+FTP_PSWD="$HOME/.ftp_pass"
+FTP_HOST="www.mxchange.org"
+FTP_USER=""
+FTP_PASS="`cat $FTP_PSWD 2>/dev/null`"
+FTP_DIR="htdocs/extensions"
diff --git a/contrib/updater/.functions.sh b/contrib/updater/.functions.sh
new file mode 100755 (executable)
index 0000000..1c6ce3f
--- /dev/null
@@ -0,0 +1,582 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".functions.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+function ftp_init()
+{
+       if test "$FTP_PASS" = ""; then
+               echo "No FTP password file '$FTP_PSWD'.. Creating one"
+               echo -n "Enter password to continue: "
+               read -s pass1
+               echo "okay"
+               echo -n "Enter password again to confirm: "
+               read -s pass2
+               echo "okay"
+               if test "$pass1" = "$pass2"; then
+                       if test ! "$pass1" = ""; then
+                               echo -n "Creating password file ($FTP_PSWD)... "
+                               echo -n "$pass1">$FTP_PSWD
+                               FTP_PASS="`cat $FTP_PSWD >/dev/null 2>&1`"
+                               echo "done"
+                        else
+                               echo "Empty password entered!"
+                               exit 0
+                       fi
+                else
+                       echo "Passwords didn't match!"
+                       exit 0
+               fi
+        else
+               echo "FTP password loaded from file $FTP_PSWD."
+       fi
+}
+
+function ftp_upload()
+{
+       cd $UPLOAD_DIR
+       echo -n "Uploading extensions... ("
+       for upload in $UPLOAD_EXT; do
+               echo -n "$upload "
+               TARGET="ext-$upload.*"
+               $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $FTP_DIR $TARGET > /dev/null 2>&1
+       done
+       echo ") done"
+}
+
+function cms_ftp_upload()
+{
+       cd $CMS_UPLOAD_DIR
+       echo -n "Uploading CMS extensions... ("
+       for upload in $UPLOAD_CMS_EXT; do
+               echo -n "$upload "
+               TARGET="ext-$upload.*"
+               $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $CMS_FTP_DIR $TARGET > /dev/null 2>&1
+       done
+       echo ") done"
+}
+
+function themes_ftp_upload()
+{
+       cd $THEMES_UPLOAD_DIR
+       echo -n "Uploading themes... ("
+       for upload in $UPLOAD_THEMES; do
+               echo -n "$upload "
+               TARGET="theme-$upload.*"
+               $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $THEMES_FTP_DIR $TARGET > /dev/null 2>&1
+       done
+       echo ") done"
+}
+
+function hp_ftp_upload()
+{
+       cd $HP_UPLOAD_DIR
+       echo -n "Uploading HP extensions... ("
+       for upload in $UPLOAD_HP_EXT; do
+               echo -n "$upload "
+               TARGET="ext-$upload.*"
+               $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $HP_FTP_DIR $TARGET > /dev/null 2>&1
+       done
+       echo ") done"
+}
+
+function init_file_system()
+{
+       echo -n "Creating missing dirs... "
+       mkdir $TARGET/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $TARGET-$VER/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $TARGET-$CMS/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $TARGET-$CMS-$CMS_VER/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $TARGET-$HP/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $TARGET-$HP-$HP_VER/ > /dev/null 2>&1
+       echo -n "."
+       mkdir $THIS_DIR/org/cmds/ > /dev/null 2>&1
+       for sect in $CMDS_SECTIONS; do
+               echo -n "."
+               mkdir $THIS_DIR/org/cmds/$sect > /dev/null 2>&1
+               cp $THIS_DIR/.htaccess_cmds $THIS_DIR/org/cmds/$sect/.htaccess > /dev/null 2>&1
+       done
+       echo " done"
+
+       echo -n "Copying files... "
+       cp $CP_OPTIONS $CP_FILES $TARGET > /dev/null 2>&1
+       echo -n "."
+       cp $CP_OPTIONS $CMS_FILES $TARGET-$CMS > /dev/null 2>&1
+       echo -n "."
+       cp $CP_OPTIONS $HP_FILES $TARGET-$HP > /dev/null 2>&1
+       echo " done"
+       echo -n "Removing logs and usage links... "
+       rm -f $TARGET/$HTML/logs $TARGRT/$HTML/usage > /dev/null 2>&1
+       echo -n "."
+       rm -f $TARGET-$CMS/$CMS/logs $TARGRT-$CMS/$CMS/usage > /dev/null 2>&1
+       echo -n "."
+       rm -f $TARGET-$HP/$HP/logs $TARGRT-$HP/$HP/usage > /dev/null 2>&1
+       echo " done"
+       cd $BASEDIR
+       echo -n "Converting files... "
+       for target in $CONV_FILES; do
+               echo -n "."
+               find $TARGET/ -type f -name "$target" -exec unix2dos -p {} \; > /dev/null 2>&1
+               find $TARGET-$CMS/ -type f -name "$target" -exec unix2dos -p {} \; > /dev/null 2>&1
+               find $TARGET-$HP/ -type f -name "$target" -exec unix2dos -p {} \; > /dev/null 2>&1
+       done
+       echo " done"
+       echo -n "Moving files... "
+       mv $TARGET/$HTML/inc2/* $TARGET/$HTML/inc/ > /dev/null 2>&1
+       rmdir $TARGET/$HTML/inc2 > /dev/null 2>&1
+       echo -n "."
+       mv $TARGET-$CMS/$CMS/inc2/* $TARGET-$CMS/$CMS/inc/ > /dev/null 2>&1
+       rmdir $TARGET-$CMS/$CMS/inc2 > /dev/null 2>&1
+       echo -n "."
+       mv $TARGET-$HP/$HP/inc2/* $TARGET-$HP/$HP/inc/ > /dev/null 2>&1
+       rmdir $TARGET-$HP/$HP/inc2 > /dev/null 2>&1
+       echo " done"
+       cd $TARGET
+}
+
+function remove_files()
+{
+       cd $TARGET/..
+       echo -n "Removing files... "
+       rm -f $TAR_ARC* $CMS_TAR* $HP_TAR* > /dev/null 2>&1
+       echo -n "."
+       rm -f $ZIP_ARC* $CMS_ZIP* $HP_ZIP* > /dev/null 2>&1
+       cd $BASENAME
+       cp $CP_OPTIONS * ../$BASENAME-$VER > /dev/null 2>&1
+       echo -n "."
+       cd ../$BASENAME-$CMS
+       cp $CP_OPTIONS * ../$BASENAME-$CMS-$CMS_VER > /dev/null 2>&1
+       cd ../$BASENAME-$HP
+       cp $CP_OPTIONS * ../$BASENAME-$HP-$HP_VER > /dev/null 2>&1
+       cd ..
+       echo -n "."
+       find $BASENAME-$VER/ -name "CVS" -exec rm -rf {} \; > /dev/null 2>&1
+       echo -n "."
+       find $BASENAME-$CMS-$CMS_VER/ -name "CVS" -exec rm -rf {} \; > /dev/null 2>&1
+       echo -n "."
+       find $BASENAME-$HP-$HP_VER/ -name "CVS" -exec rm -rf {} \; > /dev/null 2>&1
+       echo -n "."
+       rm -rf $RM_FILES > /dev/null 2>&1
+       echo " done"
+}
+
+function ext_update()
+{
+       # Create version file when it doesn't exists
+       if test ! -e "$BASEDIR/$EXT_DIR/$EXT-$e.ver"; then
+               echo -n "0.0" > "$BASEDIR/$EXT_DIR/$EXT-$e.ver"
+       fi
+       # Create text file from template or set default text message
+       if test -e "$BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl"; then
+               echo "de:`cat $BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl`" > "$BASEDIR/$EXT_DIR/$EXT-$e.txt"
+        elif test ! -e "$BASEDIR/$EXT_DIR/$EXT-$e.txt"; then
+               echo "de:" > "$BASEDIR/$EXT_DIR/$EXT-$e.txt"
+       fi
+}
+
+function cms_ext_update()
+{
+       # Create version file when it doesn't exists
+       if test ! -e "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.ver"; then
+               echo -n "0.0" > "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.ver"
+       fi
+       # Create text file from template or set default text message
+       if test -e "$BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl"; then
+               echo "de:`cat $BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl`" > "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.txt"
+        elif test ! -e "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.txt"; then
+               echo "de:" > "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.txt"
+       fi
+}
+
+function hp_ext_update()
+{
+       # Create version file when it doesn't exists
+       if test ! -e "$BASEDIR/$HP_EXT_DIR/$EXT-$e.ver"; then
+               echo -n "0.0" > "$BASEDIR/$HP_EXT_DIR/$EXT-$e.ver"
+       fi
+       # Create text file from template or set default text message
+       if test -e "$BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl"; then
+               echo "de:`cat $BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$e.tpl`" > "$BASEDIR/$HP_EXT_DIR/$EXT-$e.txt"
+        elif test ! -e "$BASEDIR/$HP_EXT_DIR/$EXT-$e.txt"; then
+               echo "de:" > "$BASEDIR/$HP_EXT_DIR/$EXT-$e.txt"
+       fi
+}
+
+function cmds_update()
+{
+       # Create version file when it doesn't exists
+       if test ! -e "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.ver"; then
+               echo -n "0.0" > "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.ver"
+       fi
+       # Create text file from template or set default text message
+       if test -e "$THIS_DIR/html/templates/de/$HTML/engine/$CMDS/$c_dir/cmds_$c.tpl"; then
+               echo "de:`cat $THIS_DIR/html/templates/de/$HTML/engine/$CMDS/$c_dir/cmds_$c.tpl`" > "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.txt"
+        elif test ! -e "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.txt"; then
+               # Check if directory was found
+               if test ! -e "$THIS_DIR/$HTML/templates/de/$HTML/engine/$CMDS/$c_dir/.htaccess"; then
+                       # Create missing directory
+                       mkdir "$THIS_DIR/$HTML/templates/de/$HTML/engine/$CMDS/" > /dev/null 2>&1
+                       mkdir "$THIS_DIR/$HTML/templates/de/$HTML/engine/$CMDS/$c_dir/" > /dev/null 2>&1
+                       # Copy missing .htaccess file
+                       cp $THIS_DIR/$HTML/templates/.htaccess "$THIS_DIR/$HTML/templates/de/$HTML/engine/$CMDS/$c_dir/" > /dev/null 2>&1
+               fi
+               # Create missing file
+               echo -n "" > "$THIS_DIR/$HTML/templates/de/$HTML/engine/$CMDS/$c_dir/cmds_$c.tpl"
+               echo -n "" > "templates/de/$HTML/engine/$CMDS/$c_dir/cmds_$c.tpl"
+               # Update archive file with latest date
+               zip -9qp "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.zip" "templates/de/$HTML/engine/$CMDS/$c_dir/cmds_$c.tpl" "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c" "templates/de/$HTML/engine/$CMDS/$c_dir/.htaccess" > /dev/null 2>&1
+               # Create missing file
+               echo "de:" > "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.txt"
+       fi
+}
+
+function theme_update()
+{
+       # Create version file when it doesn't exists
+       if test ! -e "$BASEDIR/$THEME_DIR/$THEME-$t.ver"; then
+               echo -n "0.0" > "$BASEDIR/$THEME_DIR/$THEME-$t.ver"
+       fi
+       # Create text file from template or set default text message
+       if test -e "$BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$t.tpl"; then
+               echo "de:`cat $BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$t.tpl`" > "$BASEDIR/$THEME_DIR/$THEME-$t.txt"
+        elif test ! -e "$BASEDIR/$THEME_DIR/$THEME-$t.txt"; then
+               echo -n "" > "$BASEDIR/$BASENAME/$HTML/templates/de/$HTML/ext/ext_$t.tpl"
+               echo "de:" > "$BASEDIR/$THEME_DIR/$THEME-$t.txt"
+       fi
+}
+
+function zip_packages()
+{
+       if test ! $TAR_MAX == ""; then
+               cd $BASEDIR
+               echo -n "Creating archive $TAR_MAX... "
+               tar -cf $TAR_MAX $BASENAME-$VER/ > /dev/null 2>&1
+               $BZIP2 -9f $TAR_MAX > /dev/null 2>&1
+               echo "done"
+               echo -n "Creating archive $ZIP_MAX... "
+               $ZIP -9r  $ZIP_MAX $BASENAME-$VER/ > /dev/null 2>&1
+               echo "done"
+               cd $BASEDIR/$BASENAME-$VER/$HTML/
+               echo -n "Creating $MAX extension archives... ("
+               for e in $MAX_EXT; do
+                       rm -f "$BASEDIR/$EXT_DIR/$EXT-$e.zip"
+                       ###########
+                       find -name "*$e*" -exec $ZIP -9qrm "$BASEDIR/$EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+                       $ZIP -9q "$BASEDIR/$EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+                       ###########
+                       ext_update
+                       echo -n "$e "
+               done
+               echo ") done"
+       fi
+       if test ! $TAR_MEDIUM == ""; then
+               cd $BASEDIR
+               echo -n "Creating archive $TAR_MEDIUM... "
+               tar -cf $TAR_MEDIUM $BASENAME-$VER/ > /dev/null 2>&1
+               $BZIP2 -9f $TAR_MEDIUM > /dev/null 2>&1
+               echo "done"
+               echo -n "Creating archive $ZIP_MEDIUM... "
+               $ZIP -9r  $ZIP_MEDIUM $BASENAME-$VER/ > /dev/null 2>&1
+               echo "done"
+               cd $BASEDIR/$BASENAME-$VER/$HTML/
+               echo -n "Creating $MEDIUM extension archives... ("
+               for e in $MEDIUM_EXT; do
+                       rm -f "$BASEDIR/$EXT_DIR/$EXT-$e.zip"
+                       ###########
+                       find -name "*$e*" -exec $ZIP -9qrm "$BASEDIR/$EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+                       $ZIP -9q "$BASEDIR/$EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+                       ###########
+                       ext_update
+                       echo -n "$e "
+               done
+               echo ") done"
+       fi
+       if test ! $TAR_SMALL == ""; then
+               cd $BASEDIR
+               echo -n "Creating archive $TAR_SMALL... "
+               tar -cf $TAR_SMALL $BASENAME-$VER/ > /dev/null 2>&1
+               $BZIP2 -9f $TAR_SMALL > /dev/null 2>&1
+               echo "done"
+               echo -n "Creating archive $ZIP_SMALL... "
+               $ZIP -9r  $ZIP_SMALL $BASENAME-$VER/ > /dev/null 2>&1
+               echo "done"
+               cd $BASEDIR/$BASENAME-$VER/$HTML/
+               echo -n "Creating $SMALL extension archives... ("
+               for e in $SMALL_EXT; do
+                       rm -f "$BASEDIR/$EXT_DIR/$EXT-$e.zip"
+                       ###########
+                       find -name "*$e*" -exec $ZIP -9qrm "$BASEDIR/$EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+                       $ZIP -9q "$BASEDIR/$EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+                       ###########
+                       ext_update
+                       echo -n "$e "
+               done
+               echo ") done"
+       fi
+}
+
+function zip_cmds()
+{
+       cd $BASEDIR/$BASENAME-$VER/$HTML/
+       c_dir="status"
+       echo -n "Creating $c_dir command archives... ("
+       for c in $STATUS_CMDS; do
+               rm -f "$BASEDIR/$CMDS_DIR/$CMDS-$c.zip"
+               ###########
+               $ZIP -9q "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.zip" "inc/engine/$c_dir/cmd-$c.php" $CMDS_FILES > /dev/null 2>&1
+               ###########
+               cmds_update
+               echo -n "$c "
+       done
+       echo ") done"
+
+       c_dir="export"
+       echo -n "Creating $c_dir command archives... ("
+       for c in $EXPORT_CMDS; do
+               rm -f "$BASEDIR/$CMDS_DIR/$CMDS-$c.zip"
+               ###########
+               $ZIP -9q "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.zip" "inc/engine/$c_dir/cmd-$c.php" $CMDS_FILES > /dev/null 2>&1
+               ###########
+               cmds_update
+               echo -n "$c "
+       done
+       echo ") done"
+
+       c_dir="rmember"
+       echo -n "Creating $c_dir command archives... ("
+       for c in $RMEMBER_CMDS; do
+               rm -f "$BASEDIR/$CMDS_DIR/$CMDS-$c.zip"
+               ###########
+               $ZIP -9q "$BASEDIR/$CMDS_DIR/$c_dir/$CMDS-$c.zip" "inc/engine/$c_dir/cmd-$c.php" $CMDS_FILES > /dev/null 2>&1
+               ###########
+               cmds_update
+               echo -n "$c "
+       done
+       echo ") done"
+}
+
+function zip_debug_ext()
+{
+       cd $BASEDIR/$BASENAME-$VER/$HTML/
+       echo -n "Creating debug extension archives... ("
+       for e in $DEBUG_EXT; do
+               rm -f "$BASEDIR/$EXT_DIR/$EXT-$e.zip"
+               ###########
+               find -name "*$e*" -exec $ZIP -9qmr "$BASEDIR/$EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               ext_update
+               echo -n "$e "
+       done
+       echo ") done"
+}
+
+function zip_extensions()
+{
+       cd $BASEDIR/$BASENAME-$VER/$HTML/
+       echo -n "Creating base extension archives... ("
+       for e in $BASE_EXT; do
+               rm -f "$BASEDIR/$EXT_DIR/$EXT-$e.zip"
+               EXC=""
+               if test "$e" = "theme"; then
+                       EXC="-path ./theme -prune -o -print"
+               fi
+               ###########
+               find $EXC -name "*$e*" -exec $ZIP -9qr "$BASEDIR/$EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               ext_update
+               echo -n "$e "
+       done
+       echo ") done"
+}
+
+function zip_cms_extensions()
+{
+       cd $BASEDIR/$BASENAME-$CMS-$CMS_VER/$CMS/
+       echo -n "Creating $CMS extension archives... ("
+       for e in $CMS_EXT; do
+               rm -f "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.zip"
+               EXC=""
+               if test "$e" = "theme"; then
+                       EXC="-path ./theme -prune -o -print"
+               fi
+               ###########
+               find $EXC -name "*$e*" -exec $ZIP -9qr "$BASEDIR/$CMS_EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               cms_ext_update
+               echo -n "$e "
+       done
+       for e in $CMS_EXTRA_EXT; do
+               rm -f "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.zip"
+               ###########
+               find -name "*$e*" -exec $ZIP -9qrm "$BASEDIR/$CMS_EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$CMS_EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               cms_ext_update
+               echo -n "$e "
+       done
+       echo ") done"
+}
+
+function zip_hp_extensions()
+{
+       cd $BASEDIR/$BASENAME-$HP-$HP_VER/$HP/
+       echo -n "Creating $HP extension archives... ("
+       for e in $HP_EXT; do
+               rm -f "$BASEDIR/$HP_EXT_DIR/$EXT-$e.zip"
+               EXC=""
+               if test "$e" = "theme"; then
+                       EXC="-path ./theme -prune -o -print"
+               fi
+               ###########
+               find $EXC -name "*$e*" -exec $ZIP -9qr "$BASEDIR/$HP_EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$HP_EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               hp_ext_update
+               echo -n "$e "
+       done
+       for e in $HP_EXTRA_EXT; do
+               rm -f "$BASEDIR/$HP_EXT_DIR/$EXT-$e.zip"
+               ###########
+               find -name "*$e*" -exec $ZIP -9qrm "$BASEDIR/$HP_EXT_DIR/$EXT-$e" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$HP_EXT_DIR/$EXT-$e.zip" $EXT_FILES > /dev/null 2>&1
+               ###########
+               hp_ext_update
+               echo -n "$e "
+       done
+       echo ") done"
+}
+
+function zip_base_themes()
+{
+       cd $BASEDIR/$BASENAME-$VER/$HTML/
+       echo -n "Creating base theme archives... ("
+       for t in $BASE_THEMES; do
+               rm -f "$BASEDIR/$THEME_DIR/$THEME-$t.zip"
+               ###########
+               find theme/ -name "*$t*" -exec $ZIP -9qr "$BASEDIR/$THEME_DIR/$THEME-$t" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$THEME_DIR/$THEME-$t.zip" $THEME_FILES > /dev/null 2>&1
+               ###########
+               theme_update
+               echo -n "$t "
+       done
+       echo ") done"
+}
+
+function zip_themes()
+{
+       cd $BASEDIR/$BASENAME-$VER/$HTML/
+       echo -n "Creating theme archives... ("
+       for t in $THEMES; do
+               rm -f "$BASEDIR/$THEME_DIR/$THEME-$t.zip"
+               ###########
+               find theme/ -name "*$t*" -exec $ZIP -9qmr "$BASEDIR/$THEME_DIR/$THEME-$t" {} \; > /dev/null 2>&1
+               $ZIP -9q "$BASEDIR/$THEME_DIR/$THEME-$t.zip" $THEME_FILES > /dev/null 2>&1
+               ###########
+               theme_update
+               echo -n "$t "
+       done
+       echo ") done"
+}
+
+function zip_base_archives()
+{
+       cd $BASEDIR
+       # Tar ball
+       echo -n "Creating archive $TAR_ARC ... "
+       tar -cf $TAR_ARC $BASENAME-$VER/ > /dev/null 2>&1
+       $BZIP2 -9f $TAR_ARC > /dev/null 2>&1
+       echo "done"
+       echo -n "Creating archive $CMS_TAR ... "
+       tar -cf $CMS_TAR $BASENAME-$CMS-$CMS_VER/ > /dev/null 2>&1
+       $BZIP2 -9f $CMS_TAR > /dev/null 2>&1
+       echo "done"
+       echo -n "Creating archive $HP_TAR ... "
+       tar -cf $HP_TAR $BASENAME-$HP-$HP_VER/ > /dev/null 2>&1
+       $BZIP2 -9f $HP_TAR > /dev/null 2>&1
+       echo "done"
+
+       # ZIP file
+       echo -n "Creating archive $ZIP_ARC ... "
+       $ZIP -9r $ZIP_ARC $BASENAME-$VER/* > /dev/null 2>&1
+       echo "done"
+       echo -n "Creating archive $CMS_ZIP ... "
+       $ZIP -9r $CMS_ZIP $BASENAME-$CMS-$CMS_VER/* > /dev/null 2>&1
+       echo "done"
+       echo -n "Creating archive $HP_ZIP ... "
+       $ZIP -9r $HP_ZIP $BASENAME-$HP-$HP_VER/* > /dev/null 2>&1
+       echo "done"
+}
+
+function cvs_update()
+{
+       cd $BASEDIR/$BASENAME
+       echo -n "Preparing upload... "
+       rm -rf $RM_FILES_CVS > /dev/null 2>&1
+       echo "done"
+       echo
+       cvs login || exit 255
+       echo
+       echo "Importing $BASENAME..."
+       cvs -z3 import -m "$LOG_MSG" -I \*.zip -I \*.bz2 "$BASENAME" "$BASENAME" start || exit 255
+       cd $BASEDIR/$BASENAME-$CMS
+       echo
+       echo "Importing $BASENAME-$CMS..."
+       cvs -z3 import -m "$LOG_MSG" -I \*.zip -I \*.bz2 "$BASENAME-$CMS" "$BASENAME-$CMS" start || exit 255
+       cd $BASEDIR/$BASENAME-$HP
+       echo
+       echo "Importing $BASENAME-$HP..."
+       cvs -z3 import -m "$LOG_MSG" -I \*.zip -I \*.bz2 "$BASENAME-$HP" "$BASENAME-$HP" start || exit 255
+       cd $BASEDIR
+       echo
+       echo -n "Logging CVS changes..."
+       cvs -z3 log $BASENAME > $CVS_LOG || exit 255
+       echo "done"
+       echo
+       cvs logout
+       echo
+       echo -n "Generating statistics... "
+       $JAVA -jar $STATS_CVS >/dev/null 2>&1
+       echo "done"
+       cd $STATS_OUT
+       echo -n "Uploading statistics... "
+       $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $STATS_FTP_DIR *.* > /dev/null 2>&1
+       echo " done"
+       cd $BASEDIR
+}
+
+function stats_upload()
+{
+       echo -n "Uploading statistics... "
+       $FTP -u $FTP_USER -p $FTP_PASS $FTP_HOST $STATS_FTP_DIR *.* > /dev/null 2>&1
+       echo " done"
+}
+
+function cvs_download()
+{
+       cd $BASEDIR
+       echo -n "Preparing download... "
+       rm -rf $RM_FILES_CVS $BASENAME/* $BASENAME-$CMS/* $BASENAME-$HP/* > /dev/null 2>&1
+       echo "done"
+       echo
+       cvs login
+       echo "Connecting to CVS server..."
+       cvs -z3 checkout "$BASENAME" || exit 255
+       echo
+       echo "Connecting to CVS server..."
+       cvs -z3 checkout "$BASENAME-$CMS" "$BASENAME-$CMS" || exit 255
+       echo
+       echo "Connecting to CVS server..."
+       cvs -z3 checkout "$BASENAME-$HP" "$BASENAME-$HP" || exit 255
+       echo
+       cvs logout
+}
diff --git a/contrib/updater/.hp.sh b/contrib/updater/.hp.sh
new file mode 100755 (executable)
index 0000000..2ee9d30
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".hp.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# General config stuff
+HP_EXT_DIR="mxchange_ext_hp"
+
+# Versions
+HP_VER="0.0.1"
+HP_PRE=""
+
+# FTP directory
+HP_UPLOAD_DIR="$BASEDIR/$HP_EXT_DIR"
+HP_FTP_DIR="html/homepage/extensions"
+
+# Archive stuff
+if test "$HP_PRE" != ""; then
+       HP_TAR="$BASENAME-$HP-$HP_VER-pre$HP_PRE.tar"
+       HP_ZIP="$BASENAME-$HP-$HP_VER-pre$HP_PRE.zip"
+ else
+       HP_TAR="$BASENAME-$HP-$HP_VER.tar"
+       HP_ZIP="$BASENAME-$HP-$HP_VER.zip"
+fi
+
+# Files stuff which will be archived
+HP_FILES="ChangeLog* README $HP/ $HP/DOCS/LICENSE*"
+
+# Base HP extensions
+HP_EXT="other online sql_patches update theme"
+
+# Extra ported extensions
+HP_EXTRA_EXT="autopurge task admins"
+
+# Extensions to be uploaded
+#UPLOAD_HP_EXT="$HP_EXT $HP_EXTRA_EXT"
+UPLOAD_HP_EXT=""
diff --git a/contrib/updater/.themes.sh b/contrib/updater/.themes.sh
new file mode 100755 (executable)
index 0000000..b8786bf
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Self-test
+if test "`basename $0`" = ".themes.sh"; then
+       echo "Bye..."
+       exit 0
+fi
+
+# Directories
+THEMES_DIR="mxchange_themes"
+THEMES_UPLOAD_DIR="$BASEDIR/$THEMES_DIR"
+
+# FTP directories
+THEMES_FTP_DIR="html/themes"
+
+# Base themes
+BASE_THEMES="default business"
+
+# All available themes
+THEMES="desert"
+
+# Upload these themes
+#UPLOAD_THEMES="$BASE_THEMES $THEMES"
+UPLOAD_THEMES=""
diff --git a/contrib/updater/LICENSE b/contrib/updater/LICENSE
new file mode 100644 (file)
index 0000000..088a7de
--- /dev/null
@@ -0,0 +1,7 @@
+All these script files (*.sh) are given AS IS and WITHOUT ANY WARRANTY. They
+are helper scripts and helped me (cvs-updater.sh is the starting point) to
+package and upload my mailer project script.
+
+Have fun with it! But on your own risk!
+
+Roland (roland [at] mxchange [dot] org)
diff --git a/contrib/updater/cvs-updater.sh b/contrib/updater/cvs-updater.sh
new file mode 100755 (executable)
index 0000000..5cfea47
--- /dev/null
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Enable/Disable sub systems
+FTP_ENABLE="yes"       # yes/no
+CVS_ENABLE="auto"      # auto/yes/no
+
+# Initialization
+echo -n "Init... "
+. ./.config.sh
+echo -n "."
+. ./.cms.sh
+echo -n "."
+. ./.cmds.sh
+echo -n "."
+. ./.hp.sh
+echo -n "."
+. ./.ftp.sh
+echo -n "."
+. ./.functions.sh
+echo -n "."
+. ./.extensions.sh
+echo -n "."
+. ./.themes.sh
+echo " done"
+
+if test "$FTP_ENABLE" = "yes"; then
+       if test ! "$UPLOAD_EXT" = ""; then
+               # Initialize FTP system
+               ftp_init
+        else
+               if test ! "$UPLOAD_CMS_EXT" = ""; then
+                       # Initialize FTP system
+                       ftp_init
+                else
+                       if test ! "$UPLOAD_HP_EXT" = ""; then
+                               # Initialize FTP system
+                               ftp_init
+                        else
+                               if test ! "$UPLOAD_THEMES" = ""; then
+                                       # Initialize FTP system
+                                       ftp_init
+                                else
+                                       # Disbale FTP upload
+                                       FTP_ENABLE="no"
+                               fi
+                       fi
+               fi
+       fi
+fi
+
+# Create missing dirs, copy/move files
+init_file_system
+
+# Update CVS server
+if test "$1" == "-d"; then
+       cvs_download
+ else
+       if test "$1" == "-s"; then
+               stats_upload
+        else
+               if test "$CVS" == "yes"; then
+                       cvs_update
+               fi
+       fi
+fi
+
+# Remove files
+remove_files
+
+# Create theme archivs
+zip_themes
+
+# Create debug extensions first
+zip_debug_ext
+
+# Create command archives
+zip_cmds
+
+# Create Complete, Medium and Max archives
+zip_packages
+
+# Create extension archives
+zip_extensions
+zip_cms_extensions
+zip_hp_extensions
+
+# Create base theme archivs
+zip_base_themes
+
+# Create main archives
+zip_base_archives
+
+# Upload
+if test "$FTP_ENABLE" = "yes"; then
+       if test ! "$UPLOAD_EXT" = ""; then
+               ftp_upload
+       fi
+       if test ! "$UPLOAD_CMS_EXT" = ""; then
+               cms_ftp_upload
+       fi
+       if test ! "$UPLOAD_HP_EXT" = ""; then
+               hp_ftp_upload
+       fi
+       if test ! "$UPLOAD_THEMES" = ""; then
+               themes_ftp_upload
+       fi
+fi
+
+echo
+echo "All done! Bye..."
+echo
diff --git a/contrib/validator.sh b/contrib/validator.sh
new file mode 100755 (executable)
index 0000000..21eacf7
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+  echo "$0: Please execute this script from root directory."
+  exit 1
+fi
+
+echo "$0: Validating all templates..."
+DUMMY=`find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; 2>&1`
+echo "${DUMMY}" | \
+       grep "PHP Warning" | \
+       cut -d "/" -f 1-5 | \
+       grep -v "error parsing attribute name in" > DOCS/template-warnings.log
+echo "$0: done."
diff --git a/contrib/wrapper.sh b/contrib/wrapper.sh
new file mode 100755 (executable)
index 0000000..90eb784
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# This script helps to generate a list of requested, missing wrapper functions
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+grep --text "Please consider adding it to improve execution speed" inc/cache/debug.log* | \
+       grep -v top10_max | \
+       cut -d "|" -f 6 | \
+       cut -d " " -f 3 | \
+       sort --unique | \
+       grep -v "getActiveLimit" | \
+       grep -v "getBonusUserid" | \
+       grep -v "getTop10Max" > w.log
+
+cat w.log wrapper.log | sort --unique > w && mv w wrapper.log
+rm w.log