remove deprecated docs folder
							
								
								
									
										10
									
								
								cms/templates/cl_flex_slider.html
									
										
									
									
									
										Normale Datei
									
								
							
							
						
						|  | @ -0,0 +1,10 @@ | ||||||
|  | <div class="flexslider"> | ||||||
|  |     <ul class="slides"> | ||||||
|  |         <!-- BEGIN:BLOCK --> | ||||||
|  |         <li> | ||||||
|  |             <img src="{IMG}" alt="" /> | ||||||
|  |             <p class="flex-caption">{IMG_CAPTION}</p> | ||||||
|  |         </li> | ||||||
|  |         <!-- END:BLOCK --> | ||||||
|  |     </ul> | ||||||
|  | </div> | ||||||
| Vorher Breite: | Höhe: | Größe: 146 KiB Nachher Breite: | Höhe: | Größe: 146 KiB | 
| Vorher Breite: | Höhe: | Größe: 126 KiB Nachher Breite: | Höhe: | Größe: 126 KiB | 
| Vorher Breite: | Höhe: | Größe: 126 KiB Nachher Breite: | Höhe: | Größe: 126 KiB | 
| Vorher Breite: | Höhe: | Größe: 53 KiB Nachher Breite: | Höhe: | Größe: 53 KiB | 
|  | @ -213,7 +213,7 @@ class clDbBackup { | ||||||
|                         if (!isset($rows[$column])) { |                         if (!isset($rows[$column])) { | ||||||
|                             $values[] = 'NULL'; |                             $values[] = 'NULL'; | ||||||
|                         } else if ($rows[$column] != '') { |                         } else if ($rows[$column] != '') { | ||||||
|                             $values[] = '\'' . mysql_escape_string($rows[$column]) . '\''; |                             $values[] = '\'' . $this->_oDb->escape($rows[$column]) . '\''; | ||||||
|                         } else { |                         } else { | ||||||
|                             $values[] = '\'\''; |                             $values[] = '\'\''; | ||||||
|                         } |                         } | ||||||
|  |  | ||||||
|  | @ -6,10 +6,6 @@ | ||||||
|  * Description:  |  * Description:  | ||||||
|  * Validates the HTML |  * Validates the HTML | ||||||
|  * |  * | ||||||
|  * Requirements:  |  | ||||||
|  * @con_php_req 5.0 |  | ||||||
|  *  |  | ||||||
|  * |  | ||||||
|  * @package    Contenido Backend classes |  * @package    Contenido Backend classes | ||||||
|  * @version    1.6.1 |  * @version    1.6.1 | ||||||
|  * @author     unknown |  * @author     unknown | ||||||
|  | @ -19,13 +15,8 @@ | ||||||
|  * @link       http://www.contenido.org |  * @link       http://www.contenido.org | ||||||
|  * @since      file available since contenido release <= 4.6 |  * @since      file available since contenido release <= 4.6 | ||||||
|  *  |  *  | ||||||
|  * {@internal  |  | ||||||
|  *   created unknown |  | ||||||
|  *   modified 2008-07-02, Frederic Schneider, add security fix |  | ||||||
|  *  |  *  | ||||||
|  * $Id: class.htmlvalidator.php 312 2014-06-18 11:01:08Z oldperl $: |  * $Id: class.htmlvalidator.php 312 2014-06-18 11:01:08Z oldperl $: | ||||||
|  * }} |  | ||||||
|  *  |  | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| if(!defined('CON_FRAMEWORK')) { | if(!defined('CON_FRAMEWORK')) { | ||||||
|  | @ -60,6 +51,9 @@ class cHTMLValidator | ||||||
| 		// remove all php code from layout
 | 		// remove all php code from layout
 | ||||||
| 		$resultingHTML = preg_replace('/<\?(php)?((.)|(\s))*?\?>/i', '', $html); | 		$resultingHTML = preg_replace('/<\?(php)?((.)|(\s))*?\?>/i', '', $html); | ||||||
|                  |                  | ||||||
|  |                 // remove comments
 | ||||||
|  |                 $resultingHTML = preg_replace('/<\!--((.)|(\s))*?-->/i', '', $resultingHTML); | ||||||
|  |                  | ||||||
| 		/* We respect only \n, but we need to take care of windows (\n\r) and other systems (\r) */ | 		/* We respect only \n, but we need to take care of windows (\n\r) and other systems (\r) */ | ||||||
| 		$resultingHTML = str_replace("\r\n", "\n", $resultingHTML); | 		$resultingHTML = str_replace("\r\n", "\n", $resultingHTML); | ||||||
| 		$resultingHTML = str_replace("\r", "\n", $resultingHTML); | 		$resultingHTML = str_replace("\r", "\n", $resultingHTML); | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| <?php | <?php | ||||||
|  | 
 | ||||||
| /** | /** | ||||||
|  * Project:  |  * Project:  | ||||||
|  * Contenido Content Management System |  * Contenido Content Management System | ||||||
|  | @ -31,12 +32,10 @@ | ||||||
|  * }} |  * }} | ||||||
|  *  |  *  | ||||||
|  */ |  */ | ||||||
| 
 |  | ||||||
| if (!defined('CON_FRAMEWORK')) { | if (!defined('CON_FRAMEWORK')) { | ||||||
|     die('Illegal call'); |     die('Illegal call'); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| /** | /** | ||||||
|  * Function reduces long path names and creates a dynamic tooltipp which shows |  * Function reduces long path names and creates a dynamic tooltipp which shows | ||||||
|  * the full path name on mouseover |  * the full path name on mouseover | ||||||
|  | @ -84,8 +83,7 @@ function uplDirectoryListRecursive ($currentdir, $startdir=NULL, $files=array(), | ||||||
| 
 | 
 | ||||||
|     $unsorted_files = array(); |     $unsorted_files = array(); | ||||||
| 
 | 
 | ||||||
|     if (chdir ($currentdir) == false) |     if (chdir($currentdir) == false) { | ||||||
|     { |  | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -101,10 +99,12 @@ function uplDirectoryListRecursive ($currentdir, $startdir=NULL, $files=array(), | ||||||
|             if (is_dir($file)) { |             if (is_dir($file)) { | ||||||
|                 $unsorted_files[] = $file; |                 $unsorted_files[] = $file; | ||||||
|             } else { |             } else { | ||||||
|  |                  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     if (is_array($unsorted_files)) sort($unsorted_files); |     if (is_array($unsorted_files)) | ||||||
|  |         sort($unsorted_files); | ||||||
|     $sorted_files = $unsorted_files; |     $sorted_files = $unsorted_files; | ||||||
| 
 | 
 | ||||||
|     if (is_array($sorted_files)) { |     if (is_array($sorted_files)) { | ||||||
|  | @ -115,7 +115,8 @@ function uplDirectoryListRecursive ($currentdir, $startdir=NULL, $files=array(), | ||||||
|                         (opendir(getcwd() . "/" . $file) !== false)) { |                         (opendir(getcwd() . "/" . $file) !== false)) { | ||||||
|                     $a_file['name'] = $file; |                     $a_file['name'] = $file; | ||||||
|                     $a_file['depth'] = $depth; |                     $a_file['depth'] = $depth; | ||||||
|                     $a_file['pathstring']  = $pathstring.$file.'/';; |                     $a_file['pathstring'] = $pathstring . $file . '/'; | ||||||
|  |                     ; | ||||||
| 
 | 
 | ||||||
|                     $files[] = $a_file; |                     $files[] = $a_file; | ||||||
|                     // If $file is a directory take a look inside
 |                     // If $file is a directory take a look inside
 | ||||||
|  | @ -173,7 +174,6 @@ function upldelete($path, $files) { | ||||||
|                 $sql = "DELETE FROM " . $cfg["tab"]["upl"] . " WHERE idupl='" . Contenido_Security::toInteger($db->f("idupl")) . "'"; |                 $sql = "DELETE FROM " . $cfg["tab"]["upl"] . " WHERE idupl='" . Contenido_Security::toInteger($db->f("idupl")) . "'"; | ||||||
|                 $db->query($sql); |                 $db->query($sql); | ||||||
|             } |             } | ||||||
| 
 |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -187,8 +187,7 @@ function uplRecursiveRmDirIfEmpty($dir) { | ||||||
|     } |     } | ||||||
|     $directory = @opendir($dir); |     $directory = @opendir($dir); | ||||||
| 
 | 
 | ||||||
|     if (!$directory) |     if (!$directory) { | ||||||
|     { |  | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     readdir($directory); |     readdir($directory); | ||||||
|  | @ -211,8 +210,7 @@ function uplRecursiveRmDirIfEmpty($dir) { | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplHasFiles($dir) | function uplHasFiles($dir) { | ||||||
| { |  | ||||||
|     global $client, $cfgClient; |     global $client, $cfgClient; | ||||||
| 
 | 
 | ||||||
|     $directory = @opendir($cfgClient[$client]["upl"]["path"] . $dir); |     $directory = @opendir($cfgClient[$client]["upl"]["path"] . $dir); | ||||||
|  | @ -233,14 +231,12 @@ function uplHasFiles($dir) | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplHasSubdirs($dir) | function uplHasSubdirs($dir) { | ||||||
| { |  | ||||||
|     global $client, $cfgClient; |     global $client, $cfgClient; | ||||||
| 
 | 
 | ||||||
|     $directory = @opendir($cfgClient[$client]["upl"]["path"] . $dir); |     $directory = @opendir($cfgClient[$client]["upl"]["path"] . $dir); | ||||||
| 
 | 
 | ||||||
|     if (!$directory) |     if (!$directory) { | ||||||
|     { |  | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -249,10 +245,8 @@ function uplHasSubdirs($dir) | ||||||
|     $ret = false; |     $ret = false; | ||||||
| 
 | 
 | ||||||
|     while (false !== ($dir_entry = readdir($directory))) { |     while (false !== ($dir_entry = readdir($directory))) { | ||||||
|     		if ($dir_entry != "." && $dir_entry != "..") |         if ($dir_entry != "." && $dir_entry != "..") { | ||||||
|     		{ |             if (is_dir($cfgClient[$client]["upl"]["path"] . $dir . $dir_entry)) { | ||||||
|         		if (is_dir($cfgClient[$client]["upl"]["path"].$dir.$dir_entry)) |  | ||||||
|         		{ |  | ||||||
|                 closedir($directory); |                 closedir($directory); | ||||||
|                 return true; |                 return true; | ||||||
|             } |             } | ||||||
|  | @ -262,19 +256,16 @@ function uplHasSubdirs($dir) | ||||||
|     return ($ret); |     return ($ret); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| /** | /** | ||||||
|  * uplSyncDirectory ($path) |  * uplSyncDirectory ($path) | ||||||
|  * Sync database contents with directory |  * Sync database contents with directory | ||||||
|  * |  * | ||||||
|  * @param string $path Specifies the path to scan  |  * @param string $path Specifies the path to scan  | ||||||
|  */ |  */ | ||||||
| function uplSyncDirectory ($path) | function uplSyncDirectory($path) { | ||||||
| { |  | ||||||
|     global $cfgClient, $client, $cfg, $db; |     global $cfgClient, $client, $cfg, $db; | ||||||
| 
 | 
 | ||||||
| 	if (is_dbfs($path)) |     if (is_dbfs($path)) { | ||||||
| 	{ |  | ||||||
|         return uplSyncDirectoryDBFS($path); |         return uplSyncDirectoryDBFS($path); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -290,14 +281,11 @@ function uplSyncDirectory ($path) | ||||||
|     $dirhandle = @opendir($dir); |     $dirhandle = @opendir($dir); | ||||||
| 
 | 
 | ||||||
|     /* Whoops, probably failed to open. Return to the caller, but clean up stuff first. */ |     /* Whoops, probably failed to open. Return to the caller, but clean up stuff first. */ | ||||||
| 	if (!$dirhandle) |     if (!$dirhandle) { | ||||||
| 	{ |  | ||||||
|         $uploads->select("dirname = '$path' AND idclient = '$client'"); |         $uploads->select("dirname = '$path' AND idclient = '$client'"); | ||||||
| 
 | 
 | ||||||
|         while ($upload = $uploads->next()) |         while ($upload = $uploads->next()) { | ||||||
|         { |             if (!file_exists($cfgClient[$client]["upl"]["path"] . $upload->get("dirname") . $upload->get("filename"))) { | ||||||
|         	if (!file_exists($cfgClient[$client]["upl"]["path"].$upload->get("dirname").$upload->get("filename"))) |  | ||||||
|         	{ |  | ||||||
|                 $uploads->delete($upload->get("idupl")); |                 $uploads->delete($upload->get("idupl")); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -306,10 +294,8 @@ function uplSyncDirectory ($path) | ||||||
|         // So, we have to exclude dbfs-files, as they "don't exist" (-> file_exists)
 |         // So, we have to exclude dbfs-files, as they "don't exist" (-> file_exists)
 | ||||||
|         $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%' AND itemid NOT LIKE 'dbfs%'"); |         $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%' AND itemid NOT LIKE 'dbfs%'"); | ||||||
| 
 | 
 | ||||||
|        	while ($property = $properties->next()) |         while ($property = $properties->next()) { | ||||||
|        	{ |             if (!file_exists($cfgClient[$client]["upl"]["path"] . $property->get("itemid"))) { | ||||||
|        		if (!file_exists($cfgClient[$client]["upl"]["path"].$property->get("itemid"))) |  | ||||||
|     		{ |  | ||||||
|                 $properties->delete($property->get("idproperty")); |                 $properties->delete($property->get("idproperty")); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -319,12 +305,9 @@ function uplSyncDirectory ($path) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* Put all the files into the $files array */ |     /* Put all the files into the $files array */ | ||||||
| 	while ($file = readdir ($dirhandle)) |     while ($file = readdir($dirhandle)) { | ||||||
|     { |         if ($file != "." && $file != "..") { | ||||||
|     	if ($file != "." && $file != "..") |             if (is_file($file)) { | ||||||
|     	{ |  | ||||||
|     		if (is_file($file)) |  | ||||||
|     		{ |  | ||||||
|                 $uploads->sync($path, $file); |                 $uploads->sync($path, $file); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -332,10 +315,8 @@ function uplSyncDirectory ($path) | ||||||
| 
 | 
 | ||||||
|     $uploads->select("dirname = '$path' AND idclient = '$client'"); |     $uploads->select("dirname = '$path' AND idclient = '$client'"); | ||||||
| 
 | 
 | ||||||
|     while ($upload = $uploads->next()) |     while ($upload = $uploads->next()) { | ||||||
|     { |         if (!file_exists($cfgClient[$client]["upl"]["path"] . $upload->get("dirname") . $upload->get("filename"))) { | ||||||
|     	if (!file_exists($cfgClient[$client]["upl"]["path"].$upload->get("dirname").$upload->get("filename"))) |  | ||||||
|     	{ |  | ||||||
|             $uploads->delete($upload->get("idupl")); |             $uploads->delete($upload->get("idupl")); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -344,10 +325,8 @@ function uplSyncDirectory ($path) | ||||||
|     // So, we have to exclude dbfs-files, as they "don't exist" (-> file_exists)
 |     // So, we have to exclude dbfs-files, as they "don't exist" (-> file_exists)
 | ||||||
|     $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%' AND itemid NOT LIKE 'dbfs%'"); |     $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%' AND itemid NOT LIKE 'dbfs%'"); | ||||||
| 
 | 
 | ||||||
|    	while ($property = $properties->next()) |     while ($property = $properties->next()) { | ||||||
|    	{ |         if (!file_exists($cfgClient[$client]["upl"]["path"] . $property->get("itemid"))) { | ||||||
|    		if (!file_exists($cfgClient[$client]["upl"]["path"].$property->get("itemid"))) |  | ||||||
| 		{ |  | ||||||
|             $properties->delete($property->get("idproperty")); |             $properties->delete($property->get("idproperty")); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -361,24 +340,20 @@ function uplSyncDirectory ($path) | ||||||
|  * |  * | ||||||
|  * @param string $path Specifies the path to scan  |  * @param string $path Specifies the path to scan  | ||||||
|  */ |  */ | ||||||
| function uplSyncDirectoryDBFS ($path) | function uplSyncDirectoryDBFS($path) { | ||||||
| { |  | ||||||
|     global $cfgClient, $client, $cfg, $db; |     global $cfgClient, $client, $cfg, $db; | ||||||
| 
 | 
 | ||||||
|     $uploads = new UploadCollection; |     $uploads = new UploadCollection; | ||||||
|     $properties = new PropertyCollection; |     $properties = new PropertyCollection; | ||||||
|     $dbfs = new DBFSCollection; |     $dbfs = new DBFSCollection; | ||||||
| 
 | 
 | ||||||
|     if ($dbfs->dir_exists($path)) |     if ($dbfs->dir_exists($path)) { | ||||||
|     { |  | ||||||
|         $strippath = $dbfs->strip_path($path); |         $strippath = $dbfs->strip_path($path); | ||||||
| 
 | 
 | ||||||
|         $dbfs->select("dirname = '$strippath'"); |         $dbfs->select("dirname = '$strippath'"); | ||||||
| 
 | 
 | ||||||
|     	while ($file = $dbfs->next()) |         while ($file = $dbfs->next()) { | ||||||
|         { |             if ($file->get("filename") != ".") { | ||||||
|         	if ($file->get("filename") != ".") |  | ||||||
|         	{ |  | ||||||
|                 $uploads->sync($path . "/", $file->get("filename")); |                 $uploads->sync($path . "/", $file->get("filename")); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -386,20 +361,16 @@ function uplSyncDirectoryDBFS ($path) | ||||||
| 
 | 
 | ||||||
|     $uploads->select("dirname = '$path/' AND idclient = '$client'"); |     $uploads->select("dirname = '$path/' AND idclient = '$client'"); | ||||||
| 
 | 
 | ||||||
|     while ($upload = $uploads->next()) |     while ($upload = $uploads->next()) { | ||||||
|     { |         if (!$dbfs->file_exists($upload->get("dirname") . $upload->get("filename"))) { | ||||||
|     	if (!$dbfs->file_exists($upload->get("dirname").$upload->get("filename"))) |  | ||||||
|     	{ |  | ||||||
|             $uploads->delete($upload->get("idupl")); |             $uploads->delete($upload->get("idupl")); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%'"); |     $properties->select("idclient = '$client' AND itemtype='upload' AND type='file' AND itemid LIKE '" . $path . "%'"); | ||||||
| 
 | 
 | ||||||
|    	while ($property = $properties->next()) |     while ($property = $properties->next()) { | ||||||
|    	{ |         if (!$dbfs->file_exists($property->get("itemid"))) { | ||||||
|    		if (!$dbfs->file_exists($property->get("itemid"))) |  | ||||||
| 		{ |  | ||||||
|             $properties->delete($property->get("idproperty")); |             $properties->delete($property->get("idproperty")); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -407,13 +378,11 @@ function uplSyncDirectoryDBFS ($path) | ||||||
|     return; |     return; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| function uplmkdir($path, $name) { | function uplmkdir($path, $name) { | ||||||
| 
 | 
 | ||||||
|     global $cfgClient, $client, $action; |     global $cfgClient, $client, $action; | ||||||
| 
 | 
 | ||||||
|         if (is_dbfs($path)) |     if (is_dbfs($path)) { | ||||||
|         { |  | ||||||
|         $path = str_replace("dbfs:", "", $path); |         $path = str_replace("dbfs:", "", $path); | ||||||
| 
 | 
 | ||||||
|         $fullpath = $path . "/" . $name . "/."; |         $fullpath = $path . "/" . $name . "/."; | ||||||
|  | @ -435,8 +404,7 @@ function uplmkdir($path,$name) { | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplRenameDirectory ($oldpath, $newpath, $parent) | function uplRenameDirectory($oldpath, $newpath, $parent) { | ||||||
| { |  | ||||||
|     global $cfgClient, $client, $cfg, $db; |     global $cfgClient, $client, $cfg, $db; | ||||||
| 
 | 
 | ||||||
|     $db2 = new DB_ConLite; |     $db2 = new DB_ConLite; | ||||||
|  | @ -448,8 +416,7 @@ function uplRenameDirectory ($oldpath, $newpath, $parent) | ||||||
|     $sql = "SELECT dirname, idupl FROM " . $cfg["tab"]["upl"] . " WHERE idclient='" . Contenido_Security::toInteger($client) . "' AND dirname LIKE '" . Contenido_Security::escapeDB($parent, $db) . Contenido_Security::escapeDB($oldpath, $db) . "%'"; |     $sql = "SELECT dirname, idupl FROM " . $cfg["tab"]["upl"] . " WHERE idclient='" . Contenido_Security::toInteger($client) . "' AND dirname LIKE '" . Contenido_Security::escapeDB($parent, $db) . Contenido_Security::escapeDB($oldpath, $db) . "%'"; | ||||||
|     $db->query($sql); |     $db->query($sql); | ||||||
| 
 | 
 | ||||||
| 	while ($db->next_record()) |     while ($db->next_record()) { | ||||||
| 	{ |  | ||||||
|         $moldpath = $db->f("dirname"); |         $moldpath = $db->f("dirname"); | ||||||
|         $junk = substr($moldpath, strlen($parent) + strlen($oldpath)); |         $junk = substr($moldpath, strlen($parent) + strlen($oldpath)); | ||||||
| 
 | 
 | ||||||
|  | @ -458,14 +425,12 @@ function uplRenameDirectory ($oldpath, $newpath, $parent) | ||||||
|         $idupl = $db->f("idupl"); |         $idupl = $db->f("idupl"); | ||||||
|         $sql = "UPDATE " . $cfg["tab"]["upl"] . " SET dirname='" . Contenido_Security::escapeDB($newpath2, $db) . "' WHERE idupl = '" . Contenido_Security::toInteger($idupl) . "'"; |         $sql = "UPDATE " . $cfg["tab"]["upl"] . " SET dirname='" . Contenido_Security::escapeDB($newpath2, $db) . "' WHERE idupl = '" . Contenido_Security::toInteger($idupl) . "'"; | ||||||
|         $db2->query($sql); |         $db2->query($sql); | ||||||
| 		 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     $sql = "SELECT itemid, idproperty FROM " . $cfg["tab"]["properties"] . " WHERE itemid LIKE '" . Contenido_Security::escapeDB($parent, $db) . Contenido_Security::escapeDB($oldpath, $db) . "%'"; |     $sql = "SELECT itemid, idproperty FROM " . $cfg["tab"]["properties"] . " WHERE itemid LIKE '" . Contenido_Security::escapeDB($parent, $db) . Contenido_Security::escapeDB($oldpath, $db) . "%'"; | ||||||
|     $db->query($sql); |     $db->query($sql); | ||||||
| 
 | 
 | ||||||
| 	while ($db->next_record()) |     while ($db->next_record()) { | ||||||
| 	{ |  | ||||||
|         $moldpath = $db->f("itemid"); |         $moldpath = $db->f("itemid"); | ||||||
|         $junk = substr($moldpath, strlen($parent) + strlen($oldpath)); |         $junk = substr($moldpath, strlen($parent) + strlen($oldpath)); | ||||||
| 
 | 
 | ||||||
|  | @ -474,30 +439,22 @@ function uplRenameDirectory ($oldpath, $newpath, $parent) | ||||||
|         $sql = "UPDATE " . $cfg["tab"]["properties"] . " SET itemid = '$newpath2' WHERE idproperty='$idproperty'"; |         $sql = "UPDATE " . $cfg["tab"]["properties"] . " SET itemid = '$newpath2' WHERE idproperty='$idproperty'"; | ||||||
|         $db2->query($sql); |         $db2->query($sql); | ||||||
|     } |     } | ||||||
| 	 |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | function uplRecursiveDirectoryList($directory, &$rootitem, $level, $sParent = '', $iRenameLevel = null) { | ||||||
| function uplRecursiveDirectoryList ($directory, &$rootitem, $level, $sParent = '', $iRenameLevel = null) |  | ||||||
| { |  | ||||||
|     $dirhandle = @opendir($directory); |     $dirhandle = @opendir($directory); | ||||||
| 
 | 
 | ||||||
| 	if (!$dirhandle) |     if (!$dirhandle) { | ||||||
| 	{ |          | ||||||
| 	}  |     } else { | ||||||
| 	else  |  | ||||||
| 	{ |  | ||||||
|         $aInvalidDirectories = array(); |         $aInvalidDirectories = array(); | ||||||
| 
 | 
 | ||||||
|         unset($files); |         unset($files); | ||||||
| 
 | 
 | ||||||
|         //list the files in the dir
 |         //list the files in the dir
 | ||||||
|         while ($file = readdir ($dirhandle)) |         while ($file = readdir($dirhandle)) { | ||||||
|         { |             if ($file != "." && $file != "..") { | ||||||
|         	if ($file != "." && $file != "..") |                 if (@chdir($directory . $file . "/")) { | ||||||
|         	{ |  | ||||||
|         		if (@chdir($directory.$file."/")) |  | ||||||
|             	{ |  | ||||||
|                     if (uplCreateFriendlyName($file) == $file) { |                     if (uplCreateFriendlyName($file) == $file) { | ||||||
|                         $files[] = $file; |                         $files[] = $file; | ||||||
|                     } else { |                     } else { | ||||||
|  | @ -517,23 +474,18 @@ function uplRecursiveDirectoryList ($directory, &$rootitem, $level, $sParent = ' | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (is_array($files)) |         if (is_array($files)) { | ||||||
|         { |  | ||||||
|             sort($files); |             sort($files); | ||||||
|         	foreach ($files as $key => $file) |             foreach ($files as $key => $file) { | ||||||
|         	{ |  | ||||||
|                 /* We aren't using is_dir anymore as that function is buggy */ |                 /* We aren't using is_dir anymore as that function is buggy */ | ||||||
|                 $olddir = getcwd(); |                 $olddir = getcwd(); | ||||||
|             	if ($file != "." && $file != "..") |                 if ($file != "." && $file != "..") { | ||||||
|             	{ |                     if (@chdir($directory . $file . "/")) { | ||||||
|             		if (@chdir($directory.$file."/")) |  | ||||||
|             		{ |  | ||||||
|                         unset($item); |                         unset($item); | ||||||
|                         $item = new TreeItem($file, $directory . $file . "/", true); |                         $item = new TreeItem($file, $directory . $file . "/", true); | ||||||
|                         $item->custom["level"] = $level; |                         $item->custom["level"] = $level; | ||||||
| 
 | 
 | ||||||
|                 		if ($key == count($files)-1) |                         if ($key == count($files) - 1) { | ||||||
|                 		{ |  | ||||||
|                             $item->custom["lastitem"] = true; |                             $item->custom["lastitem"] = true; | ||||||
|                         } else { |                         } else { | ||||||
|                             $item->custom["lastitem"] = false; |                             $item->custom["lastitem"] = false; | ||||||
|  | @ -557,39 +509,32 @@ function uplRecursiveDirectoryList ($directory, &$rootitem, $level, $sParent = ' | ||||||
|     return $aInvalidDirectories; |     return $aInvalidDirectories; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | function uplRecursiveDBDirectoryList($directory, &$rootitem, $level) { | ||||||
| function uplRecursiveDBDirectoryList ($directory, &$rootitem, $level) |  | ||||||
| { |  | ||||||
|     $dbfs = new DBFSCollection; |     $dbfs = new DBFSCollection; | ||||||
|     $dbfs->select("filename = '.'", "dirname", "dirname ASC"); |     $dbfs->select("filename = '.'", "dirname", "dirname ASC"); | ||||||
|     $count = 0; |     $count = 0; | ||||||
|     $lastlevel = 0; |     $lastlevel = 0; | ||||||
|     $item["."] = &$rootitem; |     $item["."] = &$rootitem; | ||||||
| 
 | 
 | ||||||
| 	while ($dbitem = $dbfs->next()) |     while ($dbitem = $dbfs->next()) { | ||||||
| 	{ |  | ||||||
|         $dirname = $dbitem->get("dirname"); |         $dirname = $dbitem->get("dirname"); | ||||||
|         $level = substr_count($dirname, "/") + 2; |         $level = substr_count($dirname, "/") + 2; | ||||||
|         $file = basename($dbitem->get("dirname")); |         $file = basename($dbitem->get("dirname")); | ||||||
|         $parent = dirname($dbitem->get("dirname")); |         $parent = dirname($dbitem->get("dirname")); | ||||||
| 
 | 
 | ||||||
| 		if ($dirname != "." && $file != ".") |         if ($dirname != "." && $file != ".") { | ||||||
| 		{ |  | ||||||
|             $item[$dirname] = new TreeItem($file, "dbfs:/" . $dirname, true); |             $item[$dirname] = new TreeItem($file, "dbfs:/" . $dirname, true); | ||||||
|             $item[$dirname]->custom["level"] = $level; |             $item[$dirname]->custom["level"] = $level; | ||||||
|             $item[$dirname]->custom["parent"] = $parent; |             $item[$dirname]->custom["parent"] = $parent; | ||||||
|             $item[$dirname]->custom["lastitem"] = true; |             $item[$dirname]->custom["lastitem"] = true; | ||||||
| 
 | 
 | ||||||
|     		if ($prevobj[$level]->custom["level"] == $level) |             if ($prevobj[$level]->custom["level"] == $level) { | ||||||
|     		{ |                 if (is_object($prevobj[$level])) { | ||||||
|     			if (is_object($prevobj[$level])) |  | ||||||
|     			{ |  | ||||||
|                     $prevobj[$level]->custom["lastitem"] = false; |                     $prevobj[$level]->custom["lastitem"] = false; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|     		if ($lastlevel > $level) |             if ($lastlevel > $level) { | ||||||
|     		{ |  | ||||||
|                 unset($prevobj[$lastlevel]); |                 unset($prevobj[$lastlevel]); | ||||||
|                 $lprevobj->custom["lastitem"] = true; |                 $lprevobj->custom["lastitem"] = true; | ||||||
|             } |             } | ||||||
|  | @ -599,8 +544,7 @@ function uplRecursiveDBDirectoryList ($directory, &$rootitem, $level) | ||||||
| 
 | 
 | ||||||
|             $lastlevel = $level; |             $lastlevel = $level; | ||||||
| 
 | 
 | ||||||
|     		if (is_object($item[$parent])) |             if (is_object($item[$parent])) { | ||||||
|     		{ |  | ||||||
|                 $item[$parent]->addItem($item[$dirname]); |                 $item[$parent]->addItem($item[$dirname]); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  | @ -609,18 +553,14 @@ function uplRecursiveDBDirectoryList ($directory, &$rootitem, $level) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | function uplGetThumbnail($file, $maxsize) { | ||||||
| function uplGetThumbnail ($file, $maxsize) |  | ||||||
| { |  | ||||||
|     global $client, $cfgClient, $cfg; |     global $client, $cfgClient, $cfg; | ||||||
| 
 | 
 | ||||||
| 	if ($maxsize == -1) |     if ($maxsize == -1) { | ||||||
| 	{ |  | ||||||
|         return uplGetFileIcon($file); |         return uplGetFileIcon($file); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	switch (getFileExtension($file)) |     switch (getFileExtension($file)) { | ||||||
| 	{ |  | ||||||
|         case "png": |         case "png": | ||||||
|         case "gif": |         case "gif": | ||||||
|         case "tiff": |         case "tiff": | ||||||
|  | @ -634,13 +574,11 @@ function uplGetThumbnail ($file, $maxsize) | ||||||
|         case "wbmp": |         case "wbmp": | ||||||
|             $img = capiImgScale($cfgClient[$client]["upl"]["path"] . $file, $maxsize, $maxsize, false, false, 50); |             $img = capiImgScale($cfgClient[$client]["upl"]["path"] . $file, $maxsize, $maxsize, false, false, 50); | ||||||
| 
 | 
 | ||||||
| 				if ($img !== false) |             if ($img !== false) { | ||||||
| 				{ |  | ||||||
|                 return $img; |                 return $img; | ||||||
|             } else { |             } else { | ||||||
|                 $value = capiImgScale($cfg["path"]["contenido"] . "images/unknown.jpg", $maxsize, $maxsize, false, false, 50); |                 $value = capiImgScale($cfg["path"]["contenido"] . "images/unknown.jpg", $maxsize, $maxsize, false, false, 50); | ||||||
| 					if ($value !== false) |                 if ($value !== false) { | ||||||
| 					{ |  | ||||||
|                     return $value; |                     return $value; | ||||||
|                 } else { |                 } else { | ||||||
|                     return uplGetFileIcon($file); |                     return uplGetFileIcon($file); | ||||||
|  | @ -649,8 +587,6 @@ function uplGetThumbnail ($file, $maxsize) | ||||||
|             break; |             break; | ||||||
|         default: |         default: | ||||||
|             return uplGetFileIcon($file); |             return uplGetFileIcon($file); | ||||||
| 				break; |  | ||||||
| 		 |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -662,8 +598,7 @@ function uplGetThumbnail ($file, $maxsize) | ||||||
|  * @return Icon for the file type |  * @return Icon for the file type | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| function uplGetFileIcon ($file) | function uplGetFileIcon($file) { | ||||||
| { |  | ||||||
|     global $cfg; |     global $cfg; | ||||||
| 
 | 
 | ||||||
|     switch (getFileExtension($file)) { |     switch (getFileExtension($file)) { | ||||||
|  | @ -772,7 +707,6 @@ function uplGetFileIcon ($file) | ||||||
|     return $cfg['path']['contenido_fullhtml'] . $cfg["path"]["images"] . "filetypes/" . $icon; |     return $cfg['path']['contenido_fullhtml'] . $cfg["path"]["images"] . "filetypes/" . $icon; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| /** | /** | ||||||
|  * Returns the description for a file type |  * Returns the description for a file type | ||||||
|  * |  * | ||||||
|  | @ -781,12 +715,10 @@ function uplGetFileIcon ($file) | ||||||
|  * @return Text for the file type |  * @return Text for the file type | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| function uplGetFileTypeDescription ($extension) | function uplGetFileTypeDescription($extension) { | ||||||
| { |  | ||||||
|     global $cfg; |     global $cfg; | ||||||
| 
 | 
 | ||||||
| 	switch ($extension) |     switch ($extension) { | ||||||
| 	{ |  | ||||||
|         /* Presentation files */ |         /* Presentation files */ | ||||||
|         case "sxi": return (i18n("OpenOffice.org Presentation")); |         case "sxi": return (i18n("OpenOffice.org Presentation")); | ||||||
|         case "sti": return (i18n("OpenOffice.org Presentation Template")); |         case "sti": return (i18n("OpenOffice.org Presentation Template")); | ||||||
|  | @ -865,8 +797,7 @@ function uplGetFileTypeDescription ($extension) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplCreateFriendlyName ($filename, $spacer="_") | function uplCreateFriendlyName($filename, $spacer = "_") { | ||||||
| { |  | ||||||
|     global $cfg; |     global $cfg; | ||||||
| 
 | 
 | ||||||
|     $newfilename = ""; |     $newfilename = ""; | ||||||
|  | @ -877,19 +808,16 @@ function uplCreateFriendlyName ($filename, $spacer="_") | ||||||
|         $filename = str_replace(" ", $spacer, $filename); |         $filename = str_replace(" ", $spacer, $filename); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	for ($i=0;$i<strlen($filename);$i++) |     for ($i = 0; $i < strlen($filename); $i++) { | ||||||
| 	{ |  | ||||||
|         $atom = substr($filename, $i, 1); |         $atom = substr($filename, $i, 1); | ||||||
|         $bFound = false; |         $bFound = false; | ||||||
| 
 | 
 | ||||||
| 		if (preg_match("/[0-9a-zA-Z]/i", $atom )) |         if (preg_match("/[0-9a-zA-Z]/i", $atom)) { | ||||||
| 		{ |  | ||||||
|             $newfilename .= $atom; |             $newfilename .= $atom; | ||||||
|             $bFound = true; |             $bFound = true; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 		if (($atom == "-" || $atom == "_" || $atom == ".") && !$bFound) |         if (($atom == "-" || $atom == "_" || $atom == ".") && !$bFound) { | ||||||
| 		{ |  | ||||||
|             $newfilename .= $atom; |             $newfilename .= $atom; | ||||||
|             $bFound = true; |             $bFound = true; | ||||||
|         } |         } | ||||||
|  | @ -905,8 +833,7 @@ function uplCreateFriendlyName ($filename, $spacer="_") | ||||||
|     return $newfilename; |     return $newfilename; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplSearch ($searchfor) | function uplSearch($searchfor) { | ||||||
| { |  | ||||||
|     global $client; |     global $client; | ||||||
| 
 | 
 | ||||||
|     $properties = new PropertyCollection; |     $properties = new PropertyCollection; | ||||||
|  | @ -917,57 +844,51 @@ function uplSearch ($searchfor) | ||||||
|     /* Search for keywords first, ranking +5 */ |     /* Search for keywords first, ranking +5 */ | ||||||
|     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='keywords' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); |     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='keywords' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); | ||||||
| 
 | 
 | ||||||
|     while ($item = $properties->next()) |     while ($item = $properties->next()) { | ||||||
|     { |  | ||||||
|         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 5); |         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 5); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* Search for medianame , ranking +4 */ |     /* Search for medianame , ranking +4 */ | ||||||
|     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='medianame' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); |     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='medianame' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); | ||||||
| 
 | 
 | ||||||
|     while ($item = $properties->next()) |     while ($item = $properties->next()) { | ||||||
|     { |  | ||||||
|         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 4); |         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 4); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* Search for media notes, ranking +3 */ |     /* Search for media notes, ranking +3 */ | ||||||
|     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='medianotes' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); |     $properties->select("idclient='" . Contenido_Security::toInteger($client) . "' AND itemtype = 'upload' AND type='file' AND name='medianotes' AND value LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "itemid"); | ||||||
| 
 | 
 | ||||||
|     while ($item = $properties->next()) |     while ($item = $properties->next()) { | ||||||
|     { |  | ||||||
|         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 3); |         $items[$item->get("itemid")] += (substr_count(strtolower($item->get("value")), strtolower($searchfor)) * 3); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* Search for description, ranking +2 */ |     /* Search for description, ranking +2 */ | ||||||
|     $uploads->select("idclient='" . Contenido_Security::toInteger($client) . "' AND description LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "idupl"); |     $uploads->select("idclient='" . Contenido_Security::toInteger($client) . "' AND description LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "idupl"); | ||||||
| 
 | 
 | ||||||
|     while ($item = $uploads->next()) |     while ($item = $uploads->next()) { | ||||||
|     { |  | ||||||
|         $items[$item->get("dirname") . $item->get("filename")] += (substr_count(strtolower($item->get("description")), strtolower($searchfor)) * 2); |         $items[$item->get("dirname") . $item->get("filename")] += (substr_count(strtolower($item->get("description")), strtolower($searchfor)) * 2); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /* Search for file name, ranking +1 */ |     /* Search for file name, ranking +1 */ | ||||||
|     $uploads->select("idclient='" . Contenido_Security::toInteger($client) . "' AND filename LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "idupl"); |     $uploads->select("idclient='" . Contenido_Security::toInteger($client) . "' AND filename LIKE '%" . Contenido_Security::escapeDB($mysearch, $db) . "%'", "idupl"); | ||||||
| 
 | 
 | ||||||
|     while ($item = $uploads->next()) |     while ($item = $uploads->next()) { | ||||||
|     { |  | ||||||
|         $items[$item->get("dirname") . $item->get("filename")] += 1; |         $items[$item->get("dirname") . $item->get("filename")] += 1; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return ($items); |     return ($items); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function uplGetFileExtension ($sFile) | function uplGetFileExtension($sFile) { | ||||||
| { |  | ||||||
|     /* Fetch the dot position */ |     /* Fetch the dot position */ | ||||||
|     $iDotPosition = strrpos($sFile, "."); |     $iDotPosition = strrpos($sFile, "."); | ||||||
| 
 | 
 | ||||||
|     $sExtension = substr($sFile, $iDotPosition + 1); |     $sExtension = substr($sFile, $iDotPosition + 1); | ||||||
| 	if (strpos($sExtension, "/") !== false) |     if (strpos($sExtension, "/") !== false) { | ||||||
| 	{ |  | ||||||
|         return false; |         return false; | ||||||
|     } else { |     } else { | ||||||
|         return $sExtension; |         return $sExtension; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | 
 | ||||||
| ?>
 | ?>
 | ||||||
|  |  | ||||||
|  | @ -29,7 +29,6 @@ define('CL_BACKUP_START_IMG_OFF', $cfg['path']['contenido_html'] . $cfg['path'][ | ||||||
| $aMessage = array(); | $aMessage = array(); | ||||||
| $bNoBackup = false; | $bNoBackup = false; | ||||||
| $bFinalStep = false; | $bFinalStep = false; | ||||||
| echo CL_BACKUP_PATH; |  | ||||||
| // check backup path
 | // check backup path
 | ||||||
| if (!is_dir(CL_BACKUP_PATH) || !is_writable(CL_BACKUP_PATH)) { | if (!is_dir(CL_BACKUP_PATH) || !is_writable(CL_BACKUP_PATH)) { | ||||||
|     $notification->displayNotification("error", i18n("Backupfolder missing or not writable!")); |     $notification->displayNotification("error", i18n("Backupfolder missing or not writable!")); | ||||||
|  |  | ||||||