public static function searchPlaylistsForSchedule($datatables) { $fromTable = "cc_playlist AS pl LEFT JOIN cc_playlisttimes AS plt USING(id) LEFT JOIN cc_subjs AS sub ON pl.editedby = sub.id"; //$datatables["optWhere"][] = "INTERVAL '{$time_remaining}' > INTERVAL '00:00:00'"; $datatables["optWhere"][] = "plt.length > INTERVAL '00:00:00'"; return StoredFile::searchFiles($fromTable, $datatables); }
public static function getUsersDataTablesInfo($datatables_post) { $fromTable = "cc_subjs"; // get current user $username = ""; $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $username = $auth->getIdentity()->login; } $res = StoredFile::searchFiles($fromTable, $datatables_post); // mark record which is for the current user foreach ($res['aaData'] as &$record) { if ($record[1] == $username) { $record[5] = "self"; } } return $res; }