//        $EFILE_ID = $_POST["EFILE_ID"];
 //    }
 if (isset($_POST["action"]) && $_POST["action"] != "") {
     $action = $_POST["action_field"];
 }
 if (isset($_POST["action_field"]) && $_POST["action_field"] != "") {
     $action_field = $_POST["action_field"];
 }
 if (isset($_POST["action_value"]) && $_POST["action_value"] != "") {
     $action_value = $_POST["action_value"];
 }
 if (isset($_POST["module"]) && $_POST["module"] != "") {
     $module = $_POST["module"];
 }
 $html = "";
 $file_views = Models_Statistic::getCommunityFileViews($module, $action_value);
 if ($file_views) {
     foreach ($file_views as $file_view) {
         $html .= "<tr>";
         $html .= "<td>" . $file_view["lastname"] . ", " . $file_view["firstname"] . "</td>";
         $html .= "<td class='centered'>" . $file_view["views"] . "</td>";
         $html .= "<td>" . date("Y-m-d H:i", $file_view["last_viewed_time"]) . "</td>";
         $html .= "</tr>";
     }
 } else {
     $html .= "<tr>";
     $html .= "<td colspan='3'>This file has not yet been viewed by users.</td>";
     $html .= "</tr>";
 }
 $record = array();
 $record["html"] = $html;
                            text-align:left;
                        }
                    </style>

                    <div id="file-views" style="display:none;">
                        <table class="table table-bordered table-striped" id="file-views-table" cellspacing="0">
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Views</th>
                                    <th>Last Viewed</th>
                                </tr>
                            </thead>
                            <tbody>
                        <?php 
                $file_views = Models_Statistic::getCommunityFileViews("community:" . $COMMUNITY_ID . ":shares", $result["csfile_id"]);
                if ($file_views) {
                    foreach ($file_views as $file_view) {
                        ?>
                                    <tr>
                                        <td><?php 
                        echo $file_view["lastname"] . ", " . $file_view["firstname"];
                        ?>
</td>
                                        <td class="centered"><?php 
                        echo $file_view["views"];
                        ?>
</td>
                                        <td><?php 
                        echo date("Y-m-d H:i", $file_view["last_viewed_time"]);
                        ?>