Esempio n. 1
0
<div class="side-body">
    <h3>
        <span style='font-weight:bold;'><?php eT('Saved Responses'); ?></span>
        <?php echo $sSurveyName . ' ' . sprintf(gT('ID: %s'), $iSurveyId); ?>        
    </h3>
    
        <div class="row">
            <div class="col-lg-12 content-right">
                <div class="alert alert-info" role="alert">
                    <?php eT('Saved Responses:'); ?> <?php echo getSavedCount($iSurveyId); ?>
                </div>
                
                <p>
                    <table class='browsetable table' style='margin:0 auto; width:60%'>
                        <thead>
                            <tr>
                                <th><?php eT('ID'); ?></th>
                                <th><?php eT('Actions'); ?></th>
                                <th><?php eT('Identifier'); ?></th>
                                <th><?php eT('IP address'); ?></th>
                                <th><?php eT('Date Saved'); ?></th>
                                <th><?php eT('Email address'); ?></th>
                            </tr>
                        </thead>
                
                        <tbody>
                            <?php foreach($aResults as $oResult)
                                { ?>
                                <tr>
                                    <td><?php echo $oResult->scid; ?></td>
                                    <td align='center'>
Esempio n. 2
0
    if ($result = $connect->Execute($query)) {
        //If we were succesful deleting the saved_control entry,
        //then delete the rest
        $query = "DELETE FROM {$surveytable} WHERE id={$srid}";
        $result = $connect->Execute($query) or die("Couldn't delete");
    } else {
        $savedsurveyoutput .= "Couldn't delete<br />{$query}<br />" . $connect->ErrorMsg();
    }
}
$js_admin_includes[] = '../scripts/jquery/jquery.tablesorter.min.js';
$js_admin_includes[] = 'scripts/saved.js';
$savedsurveyoutput .= "<div class='menubar'>\n" . "<div class='menubar-title ui-widget-header'><span style='font-weight:bold;'>\n";
$savedsurveyoutput .= $clang->gT("Saved Responses") . "</span> " . $thissurvey['name'] . " (ID: {$surveyid})</div>\n" . "<div class='menubar-main'>\n" . "<div class='menubar-left'>\n";
$savedsurveyoutput .= savedmenubar();
$savedsurveyoutput .= "</div></div></div>\n";
$savedsurveyoutput .= "<div class='header ui-widget-header'>" . $clang->gT("Saved Responses:") . " " . getSavedCount($surveyid) . "</div><p>";
showSavedList($surveyid);
function showSavedList($surveyid)
{
    global $dbprefix, $connect, $clang, $savedsurveyoutput, $scriptname, $imageurl, $surrows;
    $query = "SELECT scid, srid, identifier, ip, saved_date, email, access_code\n" . "FROM {$dbprefix}saved_control\n" . "WHERE sid={$surveyid}\n" . "ORDER BY saved_date desc";
    $result = db_execute_assoc($query) or safe_die("Couldn't summarise saved entries<br />{$query}<br />" . $connect->ErrorMsg());
    if ($result->RecordCount() > 0) {
        $savedsurveyoutput .= "<table class='browsetable' align='center'>\n";
        $savedsurveyoutput .= "<thead><tr><th>SCID</th><th>" . $clang->gT("Actions") . "</th><th>" . $clang->gT("Identifier") . "</th><th>" . $clang->gT("IP address") . "</th><th>" . $clang->gT("Date Saved") . "</th><th>" . $clang->gT("Email address") . "</th>" . "</tr></thead><tbody>\n";
        while ($row = $result->FetchRow()) {
            $savedsurveyoutput .= "<tr>\n\t\t\t\t<td>" . $row['scid'] . "</td>\n\t\t\t\t<td align='center'>";
            if (bHasSurveyPermission($surveyid, 'responses', 'update')) {
                $savedsurveyoutput .= "<input style='height: 16; width: 16px; font-size: 8; font-family: verdana' type='image' src='{$imageurl}/token_edit.png' title='" . $clang->gT("Edit entry") . "' onclick=\"window.open('{$scriptname}?action=dataentry&amp;subaction=edit&amp;id={$row['srid']}&amp;sid={$surveyid}', '_top')\" />";
            }
            if (bHasSurveyPermission($surveyid, 'responses', 'delete')) {
Esempio n. 3
0
?>
    </div>
    <div class='menubar-main'>
        <div class='menubar-left'>

            <a href="<?php 
echo $this->createUrl("admin/survey/sa/view/surveyid/{$iSurveyId}");
?>
" title="<?php 
$clang->eT('Return to survey administration');
?>
">
                <img src="<?php 
echo $sImageURL;
?>
/home.png" alt="<?php 
echo $clang->eT('Return to survey administration');
?>
">
            </a>
        </div>
    </div>
</div>
<div class='header ui-widget-header'>
    <?php 
$clang->eT('Saved Responses:');
?>
 <?php 
echo getSavedCount($iSurveyId);
?>
</div>
<div class="side-body">
    <h3>
        <span style='font-weight:bold;'><?php eT('Saved responses'); ?></span>
        <?php echo $sSurveyName . ' ' . sprintf(gT('ID: %s'), $iSurveyId); ?>
    </h3>

        <div class="row">
            <div class="col-lg-12 content-right">
                <div class="alert alert-info" role="alert">
                    <?php eT('Total:'); ?> <?php echo getSavedCount($iSurveyId); ?>
                </div>

                <p>
                    <table class='browsetable table' style='margin:0 auto; width:60%'>
                        <thead>
                            <tr>
                                <th><?php eT('ID'); ?></th>
                                <th><?php eT('Actions'); ?></th>
                                <th><?php eT('Identifier'); ?></th>
                                <th><?php eT('IP address'); ?></th>
                                <th><?php eT('Date saved'); ?></th>
                                <th><?php eT('Email address'); ?></th>
                            </tr>
                        </thead>

                        <tbody>
                            <?php foreach($aResults as $oResult)
                                { ?>
                                <tr>
                                    <td><?php echo $oResult->scid; ?></td>
                                    <td align='center'>