Esempio n. 1
0
 public function getChildren()
 {
     if (!$this->httpAuth()) {
         throw new NotAuthenticated();
     }
     $steamContainer = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
     $root = array();
     if ($steamContainer instanceof steam_container) {
         try {
             $objects = $steamContainer->get_inventory();
         } catch (Exception $e) {
             throw new Forbidden();
         }
         $user = $GLOBALS["STEAM"]->get_current_steam_user();
         $showHidden = $user->get_attribute("EXPLORER_SHOW_HIDDEN_DOCUMENTS") === "TRUE" ? true : false;
         foreach ($objects as $object) {
             $obj = createChild($object, $showHidden);
             if ($obj) {
                 $root[] = $obj;
             }
         }
     } else {
         throw new NotFound();
     }
     return $root;
 }
Esempio n. 2
0
 public function getChildren()
 {
     $result = array();
     try {
         $objects = $this->steamContainer->get_inventory();
     } catch (Exception $e) {
         throw new \Sabre\DAV\Exception($e->getMessage());
     }
     foreach ($objects as $object) {
         $obj = createChild($object);
         if ($obj) {
             $result[] = $obj;
         }
     }
     return $result;
 }
 public function getChildren()
 {
     $result = array();
     try {
         $objects = $this->steamContainer->get_inventory();
     } catch (Exception $e) {
         throw new \Sabre\DAV\Exception($e->getMessage());
     }
     $user = $GLOBALS["STEAM"]->get_current_steam_user();
     $showHidden = $user->get_attribute("EXPLORER_SHOW_HIDDEN_DOCUMENTS") === "TRUE" ? true : false;
     foreach ($objects as $object) {
         $obj = createChild($object, $showHidden);
         if ($obj) {
             $result[] = $obj;
         }
     }
     return $result;
 }
Esempio n. 4
0
function ultimatum_themes(){
	
	echo '<div class="wrap">';

	$task=false;
	if(isset($_GET['task'])) $task = $_GET['task'];
	switch ($task){ //
		default:
		    if($_POST){
		        global $wpdb;
		        if(isset($_POST['id'])){
		            if($_POST['gridwork']!="tbs3"){
		                $query = "REPLACE INTO `".ULTIMATUM_TABLE_TEMPLATES."` VALUES ('".$_POST['id']."','".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')";
		            } else {
		               $query = "REPLACE INTO `".ULTIMATUM_TABLE_TEMPLATES."` VALUES ('".$_POST['id']."','".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch3']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')";
		            }
		        } else {
		            if($_POST['gridwork']!="tbs3"){
		                $query = "INSERT INTO `".ULTIMATUM_TABLE_TEMPLATES."` (`name`,`width`,`margin`,`mwidth`,`mmargin`,`swidth`,`smargin`,`gridwork`,`swatch`,`type`,`dcss`,`default`,`theme`) VALUES ('".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')";
		            } else {
		                $query = "INSERT INTO `".ULTIMATUM_TABLE_TEMPLATES."` (`name`,`width`,`margin`,`mwidth`,`mmargin`,`swidth`,`smargin`,`gridwork`,`swatch`,`type`,`dcss`,`default`,`theme`) VALUES ('".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch3']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')";
		            }
		        }
		    
		        $wpdb->query($query);
		        $template_id =  $wpdb->insert_id;
		        WonderWorksCSS::saveCSS($template_id,'template');
		        ?>
		        <script type="text/javascript">
		        parent.location.href='./admin.php?page=wonder-templates';
		        </script>
		        <?php 
		    }
			themesMainScreen();
		break;
		case 'createChild':
			createChild();
		break;
		case 'deletetemplate':
			deleteTheme();
		break;
		case 'export':
			Ultimatum_Exporter();
		break;
		case 'import':
			importThemeForm();
		break;
		case 'row-edit':
			RowEditor();
			break;
		case 'row-styles':
			RowStyles();
		break;
		case 'edit':
			$template=null;
			if(isset($_REQUEST["template_id"])) $template = getTemplateInfo($_REQUEST["template_id"]);
			ultimatum_editTemplate($template);
		break;
		case 'default':
			makeDefault();
		break;
		case 'mobileass':
			mobileAssign();
		break;
	}
	echo '</div>'; 
	}