$content['sw'] = $SW;
// Then list it
- $OUT .= LOAD_TEMPLATE("admin_".$listType."_".$table."_row", true, $content);
+ $OUT .= LOAD_TEMPLATE(sprintf("admin_%s_%s_row",
+ $listType,
+ $table
+ ), true, $content
+ );
// Switch color
$SW = 3 - $SW;
} // END - foreach
// Load master template
- LOAD_TEMPLATE("admin_".$listType."_".$table."", false, $OUT);
+ LOAD_TEMPLATE(sprintf("admin_%s_%s",
+ $listType,
+ $table
+ ), false, $OUT
+ );
}
// Change status of "build" list
function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray) {
} // END - if
// Finish SQL statement
- $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." AND ".$statusColumn."='".$oldStatus."' LIMIT 1";
+ $SQL = substr($SQL, 0, -1) . sprintf(" WHERE %s=%s AND %s='%s' LIMIT 1",
+ $idColumn,
+ bigintval($id),
+ $statusColumn,
+ $oldStatus
+ );
// Run the SQL
SQL_QUERY($SQL, __FILE__, __LINE__);