initializing git repo
This commit is contained in:
commit
3df8fc53b8
86 changed files with 5649 additions and 0 deletions
72
pages/show_part_edit_storage.php
Executable file
72
pages/show_part_edit_storage.php
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
$NewPartType = (isset($_POST['NewPartType']))? $_POST['NewPartType']:0;
|
||||
|
||||
function WriteStorageList($ParentId, $ParentIsLocked)
|
||||
{
|
||||
global $GlobalMysqlHandler;
|
||||
global $GlobalContent;
|
||||
global $GlobalTemplate;
|
||||
global $EditTypesEditId;
|
||||
global $PartId;
|
||||
global $Part;
|
||||
|
||||
$ListQuery="SELECT * FROM `Storages` WHERE `ParentId` =$ParentId";
|
||||
$ListQuery=mysqli_query($GlobalMysqlHandler, $ListQuery);
|
||||
|
||||
if (!$ParentId || NestedListVisibilityIsSet($ParentId, 'EditPartStorage'))
|
||||
$GlobalContent .= "<ul style=\"display:block;\">\n";
|
||||
else
|
||||
$GlobalContent .= "<ul style=\"display:none;\">\n";
|
||||
|
||||
if (mysqli_num_rows($ListQuery))
|
||||
{
|
||||
while ($ListData=mysqli_fetch_array($ListQuery))
|
||||
{
|
||||
$GlobalContent .= " <li>\n";
|
||||
if (LockIsActive('Types',$ListData['Id']) || $ParentIsLocked)
|
||||
{
|
||||
$GlobalContent .= ' '.OtherGetIcon('LockActive');
|
||||
$ParentIsLocked = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GlobalContent .= ' <input type="radio" name="EditPartStorage" value="'.$ListData['Id'].'" '.(($Part['StorageId']==$ListData['Id'])? "checked":"").'>';
|
||||
}
|
||||
$GlobalContent .= " <a href=\"index.php?Page=ShowPart&ToDo=EditStorage&PartId=$PartId&OpenSublistId=".$ListData['Id']."\">".LangStr2Html($ListData['Name'])."</a>";
|
||||
$GlobalContent .= " (".NestedListCountSubElements($ListData['Id'],'Storages').")";
|
||||
$GlobalContent .= " \n</li>\n";
|
||||
|
||||
WriteStorageList($ListData['Id'],$ParentIsLocked);
|
||||
}
|
||||
}
|
||||
$GlobalContent .= "</ul>\n";
|
||||
}
|
||||
|
||||
|
||||
if (UserHasRight('EditParts'))
|
||||
{
|
||||
///////////////
|
||||
// open sublist
|
||||
if (isset($_GET['OpenSublistId']) && $_GET['OpenSublistId'])
|
||||
{
|
||||
NestedListVisibilityToggle($_GET['OpenSublistId'], 'EditPartStorage');
|
||||
}
|
||||
else
|
||||
{
|
||||
NestedListVisibilityUnsetAllElements ('EditPartStorage');
|
||||
NestedListVisibilitySetAllParents ($Part['StorageId'], 'EditPartStorage', 'Storages');
|
||||
NestedListVisibilitySet ($Part['StorageId'], 'EditPartStorage');
|
||||
}
|
||||
|
||||
$GlobalContent .= '<h1>'.LangSpellHtml('SentencePleaseSelectPartStorage').'</h1>';
|
||||
$GlobalContent .= '<form action="index.php?Page=ShowPart&ToDo=SaveStorage&PartId='.$PartId.'" method="post">';
|
||||
WriteStorageList(0, 0);
|
||||
$GlobalContent .= '<input type="submit" value="'.LangSpellHtml('ButtonSave').'"class="Button">';
|
||||
$GlobalContent .= '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageError(LangSpell("ScentenceNoUserRights"));
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue