1. Did you ever feel like everything is against you? Fighting entire world with nothing and nobody on your side? Well, that’s the story of WhizBase.

    Continue to the story: http://www.whizbase.com/fighting_the_windmills
    0

    Add a comment

  2. You just created your client’s website, now he wants a database. What do you do?

    Well, if you are a hardcore programmer/web developer, there’s a plenty of choices. You can use ASP, PHP, ASP.NET, Ruby on Rails, Python, Perl, Java, etc. However, if you are just a humble web designer primary focused on making beautiful, eye-catching, state-of-the-art graphic layouts, and with development knowledge that's just about enough to make a decent web page that shows well on all browsers and have a good SEO, then the choice is not that big. Of course, you still can select between few options:
    Option A - Tell your client you can't do it. 
    Never, never select this option. If you have to do it, don’t do it!
    Option B - Hire a programmer/web developer to do it for you
    This appears to be a good solution, but there are few serious issues with it – you will take your client's request and pass it to the developer, then it will turn out that you did not get it right and you need to modify the request, then the developer will ask for more money because of extra work, then it goes in circle until the project is finally finished, and you have spent almost a half of project budget on outsourcing. But that's not the end – if something goes wrong – who do you think your client is going to call – your outsourcing developer? Don't think so – he will call you and he will demand immediate answers and reactions. I do not need to explain any further – you got the picture.
    Option C - Do it yourself
    Always the best solution, that allows you to control all parts of the web site you created, but you are not a developer, so how the heck I can suggest it. Well, this is how:
    A) Collect your client’s data in an Excel spreadsheet, or Access database, or simple comma-delimited text file (CSV)
    B) Add some simple, yet powerful, magic with WhizBase
    C) Upload files to the web server and your database is ready to go.

    0

    Add a comment

  3. Uploading files to your webpage

    Have you ever wanted to upload your files to your hosting, or have you ever want to make a simple images gallery and let the visitors upload their pictures.
    In this tutorial I will show you how simple is to write a script for uploading your files online with no need for complicated web scripts like ASP or PHP.

    Simple HTML uploading form

    If you want to upload images you will need a form, it is made in pure HTML, it is the page where you click on Browse and select the file you want to upload. Fortunately HTML provides us with the elements, we do not need to write scripts to list files on our computer.
    Let take a look in some important elements in this code, first the Form tag, without it our code will not work, the form tag must contain information like action (where to send the file data), method (there is two general methods : get and post, when sending files use post) and enctype (there is a lot of encoding types, multipart/form-data is used for uploading files).
    Also we need to use the input of type file, that input is the one which let us browse our computer files. Last is the submit input, it is the button which people will click to send or upload the file.
    Save this file as index.htm and put it in a folder so you do not loose it.

    The butter of the work

    Now we want to make the server-side file, it is the script which takes the file, save it on the hosting server.












    OK, do not get afraid, it is not complicated as it seems, I will explain every line before the HTML tag, make your self a coffee or a tea and sit down and read.
    I will explain first what is used as a scripting language, it is WhizBase Server Pages, WhizBase is simple but powerful scripting language, it is made for non-programmers to simplify creating database-driven websites without the need for high experience in high-level programming languages.
    Now in English, it is a scripting language for everyone, simple and easy for you to use. Let me show you how.

    The header section

    Every WBSP page have a header, it is a place where we put some information needed by the server, everything we write in this section will not appear in our page. This section contains the variables that are essential for processing WBSP file. Here you put information about the database, recordset, template, error template, log file, redirection, etc.
    In the code we have [FormFields] which is a tag giving a notice for WhizBase engine to start interpreting the main commands of the WBSP file.
    Then we have WB_AllowMultipart = T this variable controls if the current WBSP page will accept uploaded files (sent by client using multipart form). If this variable is set to TRUE WhizBase will accept and process uploaded files. This is a security measure so WBSP process the files sent to the write direction.
    Second tag is [Upload] which is giving a notice for WBSP engine to start receiving information about the uploading process. Now ask your self, do you want viruses and a porn dialer on your server, if no you need to use WB_Disallow=![jpg,gif,png,bmp], we do not want users to upload any file, we only want images, so we disallow every file which does not have one of these extensions.
    Where do you want to put your pictures, you need an upload directory, so we use WB_UploadDir=/, this variable defines the name of the directory on the server where WhizBase will save files uploaded using current WBSP file.
    Do you want to overwrite your image? WB_Overwrite=T is a variable which defines if the file with same name that already exists on the server will be overwritten by newly uploaded file. We will use T as True. If you define it as F (False) WhizBase will generate a unique file name for the new one and save it like that.
    If you do not want visitors to block your server, you need to limit their file's upload size, so you use WB_MaxFSize=102400 which is a variable which defines the maximum size (in bytes) of a single file that can be uploaded using current WBSP file. We have putted 102400 bytes.
    Finally we put to let the server know that now we are starting the body section, where we put our HTML code and what we want to show for visitors.
    As you see, we can control everything when uploading files. And that how you simply make an upload form which works without the need of PHP or ASP.

    For the sources and more information please visit: http://www.whizbase.com/uploading_files_to_your_webpage
    0

    Add a comment

  4. Make a database driven website in 3 steps

    Today every company had to have a website, it is something like having a telephone number or a company address. A lot of companies do not have yet a budget for making a website, they think it is very expensive, and they are right. If you use a web developer in Europe you will need a couple of thousands of Euros to make a simple website to present your company.
    In this article I will give a simple tutorial how to publish your database report without the need for a web-developer, something simple but yet very powerful, with your Microsoft access database.
    This method is best way for web designers, who know how to make a web page in HTML, but do not know how to connect it with the database, without using PHP or ASP.

    First step: create your report page

    To show your report online, you will need a database access file and a HTML file which will show the report or the query results.
    We will create the databse in Microsoft access, I will create a database and name it as biblio and create a table and name it Titles, we will make these fields:
    • ID as number data type which will be our primary key also.
    • Name as text data type
    • Publisher as text data type
    • PublishYear as text data type
    I will fill it with some data and save it, and we have a database file.
    If you have a design for your report you will need to slice it and make a HTML page, you can use GIMP on linux or Photoshop on windows, then use any HTML editor or text editor to make the HTML code.
    I will use a simple example using WhizBase Server Pages (WBSP) to develop this report. WBSP is a very powerful tool for publishing databases online with a very simple code, it is not like classic web programing languages.

    Create the header:

    Every WBSP page have a header, it is a place where we put some information needed by the server, everything we write in this section will not apear in our page. This section contains the variables that are essential for processing WBSP file. Here you put information about the database, recordset, template, error template, log file, redirection, etc. We will simply say for the server to connect to our access database and select a table, list for example 10 records only and make a pagiation.


    [FormFields] is the starting tag for the section, when the server sees this code it will start receiving our commands. wb_basename=biblio.mdb is our database file, I have putted our database in the same folder as my HTML file so I am calling it directly. The server will look for the file name what ever we give as a path for it after wb_basename and connect to the database file. To specify which table we will select we use wb_rcdset=Titles, as you see I will select the table Titles. We told the server which database file to connect and which table to select, now we need to tell it what to do, and in our case is query, using the command WB_Command we give it a value Q and we did it. Finally we want to limit our results, let us show 10 records by page. We can skip this line and it will list the whole table, but what if we have a table with 10 000 records or more, do you really want to show it all in one page? So we will use WB_MaxRec=10 and that is all what we need. Now give the server a simple comment like command which says to the server begin interpreting the template.

    Create the body (template):

    After creating the header setion we have to create the template, and that is very simple, it is our HTML code with simple lines of WBSP code where we want to show our data.




    In the template we want to view ten records in a table and then show the navigation bar where users can go next or previus page to see more records.
    The most important code in this template is and which represents the start and the end of the looping function, everything between these two will loop for as many times as records we want to show. If the query returned 10 records it will loop for ten times. Between these two commands we will show the records using the function $wbf[fieldname], in our case we are viewing four fields in the table and WBSP will replace every one with the field value in the table.
    Finally we have First page Last page which will generate for us the navigation links automatically, this is a very cool command, we do not need to calculate anything, it will automatically create as many pages as we need.
    We will save all this as defaut.wbsp file, where the extension wbsp will say to the server that this file have a WBSP code in it.

    Second step: Create a search form

    In the previous step we have made a report page, now we need a filtering form, for example what if we do not want to view all the records, we want to view just records for the publish year 2007.
    Create a file named as "search.htm", in this file we will not need any WBSP code, we will only make a HTML form with inputs and a submit. We only must take into account one thing, how we will name our inputs, because WBSP have its automatic mechanism for catching get and post values.




    As you can see we have used a pure HTML, but we have also used a specific naming method in the input names. WBF_ID is WBF_ + ID where WBF_ is WhizBase prefix and ID is the name of the table field. WhizBase catches all the get and post data and filters them, then takes all the post and get data with prefix WBF_ and sends them to the query.
    For example if we put a value 2000 in "Publisher Year" input, it will be a post value in the variable wbf_publisheryear, WhizBase will filter it and catch it because it has wbf_ prefix and then send it as a database query as "publisheryear = 2000".

    Third Step: Upload everything online

    Finally, we have a form file, a report file and a database. We do not need anything else. Now just upload the 3 files online in the same folder on a server which supports Whizbase or install Whizbase on your Windows server and put these files on the server and you will have a ready report and a filtering system.

    For the sources and more about this please visit: http://www.whizbase.com/make_a_database_driven_website_in_3_steps
    0

    Add a comment

  5. WhizBase: Sending an email with embedded images using WhizBa...: "WhizBase has a built-in functions for sending a rich-text (HTML) emails. In your email you can easily include an absolute URL to any image a..." This is another post of Faik
    0

    Add a comment

  6. The creator of WhizBase Faik Djikic have written a very good article today, this is a link to it:
    "It is very easy to make data collecting web application using the WhizBase. We will do it using only two WBSP files - one containing the form (form.htm) and the other that saves received data into the database (add.wbsp). read more "
    0

    Add a comment

  7. This simple code is a shopping cart ready to implement on your site. AJAX and WhizBase is combined to empower this powerful tool.


    For download please go to http://sourceforge.net/projects/shoppingcartwb/
    0

    Add a comment

  8. Well, writing a web application does not have to be complicated and definitely does not have to take months of programming. With WhizBase it takes just two steps to make your database "airborne".


    more
    0

    Add a comment

  9. This simple application will look for your site in Google's search listing for some keyword in first 10 to 1000 positions, if you are found you will be notified with the position. For more information go to www.whizbase.com

    For download please go to http://sourceforge.net/projects/googlekeywordwb/
    2

    View comments

  10. In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html

    A bar chart  is a chart with rectangular bars with lengths proportional to the values that they represent. The bars in this tutorial will be plotted horizontally. I will use WhizBase and HTML only. No need for any graphics or flash.

    Creating the library
    I will first begin with making a library of subroutines so I can call any subroutine to do me a job in any time in my code. Subroutines are something similar to custom functions in other programming languages. You can create any number of subroutines as you want, and they will not be processed until you call it in the code.

    I will create five subroutines, one will be to initialize the width, the rest are to add a column,  to calculate the percentage, to calculate the width values and to draw the graph (bar chart).

    First the initialization subroutine:


    <!--wb_beginsub_init-->
    $wbif[$wbgetv[w]>99|$wbsetv[width|$wbgetv[w]]|$wbsetv[width|100]]
    <!--WB_EndSub-->
    
    
    Before calling this subroutine I will set a variable 'w', if it is less than 99 or it is not sat I will set it to 100. Else I will take my variable value and set it in variable 'width'. This step is nessecery so we have always a default maximum width for the columns. Setting 'w' is not necessary.
    
    Line 1 and line 3 are the start and the end of the subroutine. After beginsub 'init' is the name of the subroutine. Everything in between will not be rendered until you call the subroutine. Subroutines can call also subroutines in it self.
    
    Now I will need a subroutine to add a new column. I want my graph to be dynamic so I can use it to unlimited number of comparetions. 
    
    
    
    
    <!--wb_beginsub_addColumn-->
    $WBAADD[headers|$wbgetv[hN]|F]
    $WBAADD[barVals|$wbgetv[bV]|F]
     $wbsetv[sum|$wbcalc[$wbgetv[sum] + $wbgetv[bV]]]   
     $WBAADD[colorBars|$wbgetv[cB]|F] 
    <!--WB_EndSub-->
    
    
    
    
    When adding a new column (bar) I need to specify 3 elements, the name of that bar, it's color and value. So I need to set 3 variables before calling this subroutines, 'hN' for name, 'bV' for value and 'cB' for color.
    
    In the subroutine I am adding the bar name to an array named as 'headers ', the values to an array named as 'barVals' and the color to 'colorBars' array. I also need to sum all values because I will needed it later. 
    
    In WhizBase if you set a value to undefined variable or array it will define it automatically, so you do not need to worry about memory allocations and errors for undefined variables.
    
    Every bar has a value which is a part of the sum of all values. To unify the values I need to get the percentage of these values to the total sum of all. 'calcPercents' will do the calculations I need.
    
    
    
    
    <!--wb_beginsub_calcPercents-->
    $wbsetv[numBars|$WBALEN[barVals]]
    $wbsetv[i|0]
    $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
    $WBAADD[barPerc|$wbformat$wbcalc[($wbgetv[barVals($wbgetv[i])]/$wbgetv[sum])*100]|#]|F]
    $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
    ]
    <!--WB_EndSub-->
    
    
    
    
    Now if you do not like mathematics you have a problem. I will need number of the bars to calculate all the percentages in a loop. The calculated value is added to 'barPerc' array. The formula in logic terms are:
    
    
    
    
    interger of( (Bar value devided by total) multiply with 100)
    I will not explain more how I got the percentage value it is pure mathematics.
    'calcWidthVals' subroutine is used to calculate the width of every bar in HTML so I can draw the bars.
    
    
    
    
    <!--wb_beginsub_calcWidthVals-->
    $wbsetv[numBars|$WBALEN[barVals]]
    $wbsetv[i|0]
    $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
    $WBAADD[widthVals|$wbcalc[abs(($wbgetv[barPerc($wbgetv[i])]/$wbgetv[width])*100)]|F]
    $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
    ]
    <!--WB_EndSub-->
    
    
    
    
    Again by looping through all bar percentages I will get the width by this formula:
    
    
    
    
    Absolute of((bar percentage devided by maximum width) multiply with 100)
    I am using absolute values here because in HTML I can not use negative values.
    Finally I have just one subroutine to create, it is 'drawGraph', this one will draw the bars in HTML.
    
    
    
    
    <!--wb_beginsub_drawGraph-->
     $wbsub[calcPercents]
     $wbsub[calcWidthVals]
     $wbsetv[numBars|$WBALEN[barVals]]
     <table cellpadding="0" cellspacing="0" border="0">
     $wbsetv[i|0]
     $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
      <tr>
      <td class="$wbgetv[cellClassName]">
      $wbgetv[headers($wbgetv[i])]</td>
      <td align="right" width="$wbcalc[$wbgetv[width]/2]">
      <table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]<0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0">
      <tr height="20"><td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"></td></tr>
      </table>
      </td>
      <td align="left" width="$wbcalc[$wbgetv[width]/2]">
      <table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]>0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0">
      <tr height="20"><td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"></td></tr>
      </table>
      </td>
      </tr>
      $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
     ]</table>
    <!--WB_EndSub-->
    
    
    This subroutine does most of the job for us, in it I am calling the other subroutines. The only variable I can use if I want is 'cellClassName' which will hold the cell class name for CSS. You can skip this variable, it is just for formatting.
    
    In this subroutine I am calculating the percentages by 'calcPercents', calculating bar widths by 'calcWidthVals' and counting how many bars do I have. Now I will create a table and loop the rows to create a row for every bar. 
    
    As bar graphs can have negative values I will use a two side bars view, the left ones are less than zero and the right ones are above zero. I am making a table with two cells, every cell will have an IF statement to check if the value is less than zero, this will show every row in its proper place.
    
    In this table I am coloring the cell background and manipilating the cell width to show a presentation of the bar.
    
    That will be all for the library. Just save this code as 'graph.ic'.
    
    
    
    
    #* Initialization width *#
    <!--wb_beginsub_init-->
    $wbif[$wbgetv[w]>99|$wbsetv[width|$wbgetv[w]]|$wbsetv[width|100]]
    <!--WB_EndSub-->
    
    
    #*
      This subroutine adds a new values to the graphic 
      "hN" This is the name of the column (string type) 
      "bV" This is a number that specifies the value of the bar 
      "cB" This is an string that specifies the color of the bar 
    *#
    <!--wb_beginsub_addColumn-->
     $WBAADD[headers|$wbgetv[hN]|F]
     $WBAADD[barVals|$wbgetv[bV]|F]
        $wbsetv[sum|$wbcalc[$wbgetv[sum] + $wbgetv[bV]]]   
        $WBAADD[colorBars|$wbgetv[cB]|F] 
    <!--WB_EndSub-->
    
    
    #* This subroutine calculates the percents of the total *#
    <!--wb_beginsub_calcPercents-->
     $wbsetv[numBars|$WBALEN[barVals]]
     $wbsetv[i|0]
     $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
      $WBAADD[barPerc|$wbformat[$wbcalc[($wbgetv[barVals($wbgetv[i])]/$wbgetv[sum])*100]|#]|F]
      $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
     ]
    <!--WB_EndSub-->
    
    
    #* This subroutine calculates the width values *#
    <!--wb_beginsub_calcWidthVals-->
     $wbsetv[numBars|$WBALEN[barVals]]
     $wbsetv[i|0]
     $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
      $WBAADD[widthVals|$wbcalc[abs(($wbgetv[barPerc($wbgetv[i])]/$wbgetv[width])*100)]|F]
      $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
     ]
    <!--WB_EndSub-->
    
    
    #* 
     This subroutine draws the graph 
     "cellClassName" a css class name for easier formatting
    *#
    <!--wb_beginsub_drawGraph-->
     $wbsub[calcPercents]
     $wbsub[calcWidthVals]
     $wbsetv[numBars|$WBALEN[barVals]]
     <table cellpadding="0" cellspacing="0" border="0">
     $wbsetv[i|0]
     $wbwhile[$wbgetv[i]<$wbgetv[numBars]|
      <tr>
      <td class="$wbgetv[cellClassName]">
      $wbgetv[headers($wbgetv[i])]</td>
      <td align="right" width="$wbcalc[$wbgetv[width]/2]">
      <table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]<0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0">
      <tr height="20"><td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"></td></tr>
      </table>
      </td>
      <td align="left" width="$wbcalc[$wbgetv[width]/2]">
      <table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]>0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0">
      <tr height="20"><td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"></td></tr>
      </table>
      </td>
      </tr>
      $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
     ]</table>
    <!--WB_EndSub-->
    
    
    
    
    Creating the main file
    
    I will create my main file, I am naming it as 'default.wbsp', in it I do not have a lot to do, in general these are steps I need:
    1.      Include the bar chart library 
    2.      Initialize the maximum width of a bar 
    3.      Add all the bars ( name, color, value) 
    4.      Finally draw the graph
    
    
    This is the code for all above:
    
    
    
    
    [FormFields]
    wb_command=r
    WB_showlogo=F
    <!--WB_BeginTemplate-->
    $wbrinc[graph.ic]
    $wbsetv[w|100]$wbsub[init]
    $wbsetv[hN|Column 1]$wbsetv[bV|25,2]$wbsetv[cB|#CCCCCC]$wbsub[addColumn]
    $wbsetv[hN|Column 2]$wbsetv[bV|-25,2]$wbsetv[cB|#AAAAAA]$wbsub[addColumn]
    $wbsetv[hN|Column 3]$wbsetv[bV|100,32]$wbsetv[cB|#999999]$wbsub[addColumn]
    $wbsetv[hN|Column 4]$wbsetv[bV|88,236]$wbsetv[cB|#777777]$wbsub[addColumn]
    $wbsetv[hN|Column 5]$wbsetv[bV|11,236]$wbsetv[cB|#555555]$wbsub[addColumn]
    
    <html> 
    <head> 
    <title>Test graphs</title> 
    <style> 
    <!-- 
    .cell_header { 
        font-family: "Arial Narrow"; 
        font-size: 12px; 
        font-style: normal; 
        line-height: normal; 
        font-weight: bold; 
        font-variant: normal; 
        text-transform: uppercase; 
        color: #E0E0E0; 
        text-decoration: none; 
        background-color: #4E4E4E; 
    }
    --> 
    </style> 
    </head>
    <body>$wbsetv[cellClassName|icon_links_off]$wbsub[drawGraph]</body></html>
    
    
    
    
    
    
    
    
    
    
    0

    Add a comment

Blog Archive
Subscribe
Subscribe
Popular Posts
Popular Posts
Total Pageviews
Total Pageviews
2 0 4 9 3
Support us in real world
Support us in real world
Loading