Example #1
0
        <div class="action no-margin ac ui-widget">
            <a class="button button-blue" style="color: #fff; width: 230px; margin: 2px 5px 0px 10px;" href="<?php 
print_r(ROOT_DIR . '?page=survey_edit');
?>
"><?php 
echo MY_SURVEYS_PAGE_CREATE_SURVEY;
?>
</a>
        </div>
        <br/>
    </div>
</div>
<div class="ac">
    <div class="accordion">
        <?php 
$surveys_by_creator = get_surveys_by_creator($user->getId());
if (!empty($surveys_by_creator)) {
    foreach ($surveys_by_creator as $survey_id) {
        $survey = new Survey();
        $survey->get_from_db($survey_id);
        ?>
                <h3 class="no-float ac"><?php 
        print_r($survey->getTitle());
        ?>
</h3>
                <div>
                    <div class="ac">
                        <div class="action no-margin ac">
                            <form id="formSurvey<?php 
        print_r($survey->getId());
        ?>
                            id="formSurveyUserRemove"
                            name="formSurveyUserRemove"
                            value="Изтрий"
                            <?php 
}
?>
                        class="button button-red"
                        type="submit" />
                    <br/><br/><br/>
                </div>
            </div>
        </form>
    </div>
    <?php 
if ($session_user->getCanAsk() == 1) {
    $surveys_by_creator = get_surveys_by_creator($session_user->getId());
    ?>
        <div class="ac info_box box_green">
            <h4>
                <?php 
    echo SURVEY_USER_PAGE_USER_CREATED_SURVEYS;
    ?>
            </h4>
        </div>
        <div class="ac">
            <div class="accordion">
                <?php 
    if ($surveys_by_creator != null) {
        foreach ($surveys_by_creator as $survey_id) {
            $survey = new Survey();
            $survey->get_from_db($survey_id);