Er der nogen her der ved om der findes et program som kan lave php filer automatisk ud fra en SQL database. Er ikke så god til php og SQL. Programmet skal kunne auto lave php filer og jeg skal helst kunne definere layout.
$rows_per_page = 10; $asapPages = 1; $screen = 1; $preOrder = " ORDER BY brugttilpaahaeng.";
$thumb_prefix = ""; $thumb_suffix = "";
//below gets the ascending / descending going //below is for the first time if(!isset($HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'])) { $ASCDESC = " ASC"; $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC; } else { //below is if session is set and we have clicked on a heading if(isset($HTTP_GET_VARS['asapSB'])) { if($HTTP_GET_VARS['asapSB'] == $HTTP_SESSION_VARS['asapSB_brugttilpaahaeng_2347']) { // below is if we have clicked on the same heading if($HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] == " ASC") $ASCDESC = " DESC"; else $ASCDESC = " ASC";
$HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC; } else { // below is if we have clicked on a different heading $ASCDESC = " ASC"; $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347'] = $ASCDESC; } } else { $ASCDESC = $HTTP_SESSION_VARS['ASCDESC_brugttilpaahaeng_2347']; } }
if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'])) $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; else $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; }
// looking for variables from search form HTTP_POST_VARS ----------------------------- if (isset($HTTP_POST_VARS['field8'])) { $field8 = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['field8'] : addslashes($HTTP_POST_VARS['field8']); $post = 1; }
if ($post == 1) { $whereclause = "WHERE "; if ($field8 <> "") $whereclause = $whereclause . "brugttilpaahaeng.field8 LIKE '%" . $field8 . "%' AND "; if ( substr($whereclause,-5) == " AND ") $whereclause = substr_replace($whereclause,"",-5); // strip off ' AND' elseif ( substr($whereclause,-4) == " OR ") $whereclause = substr_replace($whereclause,"",-4); // strip off ' OR' else $whereclause = substr_replace($whereclause,"",-6); // strip off 'WHERE '
$whereclause_brugttilpaahaeng_2347 = $whereclause; // this sets unique whereclause
if (!isset($HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'])) $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause; else $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'] = $whereclause;
$fullOrderBy = " ORDER BY brugttilpaahaeng.field8";
$fullOrderBy_brugttilpaahaeng_2347 = $fullOrderBy; // this sets unique fullOrderBy
if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'])) $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; else $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; }
// looking to see if we've received some commands to orderby a certain field // if (isset($HTTP_GET_VARS['asapSB'])) { $asapSB = $HTTP_GET_VARS['asapSB']; $fullOrderBy = $preOrder . $asapSB . $ASCDESC; $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; $whereclause = $HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347']; }
// looking to see if search without search form and reusing session if set // if ($get == 0 && $post == 0) { if (!isset($HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'])) { $fullOrderBy = " ORDER BY brugttilpaahaeng.field8"; $fullOrderBy_brugttilpaahaeng_2347 = $fullOrderBy; // sets unique fullOrderBy $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; } else { if($newID == 1) { $fullOrderBy = " ORDER BY brugttilpaahaeng.field8"; $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347'] = $fullOrderBy; } else $fullOrderBy = $HTTP_SESSION_VARS['fullOrderBy_brugttilpaahaeng_2347']; }
if (!isset($HTTP_SESSION_VARS['whereclause_brugttilpaahaeng_2347'])) { $whereclause = "WHERE "; if ( substr($whereclause,-5) == " AND ") $whereclause = substr_replace($whereclause,"",-5); // strip off ' AND' elseif ( substr($whereclause,-4) == " OR ") $whereclause = substr_replace($whereclause,"",-4); // strip off ' OR' else $whereclause = substr_replace($whereclause,"",-6); // strip off 'WHERE '
// looking for request of screen number (alias Page Number) // if (!isset($HTTP_GET_VARS['screen'])) $screen = 1; else $screen = $HTTP_GET_VARS['screen'];
// loooking for screen number from delete function if (isset($HTTP_POST_VARS['screen'])) $screen = $HTTP_POST_VARS['screen'];
<SCRIPT LANGUAGE=JAVASCRIPT> <!-- Hide script form old browsers var win=null; function newWindow(url) { var winl = (screen.width-500)/2; var wint = (screen.height-500)/2; mapWindow = window.open(url, 'ASaP','left='+winl+',top='+wint+',width=500,height=500,scrollbars=yes') }
// End hiding script from old browsers --> </SCRIPT>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.