All pastes #1316056 Raw Edit

Someone

public php v1 · immutable
#1316056 ·published 2009-01-23 05:19 UTC
rendered paste body
<?php/*  * Joomla ccboard* @version $Id:* @Revision $Rev:* @package* @subpackage* @author $Author* @Date* @copyright Copyright (C) 2008-2009 codeclassic.net. All rights reserved.* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2*///set our initial declarations.defined( '_JEXEC' ) or die( 'Restricted access' );// lets make sure we are calling the right controller.require_once( JPATH_COMPONENT.DS.'controller.php' );jimport('joomla.filesystem.file'); // Require specific controller if requestedif($controller = JRequest::getWord('controller')) {    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';    if (file_exists($path)) {        require_once $path;    } else {        $controller = '';    }}// lets make our classclass ccboardModeliconswitcher extends JModel{    //TODO: Why is this here?	function ccboardModelGeneral()	{		parent::__construct();	}    function createdb ()    {        $query = "CREATE TABLE `#__ccboard_images`";    }function setvar($old_image_array,$new_image_array){// lets set the images to variables to make it easier to change things.$img_sub = "JPATH_COMPONENT_SITE.DS.assets.DS.emailsub.png";$img_unsub = "JPATH_COMPONENT_SITE.DS.assets.DS.emailsubb.png";$img_old_cancel = "JPATH_BASE.DS.images.DS.cancel.png";$img_old_cancel_f2 = "JPATH_BASE.DS.images.DS.cancel_f2.png";$img_old_preview = "JPATH_BASE.DS.images.DS.preview_f2.png";$img_old_save = "JPATH_BASE.DS.images.DS.save_f2.png";$img_old_unsave = "JPATH_BASE.DS.images.DS.save.png";$img_cancel = "JPATH_COMPONENT_SITE.DS.assets.DS.cancel.png";$img_cancel_f2 = "JPATH_COMPONENT_SITEE.DS.asets.DS.cancel_f2.png";$img_preview = "JPATH_COMPONENT_SITEE.DS.asets.DS.preview_f2.png";$img_save = "JPATH_COMPONENT_SITEE.DS.asets.DS.save_f2.png";$img_unsave = "JPATH_COMPONENT_SITEE.DS.asets.DS.save.png";// ok, now lets set'm into an array for speedy processing$old_image_array = array($img_old_cancel,$img_old_cancel_f2,$img_old_preview,$img_old_save,$img_old_unsave);$new_image_array = array($img_cancel,$img_cancel_f2,$img_preview,$img_save,$img_unsave,$img_sub,$img_unsub);// ok we're going to need these for the move function so pass'm out.return $old_image_array,$new_image_array;}//TODO: move original images to backup namefunction moveimage($old_image_array,$new_image_array){    //TODO: FInish this command    if exists then {    //TODO:        move file//TODO: clean path and filename of superfulous content ( like white space )    for each($old_image $filename = JFile::makefile($imagefilename);    }    elseif {        //TODO: copy file over.    }}//TODO: save filename in database so it can be replaced if plugin is uninstalled//TODO: rename our icons to original joomla names.}}?>