<th>CREATED</th>
                            <th>UPDATED</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
$html = '';
foreach ($users as $user) {
    $id = $user['id'];
    $html .= '<tr id="h' . $id . '">';
    $html .= '<td><a href="edit.php?id=' . $id . '">Edit</a> | <a href="groupRelations.php?id=' . $id . '">Groups</a></td>';
    $html .= '<td><input type="checkbox" id="c' . $id . '"></td>';
    $html .= '<td>' . $id . '</td>';
    $html .= '<td>' . safeToDisplay($user['username']) . '</td>';
    $html .= '<td>' . safeToDisplay($user['email_address']) . '</td>';
    $html .= '<td>' . safeToDisplay($user['first_name']) . '</td>';
    $html .= '<td>' . safeToDisplay($user['last_name']) . '</td>';
    $html .= '<td>' . ($user['status'] == Users::USER_STATUS_ACTIVE ? 'ACTIVE' : 'INACTIVE') . '</td>';
    $html .= '<td>' . $user['created_at'] . '</td>';
    $html .= '<td>' . $user['updated_at'] . '</td>';
    $html .= '</tr>';
}
echo $html;
?>
                    </tbody>
                </table>
            </div>
        </div>
    </body>
</html>
                <label>Http request Status:</label><span><?php 
echo ' ' . ($http_request_to_edit_for_relations['status'] == HttpRequests::HTTP_REQUEST_STATUS_ACTIVE ? 'Active' : 'Inactive');
?>
</span>
            </div>

            <div>
                <label>Http request Created at:</label><span><?php 
echo ' ' . safeToDisplay($http_request_to_edit_for_relations['created_at']);
?>
</span>
            </div>

            <div>
                <label>Http request Updated at:</label><span><?php 
echo ' ' . safeToDisplay($http_request_to_edit_for_relations['updated_at']);
?>
</span>
            </div>
        </div>
        <br>
        <form id="frm1" method="post">
            <input type="hidden" name="groups" id="groups" value="<?php 
echo json_encode([]);
?>
" autocomplete="off">
            <input type="submit" value="Save">
        </form>
        <br>
        <div id="parent">
            Groups
                </div>
                <div>
                    <label for="user_username">Username</label>
                    <input type="text" required id="user_username" name="user_username" value="<?php 
echo $is_post ? safeToDisplay($_POST['user_username']) : safeToDisplay($user_to_edit['username']);
?>
">
                </div>
                <div>
                    <label for="user_password">Password</label>
                    <input type="password" id="user_password" name="user_password">
                </div>
                <div>
                    <label for="user_email_address">Email address</label>
                    <input type="email" required id="user_email_address" name="user_email_address" value="<?php 
echo $is_post ? safeToDisplay($_POST['user_email_address']) : safeToDisplay($user_to_edit['email_address']);
?>
">
                </div>
                <div>
                    <input type="radio" name="user_status" value="active"<?php 
echo $user_to_edit['status'] == Users::USER_STATUS_ACTIVE ? ' checked="checked"' : '';
?>
>Active<br>
                    <input type="radio" name="user_status" value="inactive"<?php 
echo $user_to_edit['status'] == Users::USER_STATUS_INACTIVE ? ' checked="checked"' : '';
?>
>Inactive
                </div>
                <br>
                <input type="submit" value="Save">
?>
">
                </div>

                <div>
                    <label for="http_request_value_regex">Http request value is regex</label>
                    <input type="checkbox" id="http_request_value_regex" name="http_request_value_regex"<?php 
echo $is_post && isset($_POST['http_request_value_regex']) && $_POST['http_request_value_regex'] == 'on' ? ' checked="checked"' : $http_request_to_edit['value_regex'] == 1 ? ' checked="checked"' : '';
?>
>
                </div>

                <div>
                    <label for="http_request_description">Http request description</label>
                    <input type="text" size="60" id="http_request_description" name="http_request_description" value="<?php 
echo $is_post ? safeToDisplay($_POST['http_request_description']) : safeToDisplay($http_request_to_edit['description']);
?>
">
                </div>

                <div>
                    <input type="radio" name="http_request_status" value="active"<?php 
echo $http_request_to_edit['status'] == HttpRequests::HTTP_REQUEST_STATUS_ACTIVE ? ' checked="checked"' : '';
?>
>Active<br>
                    <input type="radio" name="http_request_status" value="inactive"<?php 
echo $http_request_to_edit['status'] == HttpRequests::HTTP_REQUEST_STATUS_INACTIVE ? ' checked="checked"' : '';
?>
>Inactive
                </div>
                <br>
                    <label for="user_username">Username</label>
                    <input type="text" required id="user_username" name="user_username"<?php 
echo $is_post ? ' value="' . safeToDisplay($_POST['user_username']) . '"' : '';
?>
>
                </div>

                <div>
                    <label for="user_password">Password</label>
                    <input type="password" required id="user_password" name="user_password">
                </div>

                <div>
                    <label for="user_email_address">Email address</label>
                    <input type="email" required id="user_email_address" name="user_email_address"<?php 
echo $is_post ? ' value="' . safeToDisplay($_POST['user_email_address']) . '"' : '';
?>
>
                </div>

                <div>
                    <input type="radio" name="user_status" value="active" checked="checked">Active<br>
                    <input type="radio" name="user_status" value="inactive">Inactive
                </div>
                <br>
                <input type="submit" value="Save">
            </form>
        </div>
    </body>
</html>
                <label>User Status:</label><span><?php 
echo ' ' . ($user_to_edit_for_relations['status'] == Users::USER_STATUS_ACTIVE ? 'Active' : 'Inactive');
?>
</span>
            </div>

            <div>
                <label>User Created at:</label><span><?php 
echo ' ' . safeToDisplay($user_to_edit_for_relations['created_at']);
?>
</span>
            </div>

            <div>
                <label>User Updated at:</label><span><?php 
echo ' ' . safeToDisplay($user_to_edit_for_relations['updated_at']);
?>
</span>
            </div>
        </div>
        <br>
        <form id="frm1" method="post">
            <input type="hidden" name="groups" id="groups" value="<?php 
echo json_encode([]);
?>
" autocomplete="off">
            <input type="submit" value="Save">
        </form>
        <br>
        <div id="parent">
            Groups
                <label>Menu image:</label><span><?php 
echo ' ' . safeToDisplay($menu_to_edit_for_relations['image']);
?>
</span>
            </div>

            <div>
                <label>Menu Description:</label><span><?php 
echo ' ' . safeToDisplay($menu_to_edit_for_relations['description']);
?>
</span>
            </div>

            <div>
                <label>Menu Parent:</label><span><?php 
echo safeToDisplay($menu_parent_name);
?>
</span>
            </div>

            <div>
                <label>Menu Status:</label><span><?php 
echo ' ' . ($menu_to_edit_for_relations['status'] == 1 ? 'Active' : 'Inactive');
?>
</span>
            </div>

        </div>

        <br>
        <form id="frm1" method="post">
                </div>

                <div>
                    <input type="radio" name="menu_status" value="active"<?php 
echo $menu_to_edit['status'] == Menus::MENU_STATUS_ACTIVE ? ' checked="checked"' : '';
?>
>Active<br>
                    <input type="radio" name="menu_status" value="inactive"<?php 
echo $menu_to_edit['status'] == Menus::MENU_STATUS_INACTIVE ? ' checked="checked"' : '';
?>
>Inactive
                </div>

                <div>
                    <input type="hidden" id="menu_parent" name="menu_parent" value="<?php 
echo $is_post ? safeToDisplay($_POST['menu_parent']) : safeToDisplay($menu_to_edit['parent_id']);
?>
">
                </div>

                <input type="submit" value="Save">
            </form>
        </div>
        <div id="parent">
            Menu parent
            <div id="tree">
                <?php 
$menus = turnResources2ATree_V2($pm->getMenus()->getAllMenus());
echo renderTree2($menus, 'radio', 'gp');
?>
            </div>
                <div>
                    <label for="menu_description">Menu Description</label>
                    <input type="text" id="menu_description" name="menu_description"<?php 
echo $is_post ? ' value="' . safeToDisplay($_POST['menu_description']) . '"' : '';
?>
>
                </div>

                <div>
                    <input type="radio" name="menu_status" value="active" checked="checked">Active<br>
                    <input type="radio" name="menu_status" value="inactive">Inactive
                </div>

                <div>
                    <input type="hidden" id="menu_parent" name="menu_parent"<?php 
echo $is_post ? ' value="' . safeToDisplay($_POST['menu_parent']) . '"' : ' value="-1"';
?>
>
                </div>

                <input type="submit" value="Save">
            </form>
        </div>
        <div id="parent">
            Menu parent
            <div id="tree">
                <?php 
$menus = turnResources2ATree_V2($pm->getMenus()->getAllMenus());
echo renderTree2($menus, 'radio', 'gp');
?>
            </div>
                            <th>UPDATED</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
$html = '';
foreach ($http_requests as $http_request) {
    $id = $http_request['id'];
    $html .= '<tr id="h' . $id . '">';
    $html .= '<td><a href="edit.php?id=' . $id . '">Edit</a> | <a href="groupRelations.php?id=' . $id . '">Groups</a></td>';
    $html .= '<td><input type="checkbox" id="c' . $id . '"></td>';
    $html .= '<td>' . $id . '</td>';
    $html .= '<td>' . safeToDisplay($http_request['method']) . '</td>';
    $html .= '<td>' . ($http_request['method_regex'] == HttpRequests::HTTP_REQUEST_METHOD_REGEX ? 'YES' : 'NO') . '</td>';
    $html .= '<td>' . safeToDisplay($http_request['value']) . '</td>';
    $html .= '<td>' . ($http_request['value_regex'] == HttpRequests::HTTP_REQUEST_VALUE_REGEX ? 'YES' : 'NO') . '</td>';
    $html .= '<td>' . ($http_request['status'] == HttpRequests::HTTP_REQUEST_STATUS_ACTIVE ? 'ACTIVE' : 'INACTIVE') . '</td>';
    $html .= '<td>' . safeToDisplay($http_request['description']) . '</td>';
    $html .= '<td>' . $http_request['created_at'] . '</td>';
    $html .= '<td>' . $http_request['updated_at'] . '</td>';
    $html .= '</tr>';
}
echo $html;
?>
                    </tbody>
                </table>
            </div>
        </div>
    </body>
</html>
                </div>

                <div>
                    <input type="radio" name="group_status" value="active"<?php 
echo $group_to_edit['status'] == Groups::GROUP_STATUS_ACTIVE ? ' checked="checked"' : '';
?>
>Active<br>
                    <input type="radio" name="group_status" value="inactive"<?php 
echo $group_to_edit['status'] == Groups::GROUP_STATUS_INACTIVE ? ' checked="checked"' : '';
?>
>Inactive
                </div>

                <div>
                    <input type="hidden" id="group_parent" name="group_parent" value="<?php 
echo $is_post ? safeToDisplay($_POST['group_parent']) : safeToDisplay($group_to_edit['parent_id']);
?>
">
                </div>

                <input type="submit" value="Save">
            </form>
        </div>
        <div id="parent">
            Group parent
            <div id="tree">
                <?php 
$groups = turnResources2ATree_V2($pm->getGroups()->getAllGroups());
echo renderTree2($groups, 'radio', 'gp');
?>
            </div>
Exemple #12
0
?>
>
                </div>

                <div>
                    <label for="http_request_value_regex">Http request value is regex</label>
                    <input type="checkbox" id="http_request_value_regex" name="http_request_value_regex"<?php 
echo $is_post && isset($_POST['http_request_value_regex']) && $_POST['http_request_value_regex'] == 'on' ? ' checked="checked"' : '';
?>
>
                </div>

                <div>
                    <label for="http_request_description">Http request description</label>
                    <input type="text" size="60" id="http_request_description" name="http_request_description"<?php 
echo $is_post ? ' value="' . safeToDisplay($_POST['http_request_description']) . '"' : '';
?>
>
                </div>

                <div>
                    <input type="radio" name="http_request_status" value="active" checked="checked">Active<br>
                    <input type="radio" name="http_request_status" value="inactive">Inactive
                </div>
                <br>
                <input type="submit" value="Save">
            </form>
        </div>
    </body>
</html>