initializing git repo
This commit is contained in:
commit
3df8fc53b8
86 changed files with 5649 additions and 0 deletions
73
pages/add_part_storage.php
Executable file
73
pages/add_part_storage.php
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
$NewPartType = (isset($_POST['NewPartType']))? $_POST['NewPartType']:0;
|
||||
|
||||
function WriteStorageList($ParentId, $ParentIsLocked)
|
||||
{
|
||||
global $GlobalMysqlHandler;
|
||||
global $GlobalContent;
|
||||
global $GlobalTemplate;
|
||||
global $EditTypesEditId;
|
||||
|
||||
$ListQuery="SELECT * FROM `Storages` WHERE `ParentId` =$ParentId";
|
||||
$ListQuery=mysqli_query($GlobalMysqlHandler, $ListQuery);
|
||||
|
||||
if (!$ParentId || NestedListVisibilityIsSet($ParentId, 'AddPartStorage'))
|
||||
$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.png',0);
|
||||
$ParentIsLocked = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GlobalContent .= ' <input type="radio" name="NewPartStorage" value="'.$ListData['Id'].'">';
|
||||
}
|
||||
$GlobalContent .= " <a href=\"index.php?Page=AddPart&AddNewPartSetp=SelectStorage&ToDo=OpenSublist&SublistId=".$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 ($ToDo=="OpenSublist")
|
||||
{
|
||||
if (isset($_GET['SublistId']) && $_GET['SublistId'])
|
||||
{
|
||||
NestedListVisibilityToggle($_GET['SublistId'], 'AddPartStorage');
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorLog("[add_part1.php] No SublistId to open type!");
|
||||
MessageError(LangSpell('SentenceUnknownError'));
|
||||
}
|
||||
$ToDo="";
|
||||
}
|
||||
|
||||
$GlobalContent .= '<h1>'.LangSpellHtml('SentencePleaseSelectPartStorage').'</h1>';
|
||||
$GlobalContent .= '<form action="index.php?Page=AddPart&AddNewPartSetp=SelectPackage" method="post">';
|
||||
WriteStorageList(0, 0);
|
||||
$GlobalContent .= '<input type="submit" value="'.LangSpellHtml('ButtonProceed').'"class="Button">';
|
||||
$GlobalContent .= '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageError(LangSpell("ScentenceNoUserRights"));
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue