Sunday, January 6, 2013

Home

કોઇ વેબસાઇટ પર રાઇટ ક્લિક ડિસેબલ હોય અને ટેક્સ્ટ કૉપી ન થતા હોય તો કઇ રીતે કરવા ? 
અમુક વેબસાઇટ દ્વારા કોઇ ડેટા કૉપી ન થઇ શકે તેવા ઉદેશ્યથી રાઇટ ક્લિક ડિસેબલ કરવામા આવે છે તેમજ ટેક્સ્ટ પણ સિલેક્ટ ન થઇ શકે તે પ્રકારની વ્યવસ્થા કરવામા આવે છે. મિત્રો, આ પ્રકારની વ્યવસ્થામા કઇ ખાસ હોતુ નથી, ફક્ત JavaScript નો જ ઉપયોગ કરવામા આવ્યો હોય છે. તેથી જો વેબ બ્રાઉઝરમા JavaScript ડિસેબલ કરી દેવામા આવે તો તે વેબસાઇટ પરની જે-તે સ્ક્રિપ્ટ કાર્ય કરી શકતી નથી અને યુઝરને રાઇટ ક્લિક કરવાની તેમજ ટેક્સ્ટ સિલેક્ટ કરવાની મંજુરી મળી જાય છે. 


આશા છે વિદ્યાર્થીઓને આ માહિતી ઉપયોગી થશે. 

Google Chrome:

  • વેબસાઇટ લખવાની જગ્યા પર chrome://settings/content લખી Enter કી પ્રેસ કરવી
  • ત્યારબાદ જે વિન્ડો ખુલે તેમા Do not allow any site to run JavaScript ઓપ્શન સિલેક્ટ કરવુ
  • OK ક્લિક કરી બધી વિન્ડો બંધ કરવી.
  • જે વેબસાઇટમા રાઇટ ક્લિક ડિસેબલ હોય તે વેબસાઇટ ખોલવી. જો પહેલેથી ખુલી જ હોય તો F5 કી દબાવી પેજ રીફ્રેશ કરવુ.

Mozilla Firefox:

  • મોઝીલા ફાયરફૉક્સ વેબબ્રાઉઝરના Tools મેનુમા જઇ Options મેનુમા જવુ
  • ત્યારબાદ જે વિન્ડો ખુલે તેમા Content મેનુ પસંદ કરવુ
  • જે પેઇજ ખુલે તેમા Enable JavaScript ઓપ્શન પર સિલેક્ટ થયેલ હોય તેને હટાવવુ
  • OK ક્લિક કરી બધી વિન્ડો બંધ કરવી
  • જે વેબસાઇટમા રાઇટ ક્લિક ડિસેબલ હોય તે વેબસાઇટ ખોલવી. જો પહેલેથી ખુલી જ હોય તો F5 કી દબાવી પેજ રીફ્રેશ કરવુ.

Internet Explorer:

  • Tools મેનુમા જઇ Internet Options મેનુ પસંદ કરવુ
  • ત્યારબાદ Security ટેબ પસંદ કરી Custom Level બટન પર ક્લિક કરવુ
  • ત્યા આપેલ લિસ્ટમાથી Scripting ઓપ્શન પસંદ કરી તેને Disable કરવુ
  • બ્રાઉઝર બંધ કરી ફરીથી ચાલુ કરવુ અને  જે વેબસાઇટમા રાઇટ ક્લિક ડિસેબલ હોય તે વેબસાઇટ ખોલવી.
ઉપરની વિધિ કર્યા બાદ તમે કોઇપણ વેબસાઇટ પર રાઇટ ક્લિક કરી શકશો તેમજ ટેક્સ્ટ સિલેક્ટ કરી અને કૉપી-પેસ્ટ પણ કરી શકશો. 


Shortkut Key for Computer

Getting used to using your keyboard exclusively and leaving your mouse behind will make you much more efficient at performing any task on any Windows system. I use the following keyboard shortcuts every day:

Windows key + R = Run menu

This is usually followed by:
cmd = Command Prompt
iexplore + “web address” = Internet Explorer
compmgmt.msc = Computer Management
dhcpmgmt.msc = DHCP Management
dnsmgmt.msc = DNS Management
services.msc = Services
eventvwr = Event Viewer
dsa.msc = Active Directory Users and Computers
dssite.msc = Active Directory Sites and Services
Windows key + E = Explorer

ALT + Tab = Switch between windows

ALT, Space, X = Maximize window

CTRL + Shift + Esc = Task Manager

Windows key + Break = System properties

Windows key + F = Search

Windows key + D = Hide/Display all windows

CTRL + C = copy

CTRL + X = cut

CTRL + V = paste

Also don’t forget about the “Right-click” key next to the right Windows key on your keyboard. Using the arrows and that key can get just about anything done once you’ve opened up any program.

Keyboard Shortcuts

[Alt] and [Esc] Switch between running applications

[Alt] and letter Select menu item by underlined letter

[Ctrl] and [Esc] Open Program Menu

[Ctrl] and [F4] Close active document or group windows (does not work with some applications)

[Alt] and [F4] Quit active application or close current window

[Alt] and [-] Open Control menu for active document

Ctrl] Lft., Rt. arrow Move cursor forward or back one word

Ctrl] Up, Down arrow Move cursor forward or back one paragraph

[F1] Open Help for active application

Windows+M Minimize all open windows

Shift+Windows+M Undo minimize all open windows

Windows+F1 Open Windows Help

Windows+Tab Cycle through the Taskbar buttons

Windows+Break Open the System Properties dialog box

acessability shortcuts

Right SHIFT for eight seconds…….. Switch FilterKeys on and off.

Left ALT +left SHIFT +PRINT SCREEN……. Switch High Contrast on and off.

Left ALT +left SHIFT +NUM LOCK……. Switch MouseKeys on and off.

SHIFT……. five times Switch StickyKeys on and off.

NUM LOCK…… for five seconds Switch ToggleKeys on and off.

explorer shortcuts

END……. Display the bottom of the active window.

HOME……. Display the top of the active window.

NUM LOCK+ASTERISK……. on numeric keypad (*) Display all subfolders under the selected folder.

NUM LOCK+PLUS SIGN……. on numeric keypad (+) Display the contents of the selected folder.

NUM LOCK+MINUS SIGN……. on numeric keypad (-) Collapse the selected folder.

LEFT ARROW…… Collapse current selection if it’s expanded, or select parent folder.

RIGHT ARROW……. Display current selection if it’s collapsed, or select first subfolder.

Type the following commands in your Run Box (Windows Key + R) or Start Run

devmgmt.msc = Device Manage
msinfo32 = System Information
cleanmgr = Disk Cleanup
ntbackup = Backup or Restore Wizard (Windows Backup Utility)
mmc = Microsoft Management Console
excel = Microsoft Excel (If Installed)
msaccess = Microsoft Access (If Installed)
powerpnt = Microsoft PowerPoint (If Installed)
winword = Microsoft Word (If Installed)
frontpg = Microsoft FrontPage (If Installed)
notepad = Notepad
wordpad = WordPad
calc = Calculator
msmsgs = Windows Messenger
mspaint = Microsoft Paint
wmplayer = Windows Media Player
rstrui = System Restore
netscp6 = Netscape 6.x
netscp = Netscape 7.x
netscape = Netscape 4.x
waol = America Online
control = Opens the Control Panel
control printers = Opens the Printers Dialog

internetbrowser

type in u’re adress “google”, then press [Right CTRL] and [Enter]
add www. and .com to word and go to it

For Windows XP:

Copy. CTRL+C
Cut. CTRL+X
Paste. CTRL+V
Undo. CTRL+Z
Delete. DELETE
Delete selected item permanently without placing the item in the Recycle Bin. SHIFT+DELETE
Copy selected item. CTRL while dragging an item
Create shortcut to selected item. CTRL+SHIFT while dragging an item
Rename selected item. F2
Move the insertion point to the beginning of the next word. CTRL+RIGHT ARROW
Move the insertion point to the beginning of the previous word. CTRL+LEFT ARROW
Move the insertion point to the beginning of the next paragraph. CTRL+DOWN ARROW
Move the insertion point to the beginning of the previous paragraph. CTRL+UP ARROW
Highlight a block of text. CTRL+SHIFT with any of the arrow keys
Select more than one item in a window or on the desktop, or select text within a document. SHIFT with any of the arrow keys
Select all. CTRL+A
Search for a file or folder. F3
View properties for the selected item. ALT+ENTER
Close the active item, or quit the active program. ALT+F4
Opens the shortcut menu for the active window. ALT+SPACEBAR
Close the active document in programs that allow you to have multiple documents open simultaneously. CTRL+F4
Switch between open items. ALT+TAB
Cycle through items in the order they were opened. ALT+ESC
Cycle through screen elements in a window or on the desktop. F6
Display the Address bar list in My Computer or Windows Explorer. F4
Display the shortcut menu for the selected item. SHIFT+F10
Display the System menu for the active window. ALT+SPACEBAR
Display the Start menu. CTRL+ESC
Display the corresponding menu. ALT+Underlined letter in a menu name
Carry out the corresponding command. Underlined letter in a command name on an open menu
Activate the menu bar in the active program. F10
Open the next menu to the right, or open a submenu. RIGHT ARROW
Open the next menu to the left, or close a submenu. LEFT ARROW
Refresh the active window. F5
View the folder one level up in My Computer or Windows Explorer. BACKSPACE
Cancel the current task. ESC
SHIFT when you insert a CD into the CD-ROM drive Prevent the CD from automatically playing.

Use these keyboard shortcuts for dialog boxes:

To Press
Move forward through tabs. CTRL+TAB
Move backward through tabs. CTRL+SHIFT+TAB
Move forward through options. TAB
Move backward through options. SHIFT+TAB
Carry out the corresponding command or select the corresponding option. ALT+Underlined letter
Carry out the command for the active option or button. ENTER
Select or clear the check box if the active option is a check box. SPACEBAR
Select a button if the active option is a group of option buttons. Arrow keys
Display Help. F1
Display the items in the active list. F4
Open a folder one level up if a folder is selected in the Save As or Open dialog box. BACKSPACE

If you have a Microsoft Natural Keyboard, or any other compatible keyboard that includes the Windows logo key and the Application key , you can use these keyboard shortcuts:

Display or hide the Start menu. WIN Key
Display the System Properties dialog box. WIN Key+BREAK
Show the desktop. WIN Key+D
Minimize all windows. WIN Key+M
Restores minimized windows. WIN Key+Shift+M
Open My Computer. WIN Key+E
Search for a file or folder. WIN Key+F
Search for computers. CTRL+WIN Key+F
Display Windows Help. WIN Key+F1
Lock your computer if you are connected to a network domain, or switch users if you are not connected to a network domain. WIN Key+ L
Open the Run dialog box. WIN Key+R
Open Utility Manager. WIN Key+U

accessibility keyboard shortcuts:

Switch FilterKeys on and off. Right SHIFT for eight seconds
Switch High Contrast on and off. Left ALT+left SHIFT+PRINT SCREEN
Switch MouseKeys on and off. Left ALT +left SHIFT +NUM LOCK
Switch StickyKeys on and off. SHIFT five times
Switch ToggleKeys on and off. NUM LOCK for five seconds
Open Utility Manager. WIN Key+U

shortcuts you can use with Windows Explorer:

Display the bottom of the active window. END
Display the top of the active window. HOME
Display all subfolders under the selected folder. NUM LOCK+ASTERISK on numeric keypad (*)
Display the contents of the selected folder. NUM LOCK+PLUS SIGN on numeric keypad (+)
Collapse the selected folder. NUM LOCK+MINUS SIGN on numeric keypad (-)
Collapse current selection if it’s expanded, or select parent folder. LEFT ARROW
Display current selection if it’s collapsed, or select first subfolder. RIGHT ARROW

Practical - 1


marksheet using array


#include<stdio.h>

#include<conio.h>

void main()

{

int marks[4],tot=0,per,i;

clrscr();

for(i=0;i<4;i++)

{

printf("\nEnter Marks[%d subject]:",i+1);

scanf("%d",&marks[i]);

tot=tot+marks[i];

}

per=tot/4;

if(marks[0]>=40 && marks[1]>=40 && marks[2]>=40 && marks[3] >=40)

{

if(per >= 70)

{

printf("\nDistinction");

}

else if(per >= 60)

{

printf("\nFirst Class");

}

else if(per >= 50)

{

printf("\nSecond Class");

}

else

{

printf("\nPass");

}

printf("\n-------------------\n");

for(i=0;i<4;i++)

{

printf("\n subject %d : %d",i+1,marks[i]);

}

printf("\n-------------------\n");

printf("\n total : %d",tot);

printf("\n percentage : %.2f",(float)per);

printf("\n-------------------\n");

}

else

{

gotoxy(35,12);

textcolor(RED+BLINK);

cprintf("Fail");

}

getch();

}

What is html?

what is HTML ?
HTML stands for the Hypertext Markup Language. It was defined by Tim Berners-Lee in 1990 as the method of marking up pages of information to be looked at by a browser. The Standard Generalized Markup Language (SGML) had been used widely at CERN for documentation and HTML was a cut down version of the CERN documentation language. HTML is not a static language and has gone though a number of iterations over the last 10 years: was the first real standard definition for core HTML features based upon current HTML 2.0 practice in 1994. W3C's first Recommendation for HTML and was defined in 1996.HTML 3.2 added tables, applets, text-flow around images, superscripts and subscripts, and was compatible with HTML 2.0. was first released as a W3C Recommendation on 18 December 1997. HTML 4.0 was released on 24th December 1999 and fixed a number of bugs in the HTML 4.0 and then HTML 4.01 specification is a reformulation of HTML 4 in XML and was released on 26 January 2000. 
There are certain advantages to the Web, such as multimedia, interactivity, timeliness, and a certain air of "tech awareness" that make creating HTML pages something of a necessity for businesses and a good idea for families, too. There are disadvantages as well, including the cost in time and money, the learning curve for Web design, and the constant need to update. 
HTML has been forced to evolve over the last year because of the involvement of millions of people, larger businesses, and commercial artists. Spearheaded by Netscape Navigator, a number of extensions to HTML for page-layout purposes have confused the mission of the Web. As a designer, it's up to you to decide who your audience will be and the most appropriate flavors of HTML to use in order to reach that audience. 


Advantages of HTML

Advantages and Disadvantages of the Web Most small or large businesses have a compelling reason to create a presence on the World Wide Web. It's an important new medium for communication that is relatively inexpensive to implement, it's a boon for dealing with customer service issues, and it's gaining popularity in leaps and bounds. But any good HTML designer should realize that there are also certain disadvantages to the Web. Advantages There are many good reasons to commit to creating a presence on the World Wide Web. Most of these are geared toward businesses, but you'll notice that these advantages are available to any Web site: 
Multimedia presentation-A Web site allows you to do things that are simply not possible in any other medium. With some of the visual impact of television, the informational utility of print, and the personal appeal of radio, the Web is an effective tool for taking marketing information to another level. Products can be explained and offered in depth, along with pictures, video, sound, and even animation. 
Interactivity-There are a number of different areas where the fact that your user can interactively determine what to view or hear can really make the difference for a business. Especially important is the added value the Web gives you for customer service, technical or product support, and immediate feedback. While most of any Web site is automated, it gives you an 
Opportunity to answer frequently asked questions and point customers to resources that may help them solves problems on their own. While this may seem like an advantage reserved for computer companies, consider the implications for service-oriented industries like travel, consulting, catalog sales, and business-to-business sales. 
Flexibility-If your business relies on printing or publishing as a medium, you may immediately see the advantage of the Web. Changes on the Web are relatively instantaneous, and the speed with which an update can be made is measured in minutes, not weeks. Consider the financial planner's or real estate agent's sales newsletter. Instant changes on the World Wide Web give their Net-savvy clients a time-based edge. Incorporating the Web into the services you offer a client gives you an added value in their eyes, especially in time-sensitive industries. 
Easy High-Tech-Whether you're a small or large business, it's important to keep up with technology in order to satisfy customers and be up on the "latest." Web pages are moving toward a point where they'll be expected of large businesses and not unusual from small ones. Like e-mail a couple years ago, and fax machines before that, it's become important to keep up with the Web. Fortunately, it's also rather easy to get started with HTML and quickly develop a Web site. 

The current state of HTML

With these commercial demands, however, have come different solutions. For every extension Netscape adds to HTML, there is generally (eventually) a standard agreed to by the World Wide Web Consortium (W3C) that meets the same need. Unfortunately, the implementation isn’t always the same. So, it's possible for an HTML 4.0 level standard, for instance, to provide for exactly the same layout functions as Netscape-but do it in a way that isn’t compatible with Netscape's browser. So HTML is currently in a bit of a flux. The best you can hope for is that the HTML standard is agreed upon and maintained more quickly in the future as more ideas pop up. At the same time, it's important that the standard remain well thought-out, and that it isn't allowed to become bloated and unworkable. In fact, this is probably the justification for recent changes to the standards bodies. With the W3C taking control of HTML, it suggests a shift in the ultimate power over HTML to the corporate players. From now on, you can probably assume that HTML extensions beyond what is generally considered HTML 3.0 will become standard on a case-by-case basis. Overall, this is probably a good thing, since standards can be agreed on as technology emerges-and competing browsers can all use the same methods to incorporate new technology.

prototype.js and effects.js use in html for interface


<html>

<script type="text/javascript" src="prototype.js"></script>

<script type="text/javascript" src="effects.js"></script>

<head>

<title>kaal made for you</title>

</head>

<body onLoad="javascript:new Effect.Fade('search');">

<p id="deleted-text">Here is some important text, it will be highlighted

when the page loads.</p>

<script type="text/javascript">

new Effect.Fade("deleted-text", {duration:4.0});

</script>

<form id="search" action='' method='post'>

<input type='text' size=20>

<input type='Submit' value='search' name='search'>

</form>

<BR>

<a href='#'

onClick="javascript:new Effect.Fade('search');">Hide</a>

&nbsp;|&nbsp;

<a href='#'

onClick="javascript:new Effect.Appear('search');">Search</a>

</body>

</html>

Upload images in PHP

<body>

<br>

<?php

include("../db_connection_xcart.php");

if($_POST['submit'])

{

$sql = "SELECT image_id FROM `xcart_products_images` ORDER BY `image_id` DESC";

$result = mysql_query($sql);

$num = mysql_num_rows($result);

$row = mysql_fetch_array($result);

if($num)

{

$image_id = $row['image_id'];





}

else

{

$image_id = "1_x";

}





$productid = $_POST['productid'];

$image_name = $image_id."_".$_FILES['location']['name'];

$location = "../images/T/".$image_name;

if(move_uploaded_file($_FILES['location']['tmp_name'], $location))

{



$insert = "insert into xcart_products_images values('null','".$_POST['productid']."','".$image_name."')";

mysql_query($insert);

echo "<div align='center'><font color='#00FF00'>File is successfully uploaded.</font></div>\n";





}

else

{

echo "Possible file upload attack!\n";

}

if($result = mysql_query($query_insert))

{

echo"<div align='center'><font color='#00FF00'>Added Succesfully</font></div>";

}

}

?>





<br>

<div align="center">

<table bgcolor="#FFFFFF" border="0"><form name="images" action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">

<tr>

<td height="66" colspan="2" class="sectionheading" align="center"><b>ADD Multiple images</b></td>

</tr>

<tr>



<td height="26" align="left">

<b>product id :&nbsp;</b>

<?php



$query = "SELECT productid , product FROM xcart_products";

$product= mysql_query($query);

echo "<select name='productid' >";



while ($row = mysql_fetch_array($product))

{



echo "<option value='".$row[0]."'>".$row['product']."</option>";

}

echo"</select>";

?>

</tr>

<tr>

<td height="26" align="left" colspan="2">

<b>Image Location :&nbsp;</b>

<br>

<input type="file" name="location" size="40"></td>

</tr>

<tr>

<td>&nbsp; </td>

</tr>



<td align="center"><input type="button" name="close" value="Close" onClick="javascript:void(window.close())">&nbsp;&nbsp;



<input type="submit" name="submit" value="Upload Image" />

</td>

</tr></form>

</table>

</div>

</body>

Ajax select category and subcategory list automatic


//category.php

<script language = 'javascript'>

// create ajax instance

function GetXMLHttpRequest()

{

var object = null;



if (window.XMLHttpRequest) //for mozilla,safari,opera,nets..

{

object = new XMLHttpRequest();

}

else if (window.ActiveXObject) //for IE..

{

try

{

object = new ActiveXObject("Msxml2.XMLHTTP");

}

catch(e)

{

}



if (object == null)

{

try

{

object = new ActiveXObject("Microsoft.XMLHTTP");

}

catch(e)

{

}

}

}



if (object == null)

{

alert("Your browser does not support AJAX");

}



return object;

}

var httpxx = GetXMLHttpRequest();

//Ajax for Subcategories



var url_cat = "getsubcategory.php?cid=";

// handling ajax response

function handleHttpResponse2()

{

if (httpx.readyState == 4)

{



if(httpx.status == 200)

{



document.getElementById('prepage2').style.visibility='hidden';

var results=httpx.responseText.split(",");



var oSelect1 = document.getElementById("subcategory");

oSelect1.options.length=0;



if(results[0].length==0)

{

var oOption = document.createElement("option");

oOption.value = 0;

oOption.innerHTML = "-select-";



var oSelect = document.getElementById("subcategory");

oSelect.appendChild(oOption);

}

else

{

var oOption = document.createElement("option");

oOption.value = 0;

oOption.innerHTML = "-select-";



var oSelect = document.getElementById("subcategory");

oSelect.appendChild(oOption);

for (var d=0;d < results.length ;d++)

{

var oOption = document.createElement("option");

var dd1=results[d].split("-")

oOption.value = dd1[1];

oOption.innerHTML = dd1[0];



var oSelect = document.getElementById("subcategory");

oSelect.appendChild(oOption);

}

}

}

}

}

// make ajax request

function updateCategoryState() {

var categoryValue = document.getElementById("category").value;

httpx.open("GET", url_cat + escape(categoryValue), true);

document.getElementById('prepage2').style.visibility='visible';

httpx.onreadystatechange = handleHttpResponse2;

httpx.send(null);

}

var httpx = GetXMLHttpRequest();

</script>

//category.php file where selection is made and subcategory is updated

<td width="53%">

<select id="category" name='category' onchange="updateCategoryState();" class='welcome_text'>

<option value='0' class='welcome_text'>Select Category</option>

<?php

$query1Select = "select * from tblcategories";

$query1Result = query_select($query1Select,$nRows);

while($row = mysql_fetch_object($query1Result))

{

$categoryList.="<option value='$row->id'>$row->categoryname</option>";

}

?>

</select>

</td>

<tr>

<td class="caption" align='right' class='welcome_text'>SubCategory Name&nbsp;</td>

<td width="53%">

<select id="subcategory" name='subcategory' class='welcome_text'>

<option value='0' class='welcome_text'>Select Subcategory</option>

<?php

$query1Select = "select * from tblsubcategories";

$query1Result = query_select($query1Select,$nRows);

while($row = mysql_fetch_object($query1Result))

{

$subcategoryList.="<option value='$row->subcategoryname'>$row->subcategoryname</option>";

}

?>

</select>

<span id="prepage2" align='center' class='welcome_text'>

<font color='#FF0000'>

Loading ... ...Please wait

</font>

</span>

</td>

</tr>





//get subcategory file .php

<?php

$str="select * from tblsubcategories where categoryid=$cid";

$res=query_select($str,$conn);

$str="";

while ($fobj=mysql_fetch_object($res))

{

$str.="$fobj->subcategoryname"."-"."$fobj->id".",";

}

$str2=substr($str,0,strlen($str)-1);

echo "$str2";

?>

password and email validations Java script


<script language="javascript">

function CheckSignup_new(frm)

{

if(frm.new_member_id.value.length == 0 || frm.new_member_id.value=='USER NAME')

{

alert("Please enter Username!");

frm.new_member_id.focus();

return false;

}

if(frm.password.value.length == 0 || frm.password.value=='PASSWORD')

{

alert("Please enter Password!");

frm.password.focus();

return false;

}

if(frm.repassword.value.length == 0 || frm.repassword.value=='PASSWORD')

{

alert("Please enter Confirm Password!");

frm.repassword.focus();

return false;

}





var re = /^(([^<>()[\]\\.,;:\s@\"]+
(\.[^<>()[\]\\.,;:\s@\"]+)*)|
(\".+\"))@
((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])
|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/





if (!frm.email.value.match(re))

{

alert("Please enter valid Email!");

frm.email.focus();

return false;

}



if(frm.email.value.length == 0 || frm.email.value=='EMAIL')

{

alert("Please enter your email!");

frm.email.focus();

return false;

}







if(frm.password.value !=frm.repassword.value)

{

alert("Cofirm password is wrong\n please retype?");

frm.repassword.focus();

return false;

}

return true;

}

</script>

this submit button within the form tag...

<input type="submit" name="signup" value="signup" onClick='return CheckSignup_new(this.form);'>

Read xml file using simplexml functions in PHP


first you have to create xml file

<ReportData>

<Record>

<CCode>client 2</CCode>

<DESTINATION>USA</DESTINATION>

<AIRWAYBILL>A222</AIRWAYBILL>

<AWB>AQ222</AWB>

<SUB>

<DATE>5/21/2007</DATE>

<TIME>12:24:04 PM</TIME>

</SUB>

</Record>



<Record>

<CCode>client 2</CCode>

<DESTINATION>USA</DESTINATION>

<AIRWAYBILL>A222</AIRWAYBILL>

<AWB>AQ222</AWB>

<SUB>

<DATE>5/21/2007</DATE>

<TIME>12:24:04 PM</TIME>

</SUB>

</Record>



<Record>

<CCode>client 2</CCode>

<DESTINATION>USA</DESTINATION>

<AIRWAYBILL>A222</AIRWAYBILL>

<AWB>AQ222</AWB>

<SUB>

<DATE>5/21/2007</DATE>

<TIME>12:24:04 PM</TIME>

</SUB>

</Record>

</ReportData>

now user this code for parsing read in with simplexml functions



if(!$xml=simplexml_load_file('report.xml'))

{

trigger_error('Error reading XML file',E_USER_ERROR);

echo "file loaded";

}

echo 'Displaying contents of XML file...<br />';

foreach($xml as $records){

echo '<B>CLINET CODE: </b>'.$records->CCode.'<B> DESTINATION: <b>'.$records->DESTINATION.'

<B>AIRWAY BILL: </b>'.$records->AIRWAYBILL.'<br />';

}

run it this will display result of cccode and destination and airwaybill

Read xml file using DOM in PHP


<ReportData>

<Record>

<CCode>client 2</CCode>

<DESTINATION>USA</DESTINATION>

<AIRWAYBILL>A222</AIRWAYBILL>

<AWB>AQ222</AWB>

<SUB>

<DATE>5/21/2007</DATE>

<TIME>12:24:04 PM</TIME>

</SUB>

</Record>

</ReportData>

save above as report.xml file and than

run below script its script using dom how

you can read data from an xml file



<?php

$doc = new DOMDocument();

$doc->load( 'report.xml' );



$Record = $doc->getElementsByTagName( "Record" );

foreach( $Record as $rec )

{

$ccode = $rec->getElementsByTagName( "CCode" );

$ccode= $ccode->item(0)->nodeValue;



$destination = $rec->getElementsByTagName("DESTINATION");

$destination = $destination->item(0)->nodeValue;



$airwaybill = $rec->getElementsByTagName("AIRWAYBILL");

$airwaybill = $airwaybill->item(0)->nodeValue;



$awb = $rec->getElementsByTagName("AWB");

$awb = $awb->item(0)->nodeValue;



$SUB = $rec->getElementsByTagName( "SUB" );

$SUB = $SUB->item(0)->nodeValue;





$date = $rec->getElementsByTagName( "DATE" );

$date = $date->item(0)->nodeValue;

$time = $rec->getElementsByTagName( "TIME" );

$time = $time->item(0)->nodeValue;



echo "$ccode - $destination - $airwaybill - $awb - $SUB - $date - $time <BR>";

}

?>

connect with ms-access and print the table of data in php


<?php

$db_conn = new COM("ADODB.Connection");

$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("thedata.mdb").";";

$db_conn->open($connstr);

if($db_conn)

{

echo "connected";

}

else

{

echo "not conected";

}

$rS = $db_conn->execute("SELECT * FROM main1");

$cnt=0;

echo"<table>";

while (!$rS->EOF)

{



if($cnt%2 == 0 )

{

print "<tr bgcolor='#C0C0C0'><td>".$rS->Fields(0)."</td><td>". $rS->Fields(1)."</td><td>".$rS->Fields(2)."</td><td>".$rS->Fields(3)."</td><td>".$rS->Fields(4)."</td><td> ".$rS->Fields(5)."</td><td>".$rS->Fields(6)."</td></tr>\n";

}

else

{

print "<tr><td>".$rS->Fields(0)."</td><td>". $rS->Fields(1)."</td><td>".$rS->Fields(2)."</td><td>".$rS->Fields(3)."</td><td>".$rS->Fields(4)."</td><td> ".$rS->Fields(5)."</td><td>".$rS->Fields(6)."</td></tr>\n";

}

$cnt++;

$rS->MoveNext();

}

echo"</table>";

$rS->Close();

$db_conn->Close();

?>


its eassy that you have to just change your database name for run this script

Integrate DATE AND TIME PICKER to textbox



<script language = 'javascript' src = 'datetimepicker.js'></script>

<tr>

<td width="15%">&nbsp;</td>

<Td width="20%" class="content_font">Date</td>

<td >

<input type="text" id="date" size=25 name="date" class="content_font" readonly>&nbsp;

<a href="javascript:NewCal('date','yyyymmdd',true,24)" class="content_font"><img src='../images/cal.gif' border='0'></a>



</td>

</tr>

above date and time picker script is u can download from this site

http://www.rainforestnet.com/download/mydatetimepicker/sample.zip

and intigrated as given above and look like that

NETWORK SERVICES

NETWORK SERVICES

FILE SERVICES
1. It allows network users to share files using file server for providing this kind of services.
2. File services are network applications that store retrieve and move the data with the help of network file server.
3. User can read write and manage files with in this server.
PRINT SERVICES
1. Print servers are used to provide that kind of print services
2. This service also allows multiple and simultaneous printing access facility.
3. Network software uses printing queues which has special storage area where print jobs are stored and then sent to the printer in organized manner.
1. Jobs in print queues may be forward in order to receive the print according to the priority.
2. Printer can be placed anywhere in network and nay network users can use the printer.
3. The data sent by the user is transfer to the network printer at network speed.
4. Another print service is fax service it can be used for communication purpose.
5. In this services user can fax from its own work station to any other fax machine.
6. A fax machine can also work as sharing device in computer network.
COMMUNICATION SERVICE
1. Communication server handles data flow between numbers of networks.
2. It also handles the incoming and outgoing remote user and internet traffic.
3. Windows NT domain controller works as communication server.
SECURITY SERVICE
1. Security starts with the login procedures to ensure that a user who is accessing the network is using its password so, that only authorized users can log on to the network.
1. Login restrictions can force the user to login from a specific station and during a specific time.
2. Administrative tools can be used for security service in network operating system.
DATABASE SERVICE
1. Database services are provided by the data server
2. This service can provide networking with powerful database handling capabilities.
3. Most database systems are based on client server architecture so that database application can run on separate components.
1. The client side it provides the interface and handles less intensive functions line data request.

What is Network?


What is network?



An interconnected computer systems and also peripherals and devices with the purpose of data communication and information exchange are call network.
Or 
Connecting one or more than one computer to each other in such a way that they can share their hardware and software resources called network. 
Objectives of network:-
• Using network facilities we can share hardware like cd-drive, printer and other memory devices
• Network provides security to data files.
• Faster data communication without using external memory.
Components of network:-
1. NIC [ Network Interface Card ]
• A chip based circuit board used to connect computer to network or server
• A card is activities by installing it’s driver software
• A card is connect to I/O bus in a vacant slot
• The card contains physical interface for connectivity between computer’s internal and external resources
2. HUB
• A network device where the information flow is accumulated and then distributed various groups and users.
• It can be used between users on the same to LAN and the users on different LAN also [local area network].
• It serves as the central point where cables from all nodes come together.
• HUBs are available in different shapes and size it also provides limited management facility
• Dumb Hub (passive hub):- this type of hub only use for the data communication and there is no management facility.
• Intelligent Hub (Active hub);- this type of hub used for communication and also decision making it also has management facility.

3. Bridge
• A device that supports LAN to LAN communication is bridge.
• It will remember all the network addresses on both side of LANs and regulate the flow of traffic.


4. Router
• Router interconnects two or more physical and logical network and work at network layer.
• It distinguishes data packets according to protocol like, TCP/IP, FTP, HTTP etc.
• It will remember matrices to determine the optimal path of workstation in computer network.

5. Gateway
• A shared connection between LAN and a larger system such as mainframe computer or a large packet switching network whose communication protocols are different.
• It usually is slower than bridge or a router, it is a communication of hardware or software.
• It has its own processor and memory used to perform protocol conversion.

6. SERVER
• A server is an important component of a dedicated server network.
• The server runs on network operating system and offers network services to users at their individual workstation.
• These services include file storage securing, users management, network commands and many things.
• The most common type of server is file server
• When client computer send request to server , server will give respond to that computer.

7. Workstation
• When computer connect to a network it becomes a node on the network and is called a work station or client.
• It has its own local operating system e.g. DOS, win 98, win XP.
• Its job is to execute program files retrieved from the network and the server’s job is to deliver those files to the work station.

8. Cabling system
• In network cabling system is a media used to connect server and network station together.
• In case of wireless network that uses radio or infrared technology where cables are not required.
• There is several kind of cables used in networking like twisted pair cable, coaxial cable, fiber optics cable.

Advantages of networking:-
1. File sharing
2. Resource sharing
3. Database sharing
4. Creation of workgroup using user management facility
5. Centralized management system.
6. Provide security in corporate structure.
7. Ability to use network software.
8. Ability to use e-mail.

PUBLIC TELEPHONE NETWORK


PUBLIC TELEPHONE NETWORK


PUBLIC TELEPHONE NETWORK
1. Communication must occur between distinct point but few organization can justify the cost required.
2. LAN is characterized by high bandwidth and that company controls and maintain all the connectivity of devices as well as the transmission media (wire).
3. The company could have transmission media like infrared or satellite communication to establish connectivity.
4. Another possibility is different kind of cables can be used for connectivity
5. A variety of commercial options are available that enable organization to pay per only the level of service they require.
It has two main types
.
1. PSTN [PUBLIC SWITCHED TELEPHONE NETWORK]
1. This commercial network has its own existing infra structure supplied by the Telephone Company or Cable Company.
2. The feature of PSTN is its low speed, analog nature of transmission, a restricted bandwidth and also wide spread availability.
3. It is designed for telephone network but if we want it for digital communication than modem is required.
4. When the link setup is unreliable and can terminate without warning.
5. At that time PSTN communication medium is advisable.
6. This connects are easy to get at short notice. This is widely available and covers almost every location where people live and work.
7. PSTN is mostly useful for occasional users or as a backup to the private services
8. Fax machines can also operated in this network.
2. PSDN [PUBLIC SEITCHED DIGITAL(DATA) NETWORK]
1. It covers number of technology available for public telephone network.
2. The main feature is its high level of reliable and high quality of connection.
3. They can support both low and high speed at appropriate cost.
4. It can also use to link computer and system and network of one organization to several other organizations.