Beispiel #1
0
function list_videos()
{
    global $id, $tool_content, $themeimg, $course_id, $langTitle, $langDescr, $langDate, $langChoice, $langCatVideoDirectory, $langAddModulesButton, $langNoVideo, $course_code;
    $count = 0;
    $video_found = FALSE;
    $cnt1 = Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM video WHERE course_id = ?d", $course_id)->cnt;
    $cnt2 = Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM videolink WHERE course_id = ?d", $course_id)->cnt;
    $count = $cnt1 + $cnt2;
    if ($count > 0) {
        $video_found = TRUE;
        $tool_content .= "<form action='insert.php?course={$course_code}' method='post'><input type='hidden' name='id' value='{$id}' />";
        $tool_content .= "<table class='table-default'>";
        $tool_content .= "<tr>" . "<th width='200' class='text-left'>&nbsp;{$langTitle}</th>" . "<th class='text-left'>{$langDescr}</th>" . "<th width='100'>{$langDate}</th>" . "<th width='80'>{$langChoice}</th>" . "</tr>";
        foreach (array('video', 'videolink') as $table) {
            $result = Database::get()->queryArray("SELECT * FROM {$table} WHERE (category IS NULL OR category = 0) AND course_id = ?d", $course_id);
            foreach ($result as $row) {
                $row->course_id = $course_id;
                if ($table == 'video') {
                    $vObj = MediaResourceFactory::initFromVideo($row);
                    $videolink = MultimediaHelper::chooseMediaAhref($vObj);
                } else {
                    $vObj = MediaResourceFactory::initFromVideoLink($row);
                    $videolink = MultimediaHelper::chooseMedialinkAhref($vObj);
                }
                $tool_content .= "<td>&nbsp;" . icon('fa-film') . "&nbsp;&nbsp;" . $videolink . "</td>" . "<td>" . q($row->description) . "</td>" . "<td class='text-center'>" . nice_format($row->date, true, true) . "</td>" . "<td class='text-center'><input type='checkbox' name='video[]' value='{$table}:{$row->id}' /></td>" . "</tr>";
            }
        }
        $sql = Database::get()->queryArray("SELECT * FROM video_category WHERE course_id = ?d ORDER BY name", $course_id);
        if ($sql) {
            $tool_content .= "<tr><td colspan='3' class='bold'>&nbsp;{$langCatVideoDirectory}</td></tr>";
            foreach ($sql as $videocat) {
                $tool_content .= "<tr>";
                $tool_content .= "<td>" . icon('fa-folder-o') . "&nbsp;&nbsp;" . q($videocat->name) . "</td>";
                $tool_content .= "<td colspan='2'>" . standard_text_escape($videocat->description) . "</td>";
                $tool_content .= "<td align='center'><input type='checkbox' name='videocatlink[]' value='{$videocat->id}' /></td>";
                $tool_content .= "</tr>";
                foreach (array('video', 'videolink') as $table) {
                    $sql2 = Database::get()->queryArray("SELECT * FROM {$table} WHERE category = ?d", $videocat->id);
                    foreach ($sql2 as $linkvideocat) {
                        $tool_content .= "<tr>";
                        $tool_content .= "<td>&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$themeimg}/links_on.png' />&nbsp;&nbsp;<a href='" . q($linkvideocat->url) . "' target='_blank'>" . q($linkvideocat->title == '' ? $linkvideocat->url : $linkvideocat->title) . "</a></td>";
                        $tool_content .= "<td>" . standard_text_escape($linkvideocat->description) . "</td>";
                        $tool_content .= "<td class='text-center'>" . nice_format($linkvideocat->date, true, true) . "</td>";
                        $tool_content .= "<td class='text-center'><input type='checkbox' name='video[]' value='{$table}:{$linkvideocat->id}' /></td>";
                        $tool_content .= "</tr>";
                    }
                }
            }
        }
        $tool_content .= "<tr><th colspan='4'><div align='right'><input class='btn btn-primary' type='submit' name='submit_video' value='" . q($langAddModulesButton) . "' />&nbsp;&nbsp;</div></th></tr></table></form>";
    }
    if (!$video_found) {
        $tool_content .= "<div class='alert alert-warning'>{$langNoVideo}</div>";
    }
}
Beispiel #2
0
function show_assignments()
{
    global $m, $uid, $group_id, $langSubmit, $langDays, $langNoAssign, $tool_content, $langWorks, $course_id, $course_code, $themeimg;
    $res = Database::get()->queryArray("SELECT *, (TO_DAYS(deadline) - TO_DAYS(NOW())) AS days\n\t\t FROM assignment WHERE course_id = ?d", $course_id);
    if (count($res) == 0) {
        $tool_content .= $langNoAssign;
        return;
    }
    $tool_content .= "<form action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}' method='post'>\n                <input type='hidden' name='file' value='" . q($_GET['submit']) . "'>\n                <input type='hidden' name='group_id' value='{$group_id}'>\n                <table class='tbl' width='99%'>\n                <tr>\n                <th class='left' width='170'>&nbsp;</th>\n                <td>&nbsp;</td>\n                </tr>\n                <tr>\n                <th class='left'>{$langWorks} ({$m['select']}):</th>\n                <td>\n                <table width='99%' align='left'>\n                <tr>\n\t\t<th class='left' colspan='2'>{$m['title']}</th>\n\t\t<th align='center' width='30%'>{$m['deadline']}</th>\n\t\t<th align='center' width='10%'>{$m['submitted']}</th>\n\t\t<th align='center' width='10%'>{$m['select']}</th>\n\t\t</tr>";
    foreach ($res as $row) {
        if (!$row->active) {
            continue;
        }
        $tool_content .= "<tr><td width=\"1%\">\n\t\t\t<img style='padding-top:2px;' src='{$themeimg}/arrow.png' alt=''></td>\n\t\t\t<td><div align='left'><a href='index.php?course={$course_code}&amp;id={$row->id}'>" . q($row->title) . "</a></td>\n\t\t\t<td align='center'>" . nice_format($row->deadline);
        if ($row->days > 1) {
            $tool_content .= " ({$m['in']}&nbsp;{$row->days}&nbsp;{$langDays}";
        } elseif ($row->days < 0) {
            $tool_content .= " ({$m['expired']})";
        } elseif ($row->days == 1) {
            $tool_content .= " ({$m['tomorrow']})";
        } else {
            $tool_content .= " ({$m['today']})";
        }
        $tool_content .= "</div></td>\n      <td align=\"center\">";
        $subm = was_submitted($uid, $group_id, $row->id);
        if ($subm == 'user') {
            $tool_content .= $m['yes'];
        } elseif ($subm == 'group') {
            $tool_content .= $m['by_groupmate'];
        } else {
            $tool_content .= $m['no'];
        }
        $tool_content .= "</td><td align=\"center\">";
        if ($row->days >= 0 and !was_graded($uid, $row->id) and is_group_assignment($row->id)) {
            $tool_content .= "<input type='radio' name='assign' value='{$row->id}'>";
        } else {
            $tool_content .= '-';
        }
        $tool_content .= "</td>\n    </tr>";
    }
    $tool_content .= "\n    </table>";
    $tool_content .= "</td></tr>\n\t<tr>\n\t  <th class='left'>" . $m['comments'] . ":</th>\n\t  <td><textarea name='comments' rows='4' cols='60'>" . "</textarea></td>\n\t</tr>\n\t<tr>\n\t  <th>&nbsp;</th>\n\t  <td><input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'></td>\n\t</tr>\n\t</table>\n\t</form>";
}
Beispiel #3
0
/**
 * @brief display list of available assignments (if any)
 * @global type $id
 * @global type $tool_content
 * @global type $langTitle
 * @global type $langChoice
 * @global type $langGroupWorkDeadline_of_Submission
 * @global type $langAddModulesButton
 * @global type $langNoAssign
 * @global type $langActive
 * @global type $langInactive
 * @global type $langVisible
 * @global type $course_id
 * @global type $course_code
 */
function list_assignments() {
    global $id, $tool_content, $langTitle, $langChoice, $langGroupWorkDeadline_of_Submission,
    $langAddModulesButton, $langNoAssign, $langActive, $langInactive,
    $langVisible, $course_id, $course_code;

    $result = Database::get()->queryArray("SELECT * FROM assignment WHERE course_id = ?d ORDER BY active, title", $course_id);
    if (count($result) == 0) {
        $tool_content .= "<div class='alert alert-warning'>$langNoAssign</div>";
    } else {
        $tool_content .= "<form action='insert.php?course=$course_code' method='post'>" .
                "<input type='hidden' name='id' value='$id'>" .
                "<table class='table-default'>" .
                "<tr class='list-header'>" .
                "<th class='text-left'>&nbsp;$langTitle</th>" .
                "<th width='120'>$langGroupWorkDeadline_of_Submission</th>" .
                "<th style='width:20px;' class='text-center'>$langChoice</th>" .
                "</tr>";        
        foreach ($result as $row) {
            
            if ($row->active) {
                $visible = icon('fa-eye', $langActive);
            } else {
                $visible = icon('fa-eye-slash', $langInactive);
            }            
            $description = empty($row->description) ? '' :
                    "<div>$row->description</div>";            
            $tool_content .= "<tr>" .
                    "<td> " . q($row->title) . "<br><br><div class='text-muted'>$description</div></td>" .
                    "<td class='text-center'>".nice_format($row->submission_date, true)."</td>" .
                    "<td class='text-center'><input name='work[]' value='$row->id' type='checkbox' /></td>" .
                    "</tr>";            
        }
        $tool_content .= 
                "</table>" .
                "<div align='right'><input class='btn btn-primary' type='submit' name='submit_work' value='$langAddModulesButton' /></div></th></form>";
    }
}
Beispiel #4
0
 $count_index = 0;
 foreach ($sql as $cu) {
     if ($cu->visible == 1) {
        $count_index++;
     }
     // access status
     $access = $cu->public;
     // Visibility icon
     $vis = $cu->visible;
     $icon_vis = ($vis == 1) ? 'visible.png' : 'invisible.png';
     $class_vis = ($vis == 0) ? 'not_visible' : '';
     if ($course_info->view_type == 'weekly') {
         if (!empty($cu->title)) {
             $cwtitle = "" . q($cu->title) . " ($langFrom2 ".nice_format($cu->start_week)." $langTill ".nice_format($cu->finish_week).")";                    
         } else {
             $cwtitle = "$count_index$langOr $langsWeek ($langFrom2 ".nice_format($cu->start_week)." $langTill ".nice_format($cu->finish_week).")"; 
         }                
         $href = "<a class = '$class_vis' href='${urlServer}modules/weeks/?course=$course_code&amp;id=$cu->id&amp;cnt=$count_index'>$cwtitle</a>";
     } else {
         $href = "<a class='$class_vis' href='${urlServer}modules/units/?course=$course_code&amp;id=$cu->id'>" . q($cu->title) . "</a>";
     }
     $cunits_content .= "<div class='col-xs-12'><div class='panel clearfix'><div class='col-xs-12'>
                             <div class='item-content'>
                                 <div class='item-header clearfix'>
                                     <h4 class='item-title'>$href</h4>";
                         if ($is_editor) {
         if ($course_info->view_type == 'weekly') { // actions for course weekly format
             $cunits_content .= "<div class='item-side'>" .
             action_button(array(
                 array('title' => $langEditChange,
                       'url' => $urlAppend . "modules/weeks/info.php?course=$course_code&amp;edit=$cu->id&amp;cnt=$count_index",
 $tool_content .= "\n    <th width='50'>&nbsp;</th>";
 $tool_content .= "\n    <th width='10%'><div align='center'><b>{$langType}</b></div></th>";
 $tool_content .= "\n    <th><div align='left'><b>{$langName}</b></div></th>";
 $tool_content .= "\n    <th width='15%'><div align='center'><b>{$langSize}</b></div></th>";
 $tool_content .= "\n    <th width='15%'><div align='center'><b>{$langDate}</b></div></th>";
 $tool_content .= "\n  </tr>";
 foreach ($fileinfo as $entry) {
     if ($entry['is_dir']) {
         // do not handle directories
         continue;
     }
     $cmdDirName = $entry['path'];
     $copyright_icon = '';
     $image = choose_image('.' . $entry['format']);
     $size = format_file_size($entry['size']);
     $date = nice_format($entry['date'], true, true);
     if ($entry['visible']) {
         $style = '';
     } else {
         $style = ' class="invisible"';
     }
     if (empty($entry['title'])) {
         $link_text = $entry['filename'];
     } else {
         $link_text = $entry['title'];
     }
     if ($entry['copyrighted']) {
         $link_text .= " <img src='../document/img/copyrighted.png' />";
     }
     $tool_content .= "\n  <tr{$style}>";
     $tool_content .= "\n    <td><input type='radio' name='selectedDocument' value='" . $entry['path'] . "'/></td>";
Beispiel #6
0
function show_assignments() {
    global $m, $uid, $group_id, $langSubmit, $langDays, $langNoAssign, $tool_content,
    $langWorks, $course_id, $course_code, $themeimg, $langCancel, $urlServer;
    
    $gids = user_group_info($uid, $course_id);
    if (!empty($gids)) {
        $gids_sql_ready = implode(',',array_keys($gids));
    } else {
        $gids_sql_ready = "''";
    }
    
    $res = Database::get()->queryArray("SELECT *, CAST(UNIX_TIMESTAMP(deadline)-UNIX_TIMESTAMP(NOW()) AS SIGNED) AS time
                                 FROM assignment WHERE course_id = ?d AND active = '1' AND
                                 (assign_to_specific = '0' OR assign_to_specific = '1' AND id IN
                                    (SELECT assignment_id FROM assignment_to_specific WHERE user_id = ?d UNION SELECT assignment_id FROM assignment_to_specific WHERE group_id IN ($gids_sql_ready))
                                 )
                                 ORDER BY CASE WHEN CAST(deadline AS UNSIGNED) = '0' THEN 1 ELSE 0 END, deadline", $course_id, $uid);

    if (count($res) == 0) {
        $tool_content .= $langNoAssign;
        return;
    }
    $table_content = '';
    foreach ($res as $row) {
        if (!$row->active) {
            continue;
        }

        $table_content .= "<tr><td width=\"1%\">
			<img style='padding-top:2px;' src='$themeimg/arrow.png' alt=''></td>
			<td><div align='left'><a href='index.php?course=$course_code&amp;id=$row->id'>" . q($row->title) . "</a></td>
			<td align='center'>" . nice_format($row->deadline);
                        if ($row->time > 0) {
                            $table_content .= "<br>(<small>$langDaysLeft" . format_time_duration($row->time) . "</small>)";
                        } else if($row->deadline){
                            $table_content .= "<br> (<small><span class='expired'>$m[expired]</span></small>)";
                        }

        $table_content .= "</div></td>\n      <td align=\"center\">";
        $subm = was_submitted($uid, $group_id, $row->id);
        if ($subm == 'user') {
            $table_content .= $m['yes'];
        } elseif ($subm == 'group') {
            $table_content .= $m['by_groupmate'];
        } else {
            $table_content .= $m['no'];
        }
        $table_content .= "</td><td align=\"center\">";
        if ($row->time >= 0 and !was_graded($uid, $row->id) and is_group_assignment($row->id)) {
            $table_content .= "<input type='radio' name='assign' value='$row->id'>";
        } else {
            $table_content .= '-';
        }
        $table_content .= "</td>\n    </tr>";
    }
    $tool_content .= "
            <div class='form-wrapper'>
                <form class='form-horizontal' action='$_SERVER[SCRIPT_NAME]?course=$course_code' method='post'>
                <fieldset>
                    <input type='hidden' name='file' value='" . q($_GET['submit']) . "'>
                    <input type='hidden' name='group_id' value='$group_id'>
                    <div class='form-group'>
                        <label for='title' class='col-sm-2 control-label'>$langWorks ($m[select]):</label>
                        <div class='col-sm-10'>
                            <table class='table-default'>
                                <tr>
                                    <th class='left' colspan='2'>$m[title]</th>
                                    <th align='center' width='30%'>$m[deadline]</th>
                                    <th align='center' width='10%'>$m[submitted]</th>
                                    <th align='center' width='10%'>$m[select]</th>
                                </tr>
                                $table_content
                            </table>
                        </div>
                    </div>
                    <div class='form-group'>
                        <label for='title' class='col-sm-2 control-label'>$m[comments]:</label>
                        <div class='col-sm-10'>
                            <textarea name='comments' rows='4' cols='60' class='form-control'></textarea>
                        </div>
                    </div>
                    <div class='form-group'>
                        <div class='col-sm-10 col-sm-offset-2'>
                            <input class='btn btn-primary' type='submit' name='submit' value='$langSubmit'>
                            <a class='btn btn-default' href='$urlServer/modules/group/document.php?course=$course_code&group_id=$group_id'>$langCancel</a>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>";
}
Beispiel #7
0
        echo $_LANG[$l]["g_deposit"];
        ?>
</a> | <a href="?c=balance/withdraw_slc<?php 
        echo $___l;
        ?>
" <?php 
        if ($content == "balance/withdraw_slc") {
            echo " class=\"active\"";
        }
        ?>
><?php 
        echo $_LANG[$l]["g_withdraw"];
        ?>
</a></li>
            <li style="font-size: 0.9em"><?php 
        echo nice_format(get_balance($_SESSION["user_id"], "BTC"), false, 0, 8);
        ?>
 <?php 
        echo $_LANG[$l]["g_bitcoins"];
        ?>
<br /><a href="?c=balance/deposit_btc<?php 
        echo $___l;
        ?>
" <?php 
        if ($content == "balance/deposit_btc") {
            echo " class=\"active\"";
        }
        ?>
><?php 
        echo $_LANG[$l]["g_deposit"];
        ?>
Beispiel #8
0
 /**
  * display users logging        
  * Note: $module_id = $course_id = 0 means other logging (e.g. modify user profile, course creation etc.)
  * @param int $course_id (-1 means all courses)
  * @param type $user_id (-1 means all users)
  * @param int $module_id (-1 means all modules)
  * @param type $logtype (-1 means logtypes)
  * @param type $date_from
  * @param type $date_now
  * @param type script_page     
  * @return none        
  */
 public function display($course_id, $user_id, $module_id, $logtype, $date_from, $date_now, $script_page)
 {
     global $tool_content, $modules;
     global $langNoUsersLog, $langDate, $langUser, $langAction, $langDetail, $langCourse, $langModule, $langAdminUsers, $langExternalLinks, $langCourseInfo;
     $q1 = $q2 = $q3 = $q4 = '';
     if ($user_id != -1) {
         $q1 = "AND user_id = {$user_id}";
         // display specific user
     }
     if ($logtype > 0) {
         $q3 = "AND action_type = {$logtype}";
         // specific course logging
         if ($logtype > 3) {
             // specific system logging
             $module_id = $course_id = 0;
         }
     } elseif ($logtype == -2) {
         // display all system logging
         $q2 = "AND module_id = 0";
         $q4 = "AND course_id = 0";
     }
     if ($module_id > 0) {
         $q2 = "AND module_id = {$module_id}";
         // display specific module
     } elseif ($module_id == -1) {
         // display all course module logging
         $q2 = "AND module_id > 0";
         // but exclude system logging
     }
     if ($course_id > 0) {
         $q4 = "AND course_id = {$course_id}";
         // display specific course
     } elseif ($course_id == -1) {
         // display all course logging
         $q4 = "AND course_id > 0";
         // but exclude system logging
     }
     // count logs
     $num_of_logs = Database::get()->querySingle("SELECT COUNT(*) AS count FROM log WHERE ts BETWEEN '{$date_from}' AND '{$date_now}' {$q1} {$q2} {$q3} {$q4}")->count;
     // fetch logs
     $sql = Database::get()->queryArray("SELECT user_id, course_id, module_id, details, action_type, ts FROM log\n                                WHERE ts BETWEEN '{$date_from}' AND '{$date_now}'\n                                {$q1} {$q2} {$q3} {$q4}\n                                ORDER BY ts DESC");
     if ($num_of_logs > 0) {
         if ($course_id > 0) {
             $tool_content .= "<div class='alert alert-info'>{$langCourse}: " . q(course_id_to_title($course_id)) . "</div>";
         }
         if ($module_id > 0) {
             if ($module_id == MODULE_ID_USERS) {
                 $tool_content .= "<div class='alert alert-info'>{$langModule}: " . $langAdminUsers . "</div>";
             } elseif ($module_id == MODULE_ID_TOOLADMIN) {
                 $tool_content .= "<div class='alert alert-info'>{$langModule}: " . $langExternalLinks . "</div>";
             } else {
                 $tool_content .= "<div class='alert alert-info'>{$langModule}: " . $modules[$module_id]['title'] . "</div>";
             }
         }
         $tool_content .= "<table id = 'log_results_table' class='tbl'>";
         $tool_content .= "<thead>";
         // log header
         $tool_content .= "<tr><th>{$langDate}</th><th>{$langUser}</th>";
         if ($course_id == -1) {
             $tool_content .= "<th>{$langCourse}</th>";
         }
         if ($module_id == -1) {
             $tool_content .= "<th>{$langModule}</th>";
         }
         $tool_content .= "<th>{$langAction}</th><th>{$langDetail}</th>";
         $tool_content .= "</tr>";
         $tool_content .= "</thead>";
         $tool_content .= "<tbody>";
         // display logs
         foreach ($sql as $r) {
             $tool_content .= "<tr>";
             $tool_content .= "<td>" . nice_format($r->ts, true) . "</td>";
             if ($r->user_id == 0 or $logtype == LOG_DELETE_USER) {
                 // login failures or delete user
                 $tool_content .= "<td>&nbsp;&nbsp;&mdash;&mdash;&mdash;</td>";
             } else {
                 $tool_content .= "<td>" . display_user($r->user_id, false, false) . "</td>";
             }
             if ($course_id == -1) {
                 // all courses
                 $tool_content .= "<td>" . q(course_id_to_title($r->course_id)) . "</td>";
             }
             if ($module_id == -1) {
                 // all modules
                 $mid = $r->module_id;
                 if ($mid == MODULE_ID_USERS) {
                     $tool_content .= "<td>" . $langAdminUsers . "</td>";
                 } elseif ($mid == MODULE_ID_TOOLADMIN) {
                     $tool_content .= "<td>" . $langExternalLinks . "</td>";
                 } elseif ($mid == MODULE_ID_SETTINGS) {
                     $tool_content .= "<td>" . $langCourseInfo . "</td>";
                 } else {
                     $tool_content .= "<td>" . $modules[$mid]['title'] . "</td>";
                 }
             }
             $tool_content .= "<td>" . $this->get_action_names($r->action_type) . "</td>";
             if ($course_id == 0 or $module_id == 0) {
                 // system logging
                 $tool_content .= "<td>" . $this->other_action_details($r->action_type, $r->details) . "</td>";
             } else {
                 // course logging
                 $tool_content .= "<td>" . $this->course_action_details($r->module_id, $r->details) . "</td>";
             }
             $tool_content .= "</tr>";
         }
         $tool_content .= "</tbody>";
         $tool_content .= "</table>";
     } else {
         $tool_content .= "<div class='alert alert-warning'>{$langNoUsersLog}</div>";
     }
     return;
 }
Beispiel #9
0
$tool_content .= "<div class='row'>
  <div class='col-md-12'>
    <div class='panel padding'>";
show_resourcesWeeks($id);
$tool_content .= "
    </div>
  </div>
</div>";

$q = Database::get()->queryArray("SELECT id, start_week, finish_week, title FROM course_weekly_view
               WHERE course_id = ?d $visibility_check", $course_id);
$course_weeks_options = "";
foreach ($q as $info) {
    $selected = ($info->id == $id) ? ' selected ' : '';
    $course_weeks_options .= "<option value='$info->id'$selected>" .
            nice_format($info->start_week)." ... " . nice_format($info->finish_week) ."</option>";
}
$tool_content .= "
            <div class='panel panel-default'>
                <div class='panel-body'>
                    <form class='form-horizontal' name='unitselect' action='" . $urlServer . "modules/weeks/' method='get'>
                        <div class='form-group'>
                            <label class='col-sm-8 control-label'>$langWeeks</label>
                            <div class='col-sm-4'>
                                <select name='id' class='form-control' onChange='document.unitselect.submit();'>
                                    $course_weeks_options
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
Beispiel #10
0
    $data['aaData'] = array();
    foreach ($result as $myrow) {
        $full_name = $myrow->givenname . " " . $myrow->surname;
        $am_message = empty($myrow->am) ? '' : ("<div class='right'>($langAm: " . q($myrow->am) . ")</div>");
        /* $link_parent_email = "";
          if (get_config('enable_secondary_email')) {
          if ($myrow->editor == 1 or $myrow->tutor == 1 or $myrow->status == 1 or empty($myrow['parent_email'])) {
          $link_parent_email = "";
          } else {
          $link_parent_email = "<a href='emailparent.php?course=$course_code&amp;id=$myrow->id'>
          <img src='$themeimg/email.png' title='".q($langEmailToParent)."' alt='".q($langEmailToParent)."' />
          </a>";
          }
          } */
        //create date field with unregister button
        $date_field = ($myrow->reg_date == '0000-00-00') ? $langUnknownDate : nice_format($myrow->reg_date);

        // Create appropriate role control buttons
        // Admin right
        $user_role_controls = '';
        if ($myrow->id != $_SESSION["uid"] && $myrow->reviewer == '1') {
            $user_role_controls .= "<a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;removeReviewer=$myrow->id'><img src='$themeimg/reviewer_remove.png' alt='$langRemoveRightReviewer' title='$langRemoveRightReviewer'></a>";
        } else {
            $user_role_controls .= "<a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;giveReviewer=$myrow->id'><img src='$themeimg/reviewer_add.png' alt='$langGiveRightReviewer' title='$langGiveRightReviewer'></a>";
        }
        // opencourses reviewer right
        if (get_config('opencourses_enable')) {
                if ($myrow->reviewer == '1') {
                    $user_role_controls .= "<a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;removeReviewer=$myrow->id'><img src='$themeimg/reviewer_remove.png' alt='$langRemoveRightReviewer' title='$langRemoveRightReviewer'></a>";
                } else {
                    $user_role_controls .= "<a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;giveReviewer=$myrow->id'><img src='$themeimg/reviewer_add.png' alt='$langGiveRightReviewer' title='$langGiveRightReviewer'></a>";
Beispiel #11
0
             Session::Messages($langAttendanceEdit, "alert-success");
             redirect_to_home_page("modules/attendance/index.php");
         }
     }
     //display the form and the list
     $result = Database::get()->querySingle("SELECT * FROM attendance_activities  WHERE id = ?d", $actID);
     $tool_content .= "<div class='alert alert-info'>" . $result->title . "</div>";
     //show all the students
     $resultUsers = Database::get()->queryArray("SELECT attendance_users.id as recID, attendance_users.uid as userID, user.surname as surname, user.givenname as name, user.am as am, course_user.reg_date as reg_date   FROM attendance_users, user, course_user  WHERE attendance_id = ?d AND attendance_users.uid = user.id AND `user`.id = `course_user`.`user_id` AND `course_user`.`course_id` = ?d ", $attendance_id, $course_id);
     if ($resultUsers) {
         //table to display the users
         $tool_content .= "\n            <form method='post' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&ins=" . $actID . "'>\n            <table id='users_table{$course_id}' class='table-default custom_list_order'>\n                <thead>\n                    <tr>\n                      <th width='1'>{$langID}</th>\n                      <th><div align='left' width='100'>{$langName} {$langSurname}</div></th>\n                      <th class='center' width='80'>{$langRegistrationDateShort}</th>\n                      <th class='center'>{$langAttendanceAbsences}</th>\n                      <th class='center'>{$langActions}</th>\n                    </tr>\n                </thead>\n                <tbody>";
         $cnt = 0;
         foreach ($resultUsers as $resultUser) {
             $cnt++;
             $tool_content .= "\n                    <tr>\n                        <td>{$cnt}</td>\n                        <td> " . display_user($resultUser->userID) . " ({$langAm}: {$resultUser->am})</td>\n                        <td>" . nice_format($resultUser->reg_date) . "</td>\n                        <td>" . userAttendTotal($attendance_id, $resultUser->userID) . "/" . $attendance_limit . "</td>\n                        <td class='center'>\n                            <input class='form-control' type='checkbox' value='1' name='" . $resultUser->userID . "'";
             //check if the user has attendace for this activity already OR if it should be automatically inserted here
             $q = Database::get()->querySingle("SELECT attend FROM attendance_book WHERE attendance_activity_id = ?d AND uid = ?d", $actID, $resultUser->userID);
             if (isset($q->attend) && $q->attend == 1) {
                 $tool_content .= " checked";
             }
             $tool_content .= ">\n                            <input type='hidden' value='" . $actID . "' name='actID'>\n                        </td>";
             $tool_content .= "\n                    </tr>";
         }
         $tool_content .= "</tbody></table> <input type='submit' class='btn btn-default' name='bookUsersToAct' value='{$langAttendanceBooking}' /></form>";
     }
     $showAttendanceActivities = 0;
 }
 //DISPLAY: list of attendance activities
 if ($showAttendanceActivities == 1) {
     //get all the available activities
Beispiel #12
0
        foreach ($posts as $post) {
            $sharing_content = '';
            $rating_content = '';
            if ($sharing_allowed) {
                $sharing_content = $sharing_enabled ? print_sharing_links($urlServer . "modules/blog/index.php?course={$course_code}&amp;action=showPost&amp;pId=" . $post->getId(), $post->getTitle()) : '';
            }
            if ($ratings_enabled) {
                $rating = new Rating('up_down', 'blogpost', $post->getId());
                $rating_content = $rating->put($is_editor, $uid, $course_id);
            }
            if ($comments_enabled) {
                $comm = new Commenting('blogpost', $post->getId());
                $comment_content = "<a class='btn btn-primary btn-xs pull-right' href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;action=showPost&amp;pId=" . $post->getId() . "#comments_title'>{$langComments} (" . $comm->getCommentsNum() . ")</a>";
            } else {
                $comment_content = "<div class=\"blog_post_empty_space\"></div>";
            }
            $tool_content .= "<div class='panel panel-action-btn-default'>\r\n                                <div class='panel-heading'>\r\n                                    <div class='pull-right'>\r\n                                        " . action_button(array(array('title' => $langModify, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;action=editPost&amp;pId=" . $post->getId(), 'icon' => 'fa-edit', 'show' => $post->permEdit($is_editor, $stud_allow_create, $uid)), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;action=delPost&amp;pId=" . $post->getId(), 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langSureToDelBlogPost, 'show' => $post->permEdit($is_editor, $stud_allow_create, $uid)))) . "\r\n                                    </div>\r\n                                    <h3 class='panel-title'>\r\n                                        <a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;action=showPost&amp;pId=" . $post->getId() . "'>" . q($post->getTitle()) . "</a>\r\n                                    </h3>                                    \r\n                                </div>\r\n                                <div class='panel-body'>\r\n                                    <div class='label label-success'>" . nice_format($post->getTime(), true) . "</div><small>" . $langBlogPostUser . display_user($post->getAuthor(), false, false) . "</small><br><br>" . standard_text_escape(ellipsize_html($post->getContent(), $num_chars_teaser_break, "<strong>&nbsp;...<a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;action=showPost&amp;pId=" . $post->getId() . "'> <span class='smaller'>[{$langMore}]</span></a></strong>")) . "\r\n                                    {$comment_content}\r\n                                </div>\r\n                                <div class='panel-footer'>\r\n                                    <div class='row'>\r\n                                        <div class='col-sm-6'>{$rating_content}</div>\r\n                                        <div class='col-sm-6 text-right'>{$sharing_content}</div>\r\n                                    </div>                                    \r\n                                </div>\r\n                             </div>";
        }
        //display navigation links
        $tool_content .= $blog->navLinksHTML($page, $posts_per_page);
        $tool_content .= "</div>";
        /***end of blog posts area***/
        /***sidebar area***/
        $tool_content .= "<div class='col-sm-3'>";
        $tool_content .= $blog->popularBlogPostsHTML($num_popular);
        $tool_content .= $blog->chronologicalTreeHTML(date('n', strtotime($posts[0]->getTime())), date('Y', strtotime($posts[0]->getTime())));
        $tool_content .= "</div></div>";
        /***end of sidebar area***/
    }
}
draw($tool_content, 2, null, $head_content);
Beispiel #13
0
                $td[$i++] = "";
            }
        }
        
        if ($mbox_type == 'inbox') {
            $td[$i++] = display_user($msg->author_id, false, false, "outtabs");
        } else {
            $recipients = '';
            foreach ($msg->recipients as $r) {
                if ($r != $msg->author_id) {
                    $recipients .= display_user($r, false, false, "outtabs").'<br/>';
                }
            }
            $td[$i++] = $recipients;
        }
        $td[$i++] = nice_format(date('Y-m-d H:i:s',$msg->timestamp), true);
            
//            $td[$i++] = action_button(array(
//                array(
//                    'icon' => 'fa-times',
//                    'url' => 'javascript:void(0);',
//                    'level' => 'primary',
//                    'title' => $langDelete,
//                    'btn_class' => $mbox_type == 'inbox'? 'delete_in btn-default' : 'delete_out btn-default',
//                    'link-attrs' => "data-id='$msg->id'"
//                    )
//                )
//            );
        $btn_class = ($mbox_type == 'inbox')? 'delete_in' : 'delete_out';
        $td[$i++] = "<a href='javascript:void(0)' class='$btn_class'><span class='fa fa-times text-danger' style='padding-top:8px; font-size:1.2em;'></span></a>";
        
 // ResourceIndexers require course_id inside the input data array (POST, but we do not want to pass it through the form)
 $_POST['course_id'] = $course_id;
 // Search Terms might come from GET, but we want to pass it alltogether with POST in ResourceIndexers
 $_POST['search_terms'] = $search_terms;
 $idx = new Indexer();
 $tool_content .= "\n        <div id=\"operations_container\">\n      <ul id='opslist'>\n        <li><a href='" . $_SERVER['SCRIPT_NAME'] . "'>{$langNewSearch}</a></li>\n      </ul>\n    </div>\n        <p class='sub_title1'>{$langResults}</p>";
 // search in announcements
 if ($announcements) {
     $announceHits = $idx->searchRaw(AnnouncementIndexer::buildQuery($_POST));
     if (count($announceHits) > 0) {
         $tool_content .= "<script type='text/javascript' src='../auth/sorttable.js'></script>\n              <table width='99%' class='sortable' id='t1' align='left'>\n              <tr>\n                <th colspan='2'>{$langAnnouncements}:</th>\n              </tr>";
         $numLine = 0;
         foreach ($announceHits as $annHit) {
             $announce = Database::get()->querySingle("SELECT title, content, date FROM announcement WHERE id = ?d", $annHit->pkid);
             $class = $numLine % 2 ? 'odd' : 'even';
             $tool_content .= "<tr class='{$class}'>\n                                  <td width='1' valign='top'><img style='padding-top:3px;' src='{$themeimg}/arrow.png' title='bullet' /></td>\n                                  <td><b><a href='" . $annHit->url . "'>" . q($announce->title) . "</a></b>&nbsp;&nbsp;\n                                  <small>(" . nice_format(claro_format_locale_date($dateFormatLong, strtotime($announce->date))) . ")\n                                  </small><br />" . $announce->content . "</td></tr>";
             $numLine++;
         }
         $tool_content .= "</table>";
         $found = true;
     }
 }
 // search in agenda
 if ($agenda) {
     $agendaHits = $idx->searchRaw(AgendaIndexer::buildQuery($_POST));
     if (count($agendaHits) > 0) {
         $tool_content .= "<script type='text/javascript' src='../auth/sorttable.js'></script>\n                  <table width='99%' class='sortable' id='t2' align='left'>\n          <tr>\n            <th colspan='2' class='left'>{$langAgenda}:</th>\n                  </tr>";
         $numLine = 0;
         foreach ($agendaHits as $agHit) {
             $agenda = Database::get()->querySingle("SELECT title, content, start, duration FROM agenda WHERE id = ?d", $agHit->pkid);
             $class = $numLine % 2 ? 'odd' : 'even';
Beispiel #15
0
                        . '<input type="radio" name="new" value="' . $version->id . '"' . $checked . ' />' . "\n"
                        . '</td>'
                        . "\n"
                ;

                $userInfo = user_get_data($version->editor_id);                

                $userStr = q($userInfo->givenname) . "&nbsp;" . q($userInfo->surname);

                $userUrl = $userStr;

                $versionUrl = '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;wikiId='
                        . $wikiId . '&amp;title=' . rawurlencode($wiki_title)
                        . '&amp;action=show&amp;versionId=' . $version->id
                        . '">'
                        . nice_format($version->mtime,TRUE)
                        . '</a>'
                ;

                $tool_content .= '<td>'
                        . sprintf($langWikiVersionPattern, $versionUrl, $userUrl)
                        . '</td><td>'.$makecurrent.'</td><td colspan="3"></td>'
                        . "\n"
                ;
                
                if ($version->changelog != '') {
                	$tool_content .='<td colspan="4">(<i>'.$version->changelog
                	. '</i>)</td>'
                	. "\n";
                }
                
Beispiel #16
0
function withdraw_slc($address, $amount = 0, $type = "", $intern_txid = 0)
{
    global $solidcoin, $db;
    if (!is_array($address)) {
        $address = mysql_real_escape_string($address, $db);
        $slt_transfer_deposit_address_a = "SELECT * FROM transfer_deposit_address WHERE address = '{$address}'";
        $rlt_transfer_deposit_address_a = mysql_query($slt_transfer_deposit_address_a);
        if ($row_transfer_deposit_address_a = mysql_fetch_assoc($rlt_transfer_deposit_address_a)) {
            if ($amount <= 0) {
                return array("success" => true, "type" => "intern", "to_user" => $row_transfer_deposit_address_a["user"]);
            }
            $ins_transfer_deposit_a = "INSERT INTO transfer_deposit (deposit_address, txid, amount, filing_time, type) VALUES ({$row_transfer_deposit_address_a['id']}, {$intern_txid}, '{$amount}', NOW(), 'intern')";
            mysql_query($ins_transfer_deposit_a);
            $did = mysql_insert_id();
            $itxid = add_transaction($row_transfer_deposit_address_a["user"], "in", "intern", $amount, "SLC", "transfer_deposit", $did);
            $slt_transfer_deposit_a = "SELECT SUM(amount) AS amount FROM transfer_deposit WHERE deposit_address = '{$row_transfer_deposit_address_a['id']}'";
            $rlt_transfer_deposit_a = mysql_query($slt_transfer_deposit_a);
            $row_transfer_deposit_a = mysql_fetch_assoc($rlt_transfer_deposit_a);
            $total_amount = $row_transfer_deposit_a["amount"];
            if ($row_transfer_deposit_address_a["send_mail"] == "yes") {
                $slt_user_c = "SELECT * FROM user WHERE id = '{$row_transfer_deposit_address_a['user']}'";
                $rlt_user_c = mysql_query($slt_user_c);
                $row_user_c = mysql_fetch_assoc($rlt_user_c);
                $content = "";
                $content .= "Dear user,<br />\n<br />\nYou have received " . nice_format($amount, false, 0, 4) . " Solidcoins with your deposit address <a href=\"http://slc24.com/?c=services/transfer/deposit_address&amp;a={$address}\">{$address}</a>.<br />\n<br />\n";
                $content .= "More information about this deposit: <a href=\"http://slc24.com/?c=services/transfer/deposit&amp;id={$did}\">http://slc24.com/?c=services/transfer/deposit&amp;id={$did}</a><br />\n";
                $content .= "More information about this deposit address: <a href=\"http://slc24.com/?c=services/transfer/deposit_address&amp;a={$address}\">http://slc24.com/?c=services/transfer/deposit_address&amp;a={$address}</a><br />\n";
                $content .= "Additional information:<br />\n";
                $content .= "Type: internal<br />\n";
                $content .= "Amount received: " . nice_format($amount, false, 0, 4) . " Solidcoins<br />\n";
                $content .= "Total amount received: " . nice_format($total_amount, false, 0, 4) . " Solidcoins<br />\n";
                if ($row_transfer_deposit_address_a["group"]) {
                    $content .= "Group: " . $row_transfer_deposit_address_a["group"] . "<br />\n";
                }
                if ($row_transfer_deposit_address_a["data"]) {
                    $content .= "Data: " . $row_transfer_deposit_address_a["data"] . "<br />\n";
                }
                $content .= "Fee: 0 Solidcoins<br />\n<br />\n";
                $content .= "Your sc24 team";
                send_mail("Deposit of " . nice_format($amount, false, 0, 4) . " Solidcoins arrived", $content, $row_user_c["email"]);
            }
            if (strlen($row_transfer_deposit_address_a["callback"]) > 0) {
                $callback = $row_transfer_deposit_address_a["callback"];
                if (!strpos($callback, "?")) {
                    $callback .= "?id={$row_transfer_deposit_address_a['id']}&group=" . urlencode($row_transfer_deposit_address_a["group"]) . "&address={$address}&total_amount=" . nice_format($total_amount, false, 0, 4) . "&new_amount=" . nice_format($amount, false, 0, 4) . "&fee=0&type=intern";
                } else {
                    $callback .= "&id={$row_transfer_deposit_address_a['id']}&group=" . urlencode($row_transfer_deposit_address_a["group"]) . "&address={$address}&total_amount=" . nice_format($total_amount, false, 0, 4) . "&new_amount=" . nice_format($amount, false, 0, 4) . "&fee=0&type=intern";
                }
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, $callback);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $response = curl_exec($ch);
                curl_close($ch);
            }
            return array("success" => true, "type" => "intern", "txid" => $itxid, "to_user" => $row_transfer_deposit_address_a["user"]);
        }
        $slt_deposit_address_a = "SELECT * FROM deposit_address WHERE currency = 'SLC' AND address = '{$address}'";
        $rlt_deposit_address_a = mysql_query($slt_deposit_address_a);
        if ($row_deposit_address_a = mysql_fetch_assoc($rlt_deposit_address_a)) {
            if ($amount <= 0) {
                return array("success" => true, "type" => "intern", "to_user" => $row_deposit_address_a["user"]);
            }
            $itxid = add_transaction($row_deposit_address_a["user"], "in", "intern", $amount, "SLC", "deposit", $intern_txid);
            return array("success" => true, "type" => "intern", "txid" => $itxid, "to_user" => $row_deposit_address_a["user"]);
        }
        if ($amount <= 0) {
            return array("success" => true, "type" => "extern");
        }
        if (!isset($solidcoin)) {
            $solidcoin = new jsonRPCClient("http://*****:*****@127.0.0.1:7556/");
        }
        $txid = $solidcoin->sc_sendtoaddress("main", $address, (int) round($amount * 10000), (int) 20000);
        $ins_crypto_transaction_a = "INSERT INTO crypto_transaction (txid) VALUES ('{$txid}')";
        mysql_query($ins_crypto_transaction_a);
        return array("success" => true, "type" => "extern", "txid" => mysql_insert_id(), "to_user" => 0);
    } else {
        if (!is_array($amount) || count($address) != count($amount) || count($amount) == 0 || $type != "extern") {
            return array("success" => false);
        }
        $addresses = $address;
        $j = 0;
        foreach ($addresses as $i => $address) {
            if ($i != $j) {
                return array("success" => false);
            }
            $j++;
        }
        $withdrawal_array = array();
        foreach ($addresses as $i => $address) {
            $withdrawal_array[$address] = "" . round($amount[$i] * 10000);
        }
        //print_r($withdrawal_array);
        $txid = $solidcoin->sc_sendmany("main", "", $withdrawal_array);
        //print_r($withdrawal_array);
        $ins_crypto_transaction_a = "INSERT INTO crypto_transaction (txid) VALUES ('{$txid}')";
        mysql_query($ins_crypto_transaction_a);
        return array("success" => true, "txid" => mysql_insert_id());
    }
}
Beispiel #17
0
        if($tag->module_id == MODULE_ID_EXERCISE){
            $exe = Database::get()->querySingle("SELECT title FROM exercise WHERE id = ?d ", $tag->element_id);
            $link = "<a href='../../modules/exercise/admin.php?course=".$course_code."&amp;exerciseId=".$tag->element_id."'>$exe->title</a><br>";
        }
        if($tag->module_id == MODULE_ID_UNITS){
            $unit = Database::get()->querySingle("SELECT title FROM course_units WHERE id = ?d ", $tag->element_id);
            $link = "<a href='../../modules/units/index.php?course=".$course_code."&amp;id=".$tag->element_id."'>$unit->title</a><br>";
        }
        if($tag->module_id == MODULE_ID_WEEKS){
            $unit = Database::get()->querySingle("SELECT * FROM course_weekly_view WHERE id = ?d", $tag->element_id);               
            if(empty($unit->title)) {
                $previous_weeks = Database::get()->querySingle("SELECT COUNT(*) AS week_number FROM course_weekly_view WHERE course_id = ?d AND start_week < ?t", $unit->course_id, $unit->start_week);
                $week_number = $previous_weeks ? ($previous_weeks->week_number + 1) : 1;
                $title = "$week_number$langOr $langsWeek ($langFrom2 ".nice_format($unit->start_week)." $langTill ".nice_format($unit->finish_week).")"; 
            } else {
                $title = q($unit->title) . " ($langFrom2 ".nice_format($unit->start_week)." $langTill ".nice_format($unit->finish_week).")";
            }
            $link = "<a href='../../modules/weeks/index.php?course=".$course_code."&amp;id=".$tag->element_id."'>$title</a><br>";
        }            
        $tool_content .= "
                    <ul>
                        <li>$link</li>
                    </ul>
                ";
        $latest_module_id = $tag->module_id;
    }       
        $tool_content .= "</div></div>";
}
    
    
draw($tool_content, 2, null, $head_content);
Beispiel #18
0
        if ($row_address_a["creation_date"] > "2011-10-11 00:00:00") {
            if ($received == 0) {
                $new = false;
                echo "<tr><td>{$row_address_a['address']}</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n";
            } elseif ($pending > 0) {
                echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'; this.onclick = 'function {}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n";
            } else {
                echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'; this.onclick = 'function {}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n";
            }
        } else {
            echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td>? (old address)</td><td>? (old address)</td><td>? (old address)</td></tr>\r\n";
        }
    }
    if ($new) {
        $address = $bitcoin->getnewaddress();
        $ins_address_a = "INSERT INTO deposit_address (currency, address, user, booked, creation_date) VALUES ('BTC', '{$address}', '{$_SESSION['user_id']}', '0', NOW())";
        mysql_query($ins_address_a);
        echo "<tr><td>{$address}</td><td style=\"text-align: right\">" . nice_format(0, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format(0, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format(0, true, 0, 8) . "</td></tr>\r\n";
    }
} else {
    $address = $bitcoin->getnewaddress();
    echo "<tr><td>{$address}</td><td>0</td><td>0</td><td>0</td></tr>\r\n";
    $ins_address_a = "INSERT INTO deposit_address (currency, address, user, booked, creation_date) VALUES ('BTC', '{$address}', '{$_SESSION['user_id']}', '0', NOW())";
    mysql_query($ins_address_a);
}
?>
</table>
<br />
Transfer any amount to any of the addresses, preferably to one of the new ones for best anonymity.
</p>
</div>
    }
    echo "</td>";
    echo "<td style=\"padding-left: 10px\">";
    echo $row_transfer_withdrawal_address_a["group"];
    echo "</td>";
    echo "<td style=\"padding-left: 10px\">";
    echo "<a href=\"?c=services/transfer/withdrawal_address&a={$row_transfer_withdrawal_address_a['address']}\">" . substr($row_transfer_withdrawal_address_a["address"], 0, 5) . "..." . substr($row_transfer_withdrawal_address_a["address"], -3, 3) . "</a>";
    echo "</td>";
    echo "<td style=\"padding-left: 10px\">";
    echo date("d.m. H:i:s", $row_transfer_withdrawal_address_a["creation_time_u"] - $_SESSION["time_offset"] * 60);
    echo "</td>";
    $slt_transfer_withdrawal_b = "SELECT SUM(amount) AS amount FROM transfer_withdrawal WHERE withdrawal_address = '{$row_transfer_withdrawal_address_a['id']}'";
    $rlt_transfer_withdrawal_b = mysql_query($slt_transfer_withdrawal_b);
    $row_transfer_withdrawal_b = mysql_fetch_assoc($rlt_transfer_withdrawal_b);
    echo "<td style=\"text-align: right; padding-left: 10px\">";
    echo nice_format($row_transfer_withdrawal_b["amount"], true, 0, 4);
    echo "</td>";
    echo "</tr>\n";
}
?>

</table>

<h3>Show</h3>

<form action="?c=services/transfer/withdrawal_addresses" method="post">
<table style="width: 70%">
<tr><td style="width: 50%">
<table>
<tr><td style="padding-right: 5px">Type</td><td><select name="type" onchange="submit()"><option value="">any</option><option value="intern" <?php 
if ($type == "intern") {
Beispiel #20
0
function display_my_documents($dialogBox, $style)
{
    global $curDirName;
    global $curDirPath;
    global $parentDir;
    global $langUp;
    global $langName;
    global $langSize;
    global $langDate;
    global $langAddModulesButton;
    global $fileList;
    global $themeimg;
    global $langSelection, $langDirectory, $course_code;
    $output = '';
    /*
     * DISPLAY
     */
    $dspCurDirName = htmlspecialchars($curDirName);
    // $cmdCurDirPath = rawurlencode($curDirPath);
    $cmdParentDir = rawurlencode($parentDir);
    $output .= '<form action="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '" method="POST">';
    /* --------------------------------------
       DIALOG BOX SECTION
       -------------------------------------- */
    $colspan = 5;
    if (!empty($dialogBox)) {
        $output .= disp_message_box($dialogBox, $style) . "<br />";
    }
    /* --------------------------------------
       CURRENT DIRECTORY LINE
       -------------------------------------- */
    /* CURRENT DIRECTORY */
    if ($curDirName) {
        $output .= '
        <table class="table-default">
        <tr>
          <td width="1" class="right">' . icon('fa-folder-o') . '</td>
          <td>' . $langDirectory . ': <b>' . $dspCurDirName . '</b></td>';
        /* GO TO PARENT DIRECTORY */
        if ($curDirName) {
            $linkup = "<a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&amp;openDir={$cmdParentDir}'>";
            $output .= "<td width='1'>{$linkup}<img src='{$themeimg}/folder_up.png' " . "hspace='5' alt='{$langUp}' title='langUp' /></a></td>" . "<td width='10' class='right'><small>{$linkup}{$langUp}</a></small></td>";
        }
        $output .= '</tr></table>';
    }
    $output .= '
    <div class="table-responsive">
    <table class="table-default" >';
    $output .= "\n    <tr class='list-header'>\n      <th colspan='2'><div align='left'>&nbsp;&nbsp;{$langName}</div></th>\n      <th>{$langSize}</th>\n      <th>{$langDate}</th>\n      <th>{$langSelection}</th>\n    </tr>";
    /* --------------------------------------
       DISPLAY FILE LIST
       -------------------------------------- */
    if ($fileList) {
        $iterator = 0;
        $ind = 1;
        while (list($fileKey, $fileName) = each($fileList['name'])) {
            if ($ind % 2 == 0) {
                $style = 'class="even"';
            } else {
                $style = 'class="odd"';
            }
            $dspFileName = htmlspecialchars($fileList['filename'][$fileKey]);
            $cmdFileName = str_replace("%2F", "/", rawurlencode($curDirPath . "/" . $fileName));
            if ($fileList['visible'][$fileKey] == 0) {
                continue;
                // skip the display of this file
            }
            if ($fileList['type'][$fileKey] == A_FILE) {
                $image = choose_image($fileName);
                $size = format_file_size($fileList['size'][$fileKey]);
                $date = nice_format($fileList['date'][$fileKey]);
                $file_url = file_url($fileList['path'][$fileKey], $dspFileName);
                $play_url = file_playurl($fileList['path'][$fileKey], $dspFileName);
                $urlFileName = MultimediaHelper::chooseMediaAhrefRaw($file_url, $play_url, $dspFileName, $dspFileName);
            } elseif ($fileList['type'][$fileKey] == A_DIRECTORY) {
                $image = 'fa-folder';
                $size = '&nbsp;';
                $date = '&nbsp;';
                $urlFileName = '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;openDir=' . $cmdFileName . '">' . $dspFileName . '</a>';
            }
            $output .= '
                <tr ' . $style . '>
                <td class="center" width="1">' . icon($image, '') . '</td>
                <td align="left">' . $urlFileName . '</td>
                <td width="80" class="center">' . $size . '</td>
                <td width="80" class="center">' . $date . '</td>';
            if ($fileList['type'][$fileKey] == A_FILE) {
                $iterator++;
                $output .= '
                <td width="10" class="center">
                        <input type="checkbox" name="insertDocument_' . $iterator . '" id="insertDocument_' . $iterator . '" value="' . $curDirPath . "/" . $fileName . '" />
                        <input type="hidden" name="filenameDocument_' . $iterator . '" id="filenameDocument_' . $iterator . '" value="' . $dspFileName . '" />
                </td>';
            } else {
                $output .= '<td>&nbsp;</td>';
            }
            $output .= '</tr>';
            /* COMMENTS */
            if ($fileList['comment'][$fileKey] != "") {
                $fileList['comment'][$fileKey] = htmlspecialchars($fileList['comment'][$fileKey]);
                $fileList['comment'][$fileKey] = parse_user_text($fileList['comment'][$fileKey]);
                $output .= '
                <tr class="even">
                <td>&nbsp;</td>
                <td colspan="' . $colspan . '"><span class="comment">' . $fileList['comment'][$fileKey] . '</span></td>
                </tr>';
            }
            $ind++;
        }
        // end each ($fileList)
        // form button
        $output .= '
    <tr>
      <th colspan="' . $colspan . '"><div class="pull-right">
        <input type="hidden" name="openDir" value="' . $curDirPath . '" />
        <input type="hidden" name="maxDocForm" value ="' . $iterator . '" />
        <input class="btn btn-primary" type="submit" name="submitInsertedDocument" value="' . $langAddModulesButton . '">        
      </th>
    </tr>';
    } else {
        $output .= '<tr><td colspan="4">&nbsp;</td></tr>';
    }
    $output .= '</table></div></form>';
    return $output;
}
Beispiel #21
0
             if ($firstPass == true) {
                 $checked = ' checked="checked"';
                 $makecurrent = '';
                 $firstPass = false;
             } else {
                 $checked = '';
                 if ($is_allowedToEdit || $is_allowedToCreate) {
                     $makecurrent = '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;wikiId=' . $wikiId . '&amp;title=' . rawurlencode($wiki_title) . '&amp;action=save&amp;current=yes&amp;versionId=' . $version->id . '" onClick="return confirm(\'' . $langSureToMakeWikiPageCurrent . '\');">' . $langWikiPageMakeCurrent . '</a>';
                 }
             }
             $tool_content .= '<td>' . '<input type="radio" name="old" value="' . $version->id . '"' . $checked . ' />' . "\n" . '</td>' . "\n";
             $tool_content .= '<td>' . '<input type="radio" name="new" value="' . $version->id . '"' . $checked . ' />' . "\n" . '</td>' . "\n";
             $userInfo = user_get_data($version->editor_id);
             $userStr = q($userInfo->givenname) . "&nbsp;" . q($userInfo->surname);
             $userUrl = $userStr;
             $versionUrl = '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&amp;wikiId=' . $wikiId . '&amp;title=' . rawurlencode($wiki_title) . '&amp;action=show&amp;versionId=' . $version->id . '">' . nice_format($version->mtime, TRUE) . '</a>';
             $tool_content .= '<td>' . sprintf($langWikiVersionPattern, $versionUrl, $userUrl) . '</td><td>' . $makecurrent . '</td><td colspan="3"></td>' . "\n";
             if ($version->changelog != '') {
                 $tool_content .= '<td colspan="4">(<i>' . $version->changelog . '</i>)</td>' . "\n";
             }
             $tool_content .= '</tr>' . "\n";
         }
     }
     $tool_content .= '</table>' . "\n";
     $tool_content .= '<input class="btn btn-primary" type="submit" name="action[diff]" value="' . $langWikiShowDifferences . '" /></form>';
     break;
 case 'exSearch':
     $tool_content .= '<h3>' . $langWikiSearchResults . '</h3>' . "\n";
     if (!empty($searchResult)) {
         $tool_content .= '<ul>' . "\n";
         foreach ($searchResult as $page) {
Beispiel #22
0
        $index = 0;
        foreach ($result as $row) {
            // Check if assignment contains submissions
            $num_submitted = Database::get()->querySingle("SELECT COUNT(*) AS count FROM assignment_submit WHERE assignment_id = ?d", $row->id)->count;
            $num_ungraded = Database::get()->querySingle("SELECT COUNT(*) AS count FROM assignment_submit WHERE assignment_id = ?d AND grade IS NULL", $row->id)->count;
            if (!$num_ungraded) {
                if ($num_submitted > 0) {
                    $num_ungraded = '0';
                } else {
                    $num_ungraded = '-';
                }
            }

            $tool_content .= "<tr class='".(!$row->active ? "not_visible":"")."'>";
            $deadline = (int)$row->deadline ? nice_format($row->deadline, true) : $m['no_deadline'];
            $tool_content .= "<td>
                                <a href='../work/index.php?course=$course_code&amp;id={$row->id}'>" . q($row->title) . "</a>
                                <br><small class='text-muted'>".($row->group_submissions? $m['group_work'] : $m['user_work'])."</small>
                            </td>
                            <td class='text-center'>$num_submitted</td>
                            <td class='text-center'>$num_ungraded</td>
                            <td class='text-center'>$deadline";
            if ($row->time > 0) {
                $tool_content .= " <br><span class='label label-warning'><small>$langDaysLeft" . format_time_duration($row->time) . "</small></span>";
            } else if((int)$row->deadline){
                $tool_content .= " <br><span class='label label-danger'><small>$m[expired]</small></span>";
            }
           $tool_content .= "</td>
							</tr>";
			$index++;
Beispiel #23
0
    echo "extern";
}
?>
</td></tr>
  <tr><td style="padding-right: 10px">Withdrawal address (ID)</td><td><a href="?c=services/transfer/withdrawal_address&amp;a=<?php 
echo $row_transfer_withdrawal_address_a["address"];
?>
"><?php 
echo $row_transfer_withdrawal_address_a["address"];
?>
</a> (<?php 
echo $row_transfer_withdrawal_address_a["id"];
?>
)</td></tr>
  <tr><td style="padding-right: 10px">Amount</td><td><?php 
echo nice_format($row_transfer_withdrawal_a["amount"], false, 0, 4);
?>
</td></tr>
  <tr><td style="padding-right: 10px">Txid</td><td><?php 
if ($row_transfer_withdrawal_address_a["type"] == "intern") {
    echo $row_transfer_withdrawal_a["txid"];
} else {
    echo crypte_transaction($row_transfer_withdrawal_a["txid"]);
}
?>
</td></tr>
  <tr><td style="padding-right: 10px">Date and time</td><td><?php 
echo date("d.m. H:i:s", $row_transfer_withdrawal_a["filing_time_u"] - $_SESSION["time_offset"] * 60);
?>
</td></tr>
</table>
Beispiel #24
0
    echo "<td>";
    if ($row_transfer_deposit_a["type"] == "intern") {
        echo "intern";
    }
    if ($row_transfer_deposit_a["type"] == "extern") {
        echo "extern";
    }
    echo "</td>";
    echo "<td style=\"padding-left: 10px\">";
    echo "<a href=\"?c=services/transfer/deposit_address&amp;a={$row_transfer_deposit_a['address']}\">" . substr($row_transfer_deposit_a["address"], 0, 5) . "..." . substr($row_transfer_deposit_a["address"], -3, 3) . "</a> ({$row_transfer_deposit_a['aid']})";
    echo "</td>";
    echo "<td style=\"text-align: center; padding-left: 10px\">";
    echo date("d.m. H:i:s", $row_transfer_deposit_a["filing_time_u"] - $_SESSION["time_offset"] * 60);
    echo "</td>";
    echo "<td style=\"text-align: right; padding-left: 10px\">";
    echo nice_format($row_transfer_deposit_a["amount"], true, 0, 4);
    echo "</td>";
    echo "<td style=\"padding-left: 10px\">";
    if ($row_transfer_deposit_a["type"] == "intern") {
        echo $row_transfer_deposit_a["txid"];
    } else {
        $txid = crypte_transaction($row_transfer_deposit_a["txid"]);
        echo "<span title=\"{$txid}\">" . substr($txid, 0, 10) . "..." . substr($txid, -3, 3) . "</span>";
    }
    echo "</td>";
    echo "<td style=\"padding-left: 10px\"><a href=\"?c=services/transfer/deposit&amp;id={$row_transfer_deposit_a['id']}\"><img src=\"images/transfer.jpg\" alt=\"Deposit\" title=\"Deposit\" style=\"border: 1px solid #B7B7B7; padding: 2px\" /></a></td>";
    echo "</tr>\n";
}
?>

</table>
Beispiel #25
0
</td>
  <td></td>
</tr>

<?php 
$slt_trade_a = "SELECT *, UNIX_TIMESTAMP(trade_time) AS trade_time_u FROM trade WHERE currency = '{$currency}' ORDER BY trade_time DESC LIMIT 15";
$rlt_trade_a = mysql_query($slt_trade_a);
while ($row_trade_a = mysql_fetch_assoc($rlt_trade_a)) {
    echo "<tr>\n";
    echo "  <td style=\"padding-right: 5px\">" . date("d.m. H:i:s", $row_trade_a["trade_time_u"] - $_SESSION["time_offset"] * 60) . "</td>\r";
    echo "  <td style=\"padding-right: 5px\">";
    echo $row_trade_a["type"] == "buy" ? $_LANG[$l]["e_buy"] : $_LANG[$l]["e_sell"];
    echo "</td>";
    echo "  <td style=\"padding-right: 5px; text-align: right\" onclick=\"set_field('', 2, " . nice_format($row_trade_a["price"], false, 3, 8) . ")\">" . nice_format($row_trade_a["price"], true, 3, 8) . "</td>";
    echo "  <td style=\"padding-right: 5px; text-align: right\" onclick=\"set_field('', 1, " . nice_format($row_trade_a["amount"], false, 0, 4) . ")\">" . nice_format($row_trade_a["amount"], true, 0, 4) . "</td>";
    echo "  <td style=\"padding-right: 5px; text-align: right\" onclick=\"set_field('', 3, " . nice_format($row_trade_a["amount"] * $row_trade_a["price"], false, 0, 8) . ")\">" . nice_format($row_trade_a["amount"] * $row_trade_a["price"], true, 0, 8) . "</td>";
    echo "<td>";
    if ($_SESSION["li"] == 1) {
        $slt_trade_order = "SELECT * FROM trade_order WHERE id = {$row_trade_a['buy_trade_order']}";
        $rlt_trade_order = mysql_query($slt_trade_order);
        $row_trade_order = mysql_fetch_assoc($rlt_trade_order);
        if ($row_trade_order["user"] == $_SESSION["user_id"]) {
            echo "<a href=\"?c=exchange/order&amp;t={$row_trade_order['id']}{$___l}\"><img src=\"images/trade.jpg\" alt=\"" . $_LANG[$l]["e_trade_order"] . "\" title=\"" . $_LANG[$l]["e_trade_order"] . "\" style=\"border: 1px solid #B7B7B7; padding: 2px\" /></a>";
        } else {
            $slt_trade_order = "SELECT * FROM trade_order WHERE id = {$row_trade_a['sell_trade_order']}";
            $rlt_trade_order = mysql_query($slt_trade_order);
            $row_trade_order = mysql_fetch_assoc($rlt_trade_order);
            if ($row_trade_order["user"] == $_SESSION["user_id"]) {
                echo "<a href=\"?c=exchange/order&amp;t={$row_trade_order['id']}{$___l}\"><img src=\"images/trade.jpg\" alt=\"" . $_LANG[$l]["e_trade_order"] . "\" title=\"" . $_LANG[$l]["e_trade_order"] . "\" style=\"border: 1px solid #B7B7B7; padding: 2px\" /></a>";
            }
        }
         $post_actions .= '<a href="javascript:void(0)" onclick="xmlhttpPost(\''.$urlServer.'modules/comments/comments_perso_blog.php\', \'delete\', '.$_POST['rid'].', \''.$_POST['rtype'].'\', \''.$langCommentsDelConfirm.'\', '.$comment->getId().')">';
         $post_actions .= icon('fa-times', $langDelete).'</a>';
         $post_actions .='</div>';   
         
         $response[0] = 'OK';
         $response[1] = "<div class='alert alert-success'>".$langCommentsSaveSuccess."</div>";
         $response[2] = $comment->getId();
         $response[3] = "
          <div class='row margin-bottom-thin margin-top-thin comment' id='comment-".$comment->getId()."'>
             <div class='col-xs-12'>
                 <div class='media'>
                     <a class='media-left' href='#'>
                         ". profile_image($comment->getAuthor(), IMAGESIZE_SMALL) ."
                     </a>
                     <div class='media-body bubble'>
                         <div class='label label-success media-heading'>".nice_format($comment->getTime(), true).'</div>'.
                             "<small>".$langBlogPostUser.display_user($comment->getAuthor(), false, false)."</small>".
                             $post_actions
                             ."<div class='margin-top-thin' id='comment_content-".$comment->getId()."'>". q($comment->getContent()) ."</div>
                     </div>
                 </div>
             </div>
         </div>                    
         ";
     } else {
         $response[0] = 'ERROR';
         $response[1] = "<div class='alert alert-warning'>".$langCommentsSaveFail."</div>";
     }
 } else {
     $response[0] = 'ERROR';
     $response[1] = "<div class='alert alert-warning'>".$langCommentsNewNoPerm."</div>";
Beispiel #27
0
 }
 if (!$entry['extra_path'] or common_doc_path($entry['extra_path'])) {
     // Normal or common document
     $download_url = $base_url . "download={$cmdDirName}";
 } else {
     // External document
     $download_url = $entry['extra_path'];
 }
 $tool_content .= "<tr {$style}><td class='text-center'>{$img_href}</td>\n                              <td>{$link_href} {$link_title_extra}";
 // comments
 if (!empty($entry['comment'])) {
     $tool_content .= "<br><span class='comment'>" . nl2br(htmlspecialchars($entry['comment'])) . "</span>";
 }
 $tool_content .= "</td>";
 $date = nice_format($entry['date'], true, true);
 $date_with_time = nice_format($entry['date'], true);
 if ($is_dir) {
     $tool_content .= "<td>&nbsp;</td><td class='center'>{$date}</td>";
 } else {
     if ($entry['format'] == ".meta") {
         $size = format_file_size($entry['size']);
         $tool_content .= "<td class='center'>{$size}</td><td class='center'>{$date}</td>";
     } else {
         $size = format_file_size($entry['size']);
         $tool_content .= "<td class='center'>{$size}</td><td class='center' title='{$date_with_time}'>{$date}</td>";
     }
 }
 if (!$is_in_tinymce) {
     if ($can_upload) {
         $tool_content .= "<td class='option-btn-cell'>";
         $xmlCmdDirName = $entry['format'] == ".meta" && get_file_extension($cmdDirName) == "xml" ? substr($cmdDirName, 0, -4) : $cmdDirName;
Beispiel #28
0
        } else {
            $itxid = add_transaction($_SESSION["user_id"], "out", "intern", $amountwithfee, "SLC", "withdrawal", 0);
            $tx = withdraw_slc($address, $amount, "", $itxid);
            $udt_transaction_a = "UPDATE transaction SET info_id = '{$tx['txid']}' WHERE id = '{$itxid}'";
            mysql_query($udt_transaction_a);
            echo "<small>Transaction (intern): {$tx['txid']}</small>";
        }
    } else {
        foreach ($errors as $error) {
            echo "{$error}<br />";
        }
        ?>
<br />
The Solidcoins will be transferred immediately to the specified address and removed from your balance.<br /><br />
Current balance: <?php 
        echo nice_format($balance, false, 0, 4);
        ?>
 Solidcoins<br />
<form action="?c=balance/withdraw_slc&amp;step=1" method="post">
<table>
<tr><td>Address</td><td><input name="address" size="50" value="<?php 
        echo htmlentities($_POST["address"]);
        ?>
" /></td></tr>
<tr><td>Amount</td><td><input id="amount" name="amount" value="<?php 
        echo htmlentities($_POST["amount"]);
        ?>
" /></td></tr>
<tr><td></td><td><span id="msg"></span></td></tr>
<tr><td></td><td><input type="submit" value="Withdraw" /></td></tr>
</table>
Beispiel #29
0
        echo "sell ►";
    } else {
        echo "buy ◄";
    }
    echo "</td>";
    echo "<td style=\"text-align: center; padding-left: 10px\">" . date("d.m. H:i:s", $row_trade_oder_a["filing_time_u"] - $_SESSION["time_offset"] * 60) . "</td>";
    echo "<td style=\"text-align: right; padding-left: 10px\">" . nice_format($row_trade_oder_a["price"], true, 3, 8) . "</td>";
    echo "<td style=\"text-align: right; padding-left: 10px\">";
    if ($row_trade_oder_a["currency"] == "BTC") {
        echo "Bitcoins";
    } elseif ($row_trade_oder_a["currency"] == "NMC") {
        echo "Namecoins";
    }
    echo "</td>";
    echo "<td style=\"text-align: right; padding-left: 10px\">" . nice_format($row_trade_oder_a["amount"], true, 8, 4) . "</td>";
    echo "<td style=\"padding-left: 10px\">" . nice_format($row_trade_oder_a["completed"] / $row_trade_oder_a["amount"] * 100, false, 0, 3) . "%</td>";
    echo "</tr>";
}
?>

</table>

<h3>Show</h3>

<form action="?c=exchange/orders" method="post">
<table style="width: 70%">
<tr><td style="width: 50%">
<table>
<tr><td style="padding-right: 5px">Currency</td><td><select name="currency" onchange="submit()"><option value="">any</option><option value="BTC" <?php 
if ($currency == "BTC") {
    echo "selected=\"selected\" ";
Beispiel #30
0
                                     array(
                                         'title' => $langDelete,
                                         'url' => "$_SERVER[SCRIPT_NAME]?$url_params&amp;action=delPost&amp;pId=".$post->getId(),
                                         'icon' => 'fa-times',
                                         'class' => 'delete',
                                         'confirm' => $langSureToDelBlogPost,
                                         'show' => $allow_to_edit
                                     )                                        
                                 ))."
                             </div>
                             <h3 class='panel-title'>
                                 <a href='$_SERVER[SCRIPT_NAME]?$url_params&amp;action=showPost&amp;pId=".$post->getId()."'>".q($post->getTitle())."</a>
                             </h3>                                    
                         </div>
                         <div class='panel-body'>
                             <div class='label label-success'>" . nice_format($post->getTime(), true). "</div><small>".$langBlogPostUser.display_user($post->getAuthor(), false, false)."</small><br><br>".standard_text_escape(ellipsize_html($post->getContent(), $num_chars_teaser_break, "<strong>&nbsp;...<a href='$_SERVER[SCRIPT_NAME]?$url_params&amp;action=showPost&amp;pId=".$post->getId()."'> <span class='smaller'>[$langMore]</span></a></strong>"))."
                             $comment_content
                         </div>
                         <div class='panel-footer'>
                             <div class='row'>
                                 <div class='col-sm-6'>$rating_content</div>
                                 <div class='col-sm-6 text-right'>$sharing_content</div>
                             </div>                                    
                         </div>
                      </div>";            
 }
 
 
 //display navigation links
 $tool_content .= $blog->navLinksHTML($page, $posts_per_page);