Advertisement
Guest User

Untitled

a guest
Feb 4th, 2025
27
0
52 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1.     public function createinv($avuuid)
  2.     {
  3.         $inv_template = array(
  4.             'Calling Cards' =>  2,
  5.             'Objects' =>  6,
  6.             'Landmarks' =>  3,
  7.             'Clothing' =>  5,
  8.             'Gestures' => 21,
  9.             'Body Parts' => 13,
  10.             'Textures' =>  0,
  11.             'Scripts' => 10,
  12.             'Photo Album' => 15,
  13.             'Lost And Found' => 16,
  14.             'Trash' => 14,
  15.             'Notecards' =>  7,
  16.             'My Inventory' =>  8,
  17.             'Sounds' =>  1,
  18.             'Animations' => 20,
  19.             'Current Outfit' => 46,
  20.             'Settings' => 56,
  21.             'Favorites' => 23          
  22.         );
  23.         $inv_masterID = $this->tools_model->getNewUUID();
  24.         $version = "1";
  25.         foreach ($inv_template as $invfldr_name => $inv_type)
  26.         {
  27.             $invfldr_uuid = $this->tools_model->getNewUUID();
  28.             if ($inv_type == 8)
  29.             {
  30.                 $invfldr_uuid = $inv_masterID;
  31.                 $inv_parent = '00000000-0000-0000-0000-000000000000';
  32.             }
  33.             else
  34.             {
  35.                 $inv_parent = $inv_masterID;
  36.             }
  37.            
  38.             $invsql = "INSERT INTO inventoryfolders (folderName,type,version,folderID,agentID,parentFolderID) VALUES ('$invfldr_name','$inv_type','$version','$invfldr_uuid','$avuuid','$inv_parent');";
  39.             $sqlop = $this->zgrid->query($invsql);
  40.             $issaved = "";
  41.            
  42.             if ($sqlop)
  43.                 $issaved = true;
  44.             else
  45.                 $issaved = false;
  46.         }
  47.         return $issaved;
  48.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement