]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/grade_functions.php
Rewrote many parts:
[mailer.git] / inc / libs / grade_functions.php
index c44ecbcec34c02ab99340b96ecf194623e1f1aaa..42c781db2a6825ff12750706831d148d9a4b416c 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -54,7 +54,7 @@ function generateGradeDataParentIdOptions ($defaultId = NULL) {
                } // END - if
 
                // Look for all
-               $result = SQL_QUERY('SELECT
+               $result = sqlQuery('SELECT
        `grade_id`,
        `grade_name`
 FROM
@@ -68,12 +68,12 @@ ORDER BY
                $gradeValues = array();
 
                // Are there entries?
-               if (!SQL_HASZERONUMS($result)) {
+               if (!ifSqlHasZeroNums($result)) {
                        // Load all entries
-                       while ($grade = SQL_FETCHARRAY($result)) {
+                       while ($grade = sqlFetchArray($result)) {
                                // Add it to arrays
-                               $gradeKeys[] = $grade['grade_id'];
-                               $gradeValues[] = $grade['grade_name'];
+                               array_push($gradeKeys  , $grade['grade_id']);
+                               array_push($gradeValues, $grade['grade_name']);
                        } // END - while
                } // END - if
 
@@ -86,12 +86,23 @@ ORDER BY
                );
 
                // Free result
-               SQL_FREERESULT($result);
+               sqlFreeResult($result);
        } // END - if
 
        // Return cache
        return $GLOBALS[__FUNCTION__][$defaultId];
 }
 
+// ----------------------------------------------------------------------------
+//                             XML call-back functions
+// ----------------------------------------------------------------------------
+
+// For 'doing' add grade data, the column-index is required
+function addXmlSpecialAdminAddDoGradeData () {
+       // So set it all here
+       $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction']  = 'column';
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column';
+}
+
 // [EOF]
 ?>