|
Learning with Texts - Fork 2.8.1-fork
Learn foreign languages with texts
|
Variables | |
| $currentsort = processDBParam("sort", 'currenttagsort', '1', 1) | |
| $currentpage = processSessParam("page", "currenttagpage", '1', 1) | |
| $currentquery = processSessParam("query", "currenttagquery", '', 0) | |
| $wh_query = convert_string_to_sqlsyntax(str_replace("*", "%", $currentquery)) | |
| $message = '' | |
| if(isset( $_REQUEST[ 'markaction'])) if(isset($_REQUEST['allaction'])) elseif(isset( $_REQUEST[ 'del'])) elseif(isset($_REQUEST['op'])) if(isset( $_REQUEST[ 'new'])) elseif(isset($_REQUEST['chg'])) | else |
| $sql = 'select count(TgID) as value from ' . $tbpref . 'tags where (1=1) ' . $wh_query | |
| $recno = (int) get_first_value($sql) | |
| if($debug) | $maxperpage = (int) getSettingWithDefault('set-tags-per-page') |
| $pages = $recno == 0 ? 0 : (intval(($recno-1) / $maxperpage) + 1) | |
| if( $currentpage< 1) if($currentpage > $pages) | $limit = 'LIMIT ' . (($currentpage-1) * $maxperpage) . ',' . $maxperpage |
| $sorts = array('TgText','TgComment','TgID desc','TgID asc') | |
| $lsorts = count($sorts) | |
| if( $currentsort< 1) | if ( $currentsort > $lsorts) { |
| if($debug) | $res = do_mysqli_query($sql) |
Call: edit_tags.php?.... ... markaction=[opcode] ... do actions on marked tags ... allaction=[opcode] ... do actions on all tags ... del=[wordid] ... do delete ... op=Save ... do insert new ... op=Change ... do update ... new=1 ... display new tag screen ... chg=[wordid] ... display edit screen ... sort=[sortcode] ... sort ... page=[pageno] ... page
... query=[tagtextfilter] ... tag text filter
Manage tags
| if($recno > 0) if ( $recno==0) else |