Subversion Repositories bysoftdeveloper

[/] [modules/] [bysoftdeveloper/] [classes.php] - Diff between revs 12 and 31

Show entire file | Ignore whitespace | Details | Blame | View Log

Rev 12 Rev 31
Line 3... Line 3...
include_once( 'kernel/common/template.php' );
include_once( 'kernel/common/template.php' );
 
 
// total disabled translation for this project.
// total disabled translation for this project.
$ini = eZINI::instance();
$ini = eZINI::instance();
$ini->setVariable('RegionalSettings', 'TextTranslation', 'disabled');
$ini->setVariable('RegionalSettings', 'TextTranslation', 'disabled');
 
 
 
// Authorize the user to admin when doing fetch
 
$current_user = eZUser::currentUser ();
 
$admin = eZUser::fetch($ini->variable('BysoftDeveloper', 'AdminID'));
 
SwitchUser::switchTo($admin);
 
 
$tpl = templateInit();
$tpl = templateInit();
$http = eZHTTPTool::instance();
$http = eZHTTPTool::instance();
 
 
if ($http->postVariable('action') == 'form') {
if ($http->postVariable('action') == 'form') {
Line 18... Line 23...
    echo $tpl->fetch($template);
    echo $tpl->fetch($template);
}
}
 
 
if ($http->postVariable('action') == 'content') {
if ($http->postVariable('action') == 'content') {
   
   
    $classIdentifier = $http->postVariable('selectedClass');
    $class_id = $http->postVariable('selectedClass');
   
   
    $class = eZContentClass::fetchByIdentifier($classIdentifier);
    $class = eZContentClass::fetch($class_id);
   
   
    $attributes = $class->fetchAttributes();
    $attributes = $class->fetchAttributes();
   
   
    eZDataType::loadAndRegisterAllTypes();
    eZDataType::loadAndRegisterAllTypes();
   
   
    $datatypes = eZDataType::registeredDataTypes();
    $datatypes = eZDataType::registeredDataTypes();
 
    $count = eZContentObject::fetchListCount(array('contentclass_id' => $class_id));
   
   
 
    $tpl->setVariable('count', $count);
    $tpl->setVariable('class', $class);
    $tpl->setVariable('class', $class);
    $tpl->setVariable('class_identifier', $classIdentifier);
 
    $tpl->setVariable('attributes', $attributes);
    $tpl->setVariable('attributes', $attributes);
    $tpl->setVariable('datatypes', $datatypes );
    $tpl->setVariable('datatypes', $datatypes );
   
   
    $template = 'design:bysoftdeveloper/classes/content.tpl';
    $template = 'design:bysoftdeveloper/classes/content.tpl';
    echo $tpl->fetch($template);
    echo $tpl->fetch($template);
   
   
}
}
 
 
 
 
 
if ($http->postVariable('action') == 'object') {
 
   
 
    $class_id = $http->postVariable('selectedClass');
 
    $class = eZContentClass::fetch($class_id);
 
   
 
    $contentobject_list = eZContentObject::fetchList(true,  array('contentclass_id' => $class_id));
 
 
 
  //  $tpl->setVariable('class_identifier', $classIdentifier);
 
        $tpl->setVariable('contentobject_list', $contentobject_list);
 
   
 
    $template = 'design:bysoftdeveloper/classes/object.tpl';
 
    echo $tpl->fetch($template);
 
   
 
}
 
 
 
if ($http->postVariable('action') == 'objectcontent') {
 
   
 
    $object_id = $http->postVariable('object_id');
 
        $object = eZContentObject::fetch($object_id);
 
   
 
    $tpl->setVariable('object', $object);
 
 
 
   
 
    $template = 'design:bysoftdeveloper/classes/objectcontent.tpl';
 
    echo $tpl->fetch($template);
 
   
 
}
 
SwitchUser::switchTo($current_user);
eZExecution::cleanExit();;
eZExecution::cleanExit();;
 
 
?>
?>