Вы находитесь на странице: 1из 44

Training Report For Summer Internship

Submitted By: Abhishek Garg 109208 ECE-3 NIT Kurukshetra


2/12/2011

Preface
Unless knowledge is applied in the field, it cannot attain perfection and maturity since theory often differs vastly from actual practice. Summer Internship which is an integral part of the course curriculum for the degree of B-Tech provides an opportunity to apply this knowledge and gives valuable exposure to engineering student in functional areas of engineering and an opportunity to hone his skills in preparation for the corporate world. This opportunity was provided to me during the break between 4th Semester and 5th Semester. I believe my efforts during the Summer Internship have borne fruit in the form of this project report. I take this opportunity to present it and sincerely hope that it will enhance the knowledge of the readers, be it researcher or student and give them a sound base to expand upon.

3 2

Acknowledgement
It is my privilege to express my gratitude to all those who have been the source of guidance, co-operation and help during my internship. I am thankful to Adception InfoTech Pvt. Ltd. for the providing me an opportunity to work with them during the summer training programme. I am thankful to Mr. Rohit Garodia, Technical Head, Adception Infotech Pvt. Ltd. for his guidance and constructive criticism which helped me greatly in the successful completion of my project.Without his guidance the internship could be so fruitful. A special word of thanks to the staff at Adception Infotech Pvt. Ltd., Mr. Ramniwas, Ms. Sadhna Tiwari and Mr. Parteek Shrivastav for their time and patience in helping me understand the basics and clearing my doubts. Their contribution is sincerely appreciated. I would also like to thank all the faculty members at NIT Kurukshetra for their constant support and encouragement. Finally I owe a deep debt of gratitude to god and my parents who are my biggest source of strength, patience and inspiration. I am indeed blessed to have their love and support.

3 2

Contents

Examining the working of Company

Understanding Unix OS Learning Java

Basic Concept of MySQl

Web Designing Using HTML CSS PHP

Using these to make:

An Application on Facebook.com

A Software for Referral System

3 2

Examining the working of Company


Founded in 2010 by IIT Delhi Graduates, MyAdCorner brings to you a unique and convenient platform for newspaper advertisement booking. Myadcorner is one stop for all your advertisement related needs. MyAdcorner is a website which showcases a comprehensive list of advertisement options and provide a simple interface to create and book advertisements. The Company is consolidating and bringing all the newspapers and offers on myadcorner.com so that you can select offers as per your need and budget. Well researched and simple interface helps you to compose your ad & publish them or just save them which can be edited and published at a later date. For classified text ads, various decoration options are available and ad preview section gives you exact feel of how your ad will look in a newspaper. A user who wants to publish his advertisement or any other information in a newspaper visits the site MYADCORNER.COM, places his order and receives a conformation slip for that. After that his information is entered in companys data server and the respective order is placed in the desired newspaper by staff members.

Vision
Advertising isn't a science. It's persuasion. And persuasion is an art. - William Bernbach MyAdCorner will soon be your one stop for all advertising needs, we will not only enhance the user experience by providing advertisement space or slot but also we will cater to the creative needs and the budget restrains by becoming a technological bridge between various organizations in the ad-world.
3 2

Understanding Unix OS
Unix operating systems are widely used in servers, workstations, and mobile devices.[2] The Unix environment and the clientserver program model were essential elements in the development of the Internet and the reshaping of computing as centered in networks rather than in individual computers. Originally, Unix was meant to be a programmer's workbench more than to be used to run application software. The system grew larger as the operating system started spreading in the academic circle, as users added their own tools to the system and shared them with colleagues. Both Unix and the C programming language were developed by AT&T and distributed to government and academic institutions, which led to both being ported to a wider variety of machine families than any other operating system. As a result, Unix became synonymous with open systems. Unix was designed to be portable, multi-tasking and multi-user in a time-sharing configuration. Unix systems are characterized by various concepts: the use of plain text for storing data; a hierarchical file system; treating devices and certain types of inter-process communication (IPC) as files; and the use of a large number of software tools, small programs that can be strung together through a command line interpreter using pipes, as opposed to using a single monolithic program that includes all of the same functionality. These concepts are collectively known as the Unix philosophy. Kernighan and Pike summarize this in The Unix Programming Environment as "the idea that the power of a system comes more from the relationships among programs than from the programs themselves." The Unix system is composed of several components that are normally packaged together. By including in addition to the kernel of an operating system the development environment, libraries, documents, and the portable, modifiable source-code for all of these components, Unix was a self-contained software system. This was one of the key reasons it emerged as an important teaching and learning tool and has had such a broad influence. The inclusion of these components did not make the system large the original V7 UNIX distribution, consisting of copies of all of the compiled binaries plus all of the source code and

3 2

documentation occupied less than 10MB, and arrived on a single 9-track magnetic tape. The printed documentation, typeset from the on-line sources, was contained in two volumes. Unix had a drastically simplified file model compared to many contemporary operating systems, treating all kinds of files as simple byte arrays. The file system hierarchy contained machine services and devices (such as printers, terminals, or disk drives), providing a uniform interface, but at the expense of occasionally requiring additional mechanisms such as ioctl and mode flags to access features of the hardware that did not fit the simple "stream of bytes" model. The Plan 9 operating system pushed this model even further and eliminated the need for additional mechanisms. Making the command interpreter an ordinary user-level program, with additional commands provided as separate programs, was another Multics innovation popularized by Unix. The Unix shell used the same language for interactive commands as for scripting (shell scripts there was no separate job control language like IBM's JCL). Since the shell and OS commands were "just another program", the user could choose (or even write) his own shell. New commands could be added without changing the shell itself. Unix's innovative command-line syntax for creating modular chains of producer-consumer processes (pipelines) made a powerful programming paradigm (co routines) widely available. Many later command-line interpreters have been inspired by the Unix shell. A fundamental simplifying assumption of Unix was its focus on ASCII text for nearly all file formats. There were no "binary" editors in the original version of Unix the entire system was configured using textual shell command scripts. The common denominator in the I/O system was the byte unlike "record-based" file systems. The focus on text for representing nearly everything made Unix pipes especially useful, and encouraged the development of simple, general tools that could be easily combined to perform more complicated ad hoc tasks. The Open Group is committed to working with the community to further the development of standards conformant systems by evolving and maintaining the Single UNIX Specification and participation in other related standards efforts. Recent examples of this are making the standard freely available on the web, permitting reuse of the standard in open source documentation projects , providing test tools ,developing the POSIX and LSB certification programs.

Topics studied related to Unix:


Linux operating system highlights Logging in and logging out Managing UNIX files and directories Sending and receiving mail Redirecting input/output Pipes and filters Background processing Basic network commands

3 2

The main aim of studying UNIX was to gather basic knowledge about UNIX systems and to be able to work properly with minimum difficulties and complexities.

Learning JAVA
Java is a programming language originally developed by James Gosling at Sun Microsystems (now part of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. The syntax of Java is largely derived from C++. Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object-oriented language. All code is written inside a class, and everything is an object, with the exception of the primitive data types (integers, floating-point numbers, Boolean values, and characters), which are not classes for performance reasons. Unlike C++, Java does not support operator overloading or multiple inheritance for classes. This simplifies the language and aids in preventing potential errors and anti-pattern design. Java uses similar commenting methods to C++. There are three different styles of comments: a single line style marked with two slashes (//), a multiple line style opened with /* and closed with */, and the Javadoc commenting style opened with /** and closed with */. The traditional Hello world program can be written in Java as: class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } } Source files must be named after the public class they contain, appending the suffix .java, for example, HelloWorldApp.java. It must first be compiled into bytecode, using a Java compiler, producing a file named HelloWorldApp.class. Only then can it be executed, or 'launched'. The Java source file may only contain one public class but can contain multiple classes with less than public access and any number of public inner classes. A class that is not declared public may be stored in any .java file. The compiler will generate a class file for each class defined in the source file. The name of the class file is the name of the class, with .class appended. For class file generation, anonymous classes are treated as if their name were the concatenation of the name of their enclosing class, a $, and an integer.
3 2

The keyword public denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy. The class hierarchy is related to the name of the directory in which the .java file is located. The keyword static in front of a method indicates a static method, which is associated only with the class and not with any specific instance of that class. Only static methods can be invoked without a reference to an object. Static methods cannot access any class members that are not also static. The method name "main" is not a keyword in the Java language. It is simply the name of the method the Java launcher calls to pass control to the program. Java classes that run in managed environments such as applets and Enterprise JavaBean do not use or need a main() method. A Java program may contain multiple classes that have main methods, which means that the VM needs to be explicitly told which class to launch from. The main method must accept an array of String objects. By convention, it is referenced as args although any other legal identifier name can be used. Since Java 5, the main method can also use variable arguments, in the form of public static void main(String... args), allowing the main method to be invoked with an arbitrary number of String arguments. The effect of this alternate declaration is semantically identical (the args parameter is still an array of String objects), but allows an alternative syntax for creating and passing the array. The Java launcher launches Java by loading a given class (specified on the command line or as an attribute in a JAR) and starting its public static void main(String[]) method. Stand-alone programs must declare this method explicitly. The String[] args parameter is an array of String objects containing any arguments passed to the class. The parameters to main are often passed by means of a command line. One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets. Standard Example: 1: class RangeClass { 2: int[] makeRange (int lower, int upper) { 3: int arr[] = new int[ (upper - lower) + 1 ]; 4: 5: for (int i = 0; i < arr.length; i++) { 6: arr[i] = lower++; 7: } 8: return arr; 9: } 10: 11: public static void main (String arg[]) { 12: int theArray[];
3 2

13: 14: 15: 16: 17: 18: 19: 20: 21:

RangeClass theRange = new RangeClass(); theArray = theRange.makeRange(1,10); System.out.print(The array: [ ); for (int i = 0; i < theArray.length; i++) { System.out.print(theArray[i] + ); } System.out.println(]); }}

Sun Microsystems has defined and supports four editions of Java targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:

Java Card for smartcards. Java Platform, Micro Edition (Java ME) targeting environments with limited resources. Java Platform, Standard Edition (Java SE) targeting workstation environments. Java Platform, Enterprise Edition (Java EE) targeting large distributed enterprise or Internet environments.

The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes and exceptions. Refer to the separate platforms for a description of the packages available. The set of APIs is controlled by Sun Microsystems in cooperation with others through the Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been a subject of controversy. Sun also provided an edition called PersonalJava that has been superseded by later, standards-based Java ME configuration-profile pairings. Major release versions of Java, along with their release dates:

JDK 1.0 (January 23, 1996) JDK 1.1 (February 19, 1997) J2SE 1.2 (December 8, 1998) J2SE 1.3 (May 8, 2000) J2SE 1.4 (February 6, 2002) J2SE 5.0 (September 30, 2004) Java SE 6 (December 11, 2006) Java SE 7 (July 28, 2011)

For my part of internship I have used the software, Eclipse to work with java. This software automatically creates java run time environment and is capable of compiling the program.
3 2

Eclipse uses plug-ins to provide all functionality within and on top of the runtime system, in contrast to some other applications, in which functionality is hard coded. The runtime system of Eclipse is based on Equinox, an implementation of the OSGi core framework specification. The Eclipse SDK includes the Eclipse Java Development Tools (JDT), offering an IDE with a built-in incremental Java compiler and a full model of the Java source files. This allows for advanced refactoring techniques and code analysis. The IDE also makes use of a workspace, in this case a set of metadata over a flat filespace allowing external file modifications as long as the corresponding workspace "resource" is refreshed afterwards.

Basic Concept of MySQl


MySQL is a relational database management system (RDBMS)[2] that runs as a server providing multi-user access to a number of databases. It is named after developer Michael Widenius' daughter, My.[3] The SQL phrase stands for Structured Query Language.[4] The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Oracle Corporation The data in MySqL is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows. Databases are useful when storing information categorically. A company may have a database with the following tables: "Employees", "Products", "Customers" and "Orders". MySQL can be built and installed manually from source code, but this can be tedious so it is more commonly installed from a binary package unless special customizations are required. On most Linux distributions the package management system can download and install MySQL with minimal effort, though further configuration is often required to adjust security and optimization settings. Though MySQL began as a low-end alternative to more powerful proprietary databases, it has gradually evolved to support higher-scale needs as well. Much of MySQL's appeal originates in its relative simplicity and ease of use, which is enabled by an ecosystem of open source tools such as phpMyAdmin. In the medium range, MySQL can be scaled by deploying it on more powerful hardware, such as a multi-processor server with gigabytes of memory. There are however limits to how far performance can scale on a single server, so on larger scales, multi-server MySQL deployments are required to provide improved performance and reliability. A typical high-end configuration can include a powerful master database which handles data write operations and is replicated to multiple slaves that handle all read operations.

Types of SQL Commands: .


Data Definition Language (DDL) Data Manipulation Language (DML)


3 2

Data Query Language (DQL) Data Control Language (DCL) Data administration commands Transactional control commands

Database Tables A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data. Below is an example of a table called "Persons":

First Name Last Name Address City Abhishek Garg NIT Kurukshetra Vaibhav Nagpal DLF Colony Rohtak Navdeep Kaushik Saket Delhi The table above contains three records (one for each person) and four columns (LastName, FirstName, Address, and City). Queries A query is a question or a request. With MySQL, we can query a database for specific information and have a recordset returned. Look at the following query: SELECT Last Name FROM Persons
3 2

The query above selects all the data in the "LastName" column from the "Persons" table, and will return a recordset like this:
LastName Garg Nagpal Kaushik

Common Queries in MySql: To login (from unix shell) use -h only if needed.

# [mysql dir]/bin/mysql -h hostname -u root -p

Create a database on the sql server.

mysql> create database [databasename];


List all databases on the sql server.

mysql> show databases;


Switch to a database.

mysql> use [db name];


To see all the tables in the db.

mysql> show tables;


To see database's field formats.

mysql> describe [table name];


To delete a db.

mysql> drop database [database name];


To delete a table.

mysql> drop table [table name];


Show all data in a table. 3 2

mysql> SELECT * FROM [table name];


Returns the columns and column information pertaining to the designated table.

mysql> show columns from [table name];


Show certain selected rows with the value "whatever". mysql> SELECT * FROM [table name] WHERE [field name] = "whatever";

Web Designing
Web design is the process of planning and creating a website. Text, images, digital media and interactive elements are used by web designers to produce the page seen on the web browser. Web designers utilize markup language, most notably HTML for structure and CSS for presentation and PHP for inducing various conditions in programming as well to add interactivity to develop pages that can be read by web browsers. Ideally, web designers should strive to write code that is valid HTML and CSS. In doing so it makes it easier to correct problems, and edit pages. HTML and CSS are the fundamental technologies for building Web pages: HTML (html and xhtml) for structure, CSS for style and layout, including Web Fonts. By separating the presentation style of documents from the content of documents, CSS simplifies Web authoring and site maintenance. For example, having a separate CSS file allows for aesthetic changes to be made to the entire site rather than to just a single page. If CSS rules are included within a single HTML page, changes would have to be made to each and every page that used the element in question. The reasoning is that HTML should only be used for raw content and CSS be used to manipulate the content for aesthetic style. I have used 3 languages for Web Designing: HTML CSS PHP

HTML
HTML is a language for describing web pages.

HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language

3 2

A markup language is a set of markup tags HTML uses markup tags to describe web pages

HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags, known as empty elements, are unpaired, for example <img>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tags, comments and other types of text-based content. HTML markup tags are usually called HTML tags

HTML tags are keywords surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag

HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML webpages. The purpose of a web browser is to read HTML documents and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page. HTML markup consists of several key components, including elements (and their attributes), character-based data types, character references and entity references. Another important component is the document type declaration, which triggers standards mode rendering. The Hello world program, a common computer program employed for comparing programming languages, scripting languages and markup languages is made of 9 lines of code, although in HTML newlines are optional:
<!DOCTYPE html> <html> <head> <title>Hello HTML</title> </head> <body> <p>Hello World!</p> </body> </html>

(The text between <html> and </html> describes the web page, and the text between <body> and </body> is the visible page content. The markup text '<title>Hello HTML</title>' defines the browser tab title.) HTML can be written and edited using many different editors like Dreamweaver and Visual Studio. I have used a plain text editor (like Notepad) to edit HTML. We believe using a plain text editor is the best way to learn HTML.
3 2

Core Attributesof HTML.


Attribute Value class id style title classname id Description Specifies a classname for an element Specifies a unique id for an element

style_definiti Specifies an inline style for an on element text Specifies extra information about an element

COMMON HTML Tags:


Tag <A> </A> <B> </B> <BODY> </BODY> Description Anchor. See introduction to HTML Content is shown as bold type

The body part of the HTML document. See introductio to HTML

<BR>

Force line break within paragraph. Note that "floating elements" such as images are separate from the paragraph. To start next line below any images etc., use <BR CLEAR="all">. The CLEAR attribute can take values "none", "right", "left", or "all" and is deprecated, but in fact still very useful. The best way to understand it is to try a few tests.

<CENTER> Content is centred on page (can include paragraphs etc). Note American </CENTER> spelling. <DIV> </DIV> A dummy element which contains block-level elements. It is used with style sheets. Used to define characteristics of font, according to attributes e.g. SIZE, COLOR, FACE. SIZE sets size, 1-7 e.g. SIZE="5". COLOR sets colour of text e.g. <FONT COLOR="#FF0000"> makes text red. FACE e.g. FACE="Times". The head part of the HTML document

<FONT> </FONT>

<HEAD>

3 2

</HEAD> <H1> </H1> ... <H6> </H6>

Headings (levels 1-6, i.e. H3 is a subheading within a H2 subheading).

<HR>

Draw horizontal line across page; used to indicate break between sections. Attributes: WIDTH, e.g. WIDTH="50%" makes line half size of page; SIZE, e.g. SIZE="3" makes line 3 pixels thick Italics. Image. Attributes: must have SRC and ALT. SRC gives source file for image, e.g. SRC="picture.jpg". ALT gives brief description e.g. ALT="Picture of UB" List item. Used within an ordered (<OL>) or unordered (<UL>) list Ordered list. Includes <LI> List Items, which will be numbered automatically Paragraph

<I> </I>

<IMG>

<LI> </LI> <OL> </OL> <P> </P> <SPAN> </SPAN> <STRONG> </STRONG > <SUB> </SUB> <SUP> </SUP> <TABLE> </TABLE>

A dummy element which contains in-line content.

Text is emphasised strongly - usually appears in bold.

Subscript

Superscript

Table.

3 2

<TD> </TD> <TH> </TH> <TITLE> </TITLE> <TR> </TR> <U> </U> <UL> </UL>

Table data cell.

Table header cell.

Title of document. This must appear in the <HEAD> part.

Table row.

Underline text. Use sparingly as it may be confused with hyperlinks Unordered List. Includes <LI> List Items, which will be displayed in a list with bullets.

CSS
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including plain XML, SVG and XUL. CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and fonts.[1] This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speechbased browser or screen reader) and on Braille-based, tactile devices. While the author of a document typically links that document to a CSS style sheet, readers can use a different style sheet, perhaps one on their own computer, to override the one the author has specified. CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable. The CSS specifications are maintained by the World Wide Web Consortium (W3C) CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.
3 2

A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a property, a colon (:), a value. If there are multiple declarations in a block, a semi-colon (;) must be inserted to separate each declaration.[2] In CSS, selectors are used to declare which of the markup elements a style applies to, a kind of match expression. Selectors may apply to all elements of a specific type, or only those elements that match a certain attribute; elements may be matched depending on how they are placed relative to each other in the markup code, or on how they are nested within the Document Object Model.

Prior to CSS, nearly all of the presentational attributes of HTML documents were contained within the HTML markup; all font colors, background styles, element alignments, borders and sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to move much of that information to a separate style sheet resulting in considerably simpler HTML markup. Headings (h1 elements), sub-headings (h2), sub-sub-headings (h3), etc., are defined structurally using HTML. In print and on the screen, choice of font, size, color and emphasis for these elements is presentational. Prior to CSS, document authors who wanted to assign such typographic characteristics to, say, all h2 headings had to use the HTML font and other presentational elements for each occurrence of that heading type. The additional presentational markup in the HTML made documents more complex, and generally more difficult to maintain. In CSS, presentation is separated from structure. In print, CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics. It can do so independently for on-screen and printed views. CSS also defines non-visual styles such as the speed and emphasis with which text is read out by aural text readers. The W3C now considers the advantages of CSS for defining all aspects of the presentation of HTML pages to be superior to other methods. It has therefore deprecated the use of all the original presentational HTML markup. CSS files are inserted into HTML documents using the following syntax: <link rel="stylesheet" href="http://example.com/css/style.css" type="text/css" /> Priority scheme for CSS sources (from highest to lowest priority):

Author styles (provided by the web page author), in the form of: o Inline styles, inside the HTML document, style information on a single element, specified using the "style" attribute o Embedded style, blocks of CSS information inside the HTML itself o External style sheets, i.e., a separate CSS file referenced from the document User style: o A local CSS file the user specifies with a browser option, which acts as an override applied to all documents User agent style

3 2

Default styles applied by the user agent, i.e., the browser's default settings for element presentation

The style sheet with the highest priority controls the content display. Declarations not set in the highest priority source are passed on by a source of lower priority such as the user agent style. This process is called cascading. The ideal way would be to give the user different options and transferring three different kinds of style sheets: one for printing, one for the presentation on the screen and one for the editor feature. One of the goals of CSS is also to allow users greater control over presentation. Someone who finds red italic headings difficult to read may apply a different style sheet. Depending on their browser and the web site, a user may choose from various style sheets provided by the designers, may remove all added style and view the site using the browser's default styling, or may override just the red italic heading style without altering other attributes. Unlike existing style languages like DSSSL and FOSI, CSS allowed a document's style to be influenced by multiple style sheets. One style sheet could inherit or "cascade" from another, permitting a mixture of stylistic preferences controlled equally by the site designer and user.

Versions:
Each level of CSS builds upon the last, typically adding new features and typically denoted as CSS1, CSS2, CSS3, and CSS4. Profiles are typically a subset of one or more levels of CSS built for a particular device or user interface. Currently there are profiles for mobile devices, printers, and television sets.

CSS1
The first CSS specification to become an official W3C Recommendation is CSS level 1, published in December 1996.[17] Among its capabilities are support for

Font properties such as typeface and emphasis Color of text, backgrounds, and other elements Text attributes such as spacing between words, letters, and lines of text Alignment of text, images, tables and other elements Margin, border, padding, and positioning for most elements Unique identification and generic classification of groups of attributes

CSS2
CSS level 2 specification was developed by the W3C and published as a Recommendation in May 1998. A superset of CSS1, CSS2 includes a number of new capabilities like absolute, relative, and fixed positioning of elements and z-index, the concept of media types, support for aural style sheets and bidirectional text, and new font properties such as shadows.

3 2

CSS 2.1
CSS level 2 revision 1, often referred to as "CSS 2.1", fixes errors in CSS2, removes poorlysupported or not fully interoperable features and adds already-implemented browser extensions to the specification. In order to comply with the W3C Process for standardizing technical specifications, CSS 2.1 went back and forth between Working Draft status and Candidate Recommendation status for many years. CSS 2.1 first became a Candidate Recommendation on February 25, 2004, but it was reverted to a Working Draft on June 13, 2005 for further review. It returned to Candidate Recommendation on 19 July 2007 and then updated twice in 2009. However, since changes and clarifications were made, it again went back to Last Call Working Draft on 7 December 2010.

CSS3
Unlike CSS2, a large single specification defining various features, CSS3 is divided into several separate documents called "modules". Each module adds new capability or extends features defined in CSS2, over preserving backward compatibility. Work on CSS level 3 started around the time of publication of the original CSS2 recommendation. The earliest CSS3 drafts were published in June 1999.

There are two ways to CSS code into your page:


1. By including link tag in the .aspx/.html page. Ideally this should be specified inside <head></head> however you can place following code at any place of the page.
<link href="/default/MyClass.css" type="text/css" rel="stylesheet" />

In this case you need to specify the css code into MyClass.css file that should be kept in your root/default folder. 2. By writing <style> tag in the .aspx/.html page. Ideally this code should also be written inside <head></head> tag, however you can write it at any place of the page.
<style type="text/css"> .myclass {/* write the code */} h1{/* write the code */} </style>

Common CSS Codes: To specify the border:


border-left:1px solid #C1DEF9; /* to specify the left side border */

3 2

border-top:1px solid #C1DEF9; /* to specify the top side border * border-bottom:2px solid #C1DEF9; /* to specify the bottom side border */ border-right:0px solid #C1DEF9; /* to specify the right side border */

Here 1px is the width of border solid is the border style and #XXXXXX is the color code, you can specify valid color name too like Red, Green, Yellow etc. To specify height and width
height:20px; /* height in pixel */ width:20px; /* width in pixel */

You can specify above attributes in either px (pixel), pt (point) or % (percentage). To specify background and foreground color
background-color:#306C8F; /* background color or color code */ color:White; /* foreground color or color code */

To specify padding
padding-left:5px; /* left side padding */ padding-top:5px; /* top side padding */ padding-left:5px; /* left side padding */

padding-right:5px; /* right side padding */ padding:5px; /* padding of all side */

You can specify above attributes in either px (pixel), pt (point) or % (percentage). To specify font specific appearance
font-family: Arial, Trebuchet MS, Tahoma, Verdana; /* specify font names separated by comma */ font-size: 10pt; /* specify font size either in pt (point) or px (pixel) */ font-style: normal; /* specify font style like italic or normal font-weight:bold; /* specify font weight like bold or bolder of specify any number */

To specify margin
margin-left:0px; /* specify left margin */

3 2

margin-top:0px; /* specify right margin */ margin-bottom:5px; /* specify bottom margin */ margin-right:10px; /* specify right margin */ margin:5px; // specify margin from all side */

You can specify above attributes in either px (pixel), pt (point) or % (percentage). To specfiy background image
background-image:url(/images/menuBack_m.gif); /* specify the path of the image */ background-repeat: repeat-x; /* To repeat this image horizontally in background */ background-repeat: repeat-y; /* To repeat this image vertically in background */

To specity alignment
text-align:center; /* align horizontally */ vertical-align:bottom; /* align vertically */

To float an element
position:absolute; /* to float an element at its position */ float: left; /* to float the element from its left */

To hide and show


display:none; /* hide the element */ display: /* show the element */

To specify for a particular element ID Lets say we want to apply a particular appearnce for a html element whose id is "div1" like this <div id="div1">My text under this div </div>. Here the name of the class will be the id of the element and will start from # (Hash).
#div{font-color:red;}

PHP
3 2

PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications. PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge.[3] There is also commercial software such as RadPHP, a rapid application development framework for the PHP language. If your server supports PHP you don't need to do anything.Just create some .php files in your web directory, and the server will parse them for you. Because it is free, most web hosts offer PHP support.However, if your server does not support PHP, you must install PHP. PHP acts primarily as a filter, taking input from a file or stream containing text and/or PHP instructions and outputting another stream of data; most commonly the output will be HTML. PHP has a native Boolean type that is similar to the native Boolean types in Java and C++. Using the Boolean type conversion rules, non-zero values are interpreted as true and zero as false, as in Perl and C++. The null data type represents a variable that has no value. The only value in the null data type is NULL.Variables of the "resource" type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension; examples include file, image, and database resources. PHP script which sends the text "Hello World" to the browser: <html> <body> <?php echo "Hello World"; ?> </body> </html> Arrays can contain elements of any type that PHP can handle, including resources, objects, and even other arrays. Order is preserved in lists of values and in hashes with both keys and values, and the two can be intermingled. PHP also supports strings, which can be used with single quotes and double quotes. The Standard PHP Library (SPL) attempts to solve standard problems and implements efficient data access interfaces and classes. PHP includes free and open source libraries with the core build. PHP is a fundamentally Internet-aware system with modules built in for accessing FTP servers, many database servers, embedded SQL libraries such as embedded PostgreSQL, MySQL and SQLite, LDAP servers, and others. Many functions familiar to C programmers such as those in the stdio family are available in the standard PHP build.[81] PHP allows developers to write extensions in C to add functionality to the PHP language. These can then be compiled into PHP or loaded dynamically at runtime. Extensions have been written to add support for the Windows API, process management on Unix-like operating systems, multi byte strings (Unicode)and several popular compression formats. Some more unusual features
3 2

include integration with Internet Relay Chat, dynamic generation of images and Adobe Flash content, and even speech synthesis. The PHP Extension Community Library (PECL) project is a repository for extensions to the PHP language.

Naming Rules for Variables


A variable name must start with a letter or an underscore "_" A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ ) A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString) String variables are used for values that contain characters. After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.

PHP language was originally implemented as an interpreter. Several compilers have been developed which decouple the PHP language from the interpreter. Advantages of compilation include better execution speed, static analysis, and improved interoperability with code written in other languages.[80] PHP compilers of note include Phalanger, which compiles PHP into CIL bytecode, and HipHop, developed at Facebook and now available as open source, which transforms the PHP Script into C++, then compiles it, reducing server load up to 50%.

Implementing The Learning


All of the above said languages and concepts were used to prepare a offline software to implement a referral system which gives referral points to the user who will make a valid refer,the points could be used to avail certain discounts and an Application on Facebook which would take certain parameters as input and will automatically give a AD format which is similar to the classifieds published in Newspapers.

Referral System using JAVA and JDBC-:


import java.io.*; import java.sql.*; public class StringReader { static String username = "myadcorner"; static String password = "gungun"; static String tablename = "CLIENTDB"; static String tablename2="REFERRALS"; static String fieldname = "CLIENTID"; static String fieldname2 ="USERNAME"; static String fieldname3="REFERS"; static String fieldname4="REFERRERID"; 3 2

static String fieldname5="TOTALPOINTS"; static String fieldname6="CONVERTED"; static String url = "jdbc:mysql://localhost:3306/" + username; static String client_name; //method to insert new client information public void insert_information() throws ClassNotFoundException,SQLException {String clientname=""; int id=0,check=1; InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(input); Class.forName("com.mysql.jdbc.Driver"); Connection con,con1,con2; Statement stmt,stmt1,stmt2; con= DriverManager.getConnection(url, username, password); con1=con; con2=con1; stmt = con.createStatement(); stmt1 = con1.createStatement(); stmt2 = con2.createStatement(); while(check!=0) {System.out.println("Enter Unique UserName"); try { clientname = reader.readLine(); } catch(Exception e){} String query="SELECT " + fieldname+ " FROM " + tablename +" WHERE "+fieldname2+" = '"+clientname+ "';"; ResultSet rs1 = stmt2.executeQuery(query); check=0; while (rs1.next()) { check= rs1.getInt(1); }} stmt.executeUpdate("INSERT INTO "+tablename+ " VALUES(null,'" +clientname+ "',0,0);"); System.out.println("Your Details:"); System.out.println("USERNAME "+clientname);

3 2

String query1="SELECT "+fieldname+" FROM "+tablename+" WHERE "+fieldname2+" = '"+clientname+"' ; "; ResultSet rs = stmt1.executeQuery(query1); System.out.println("Customer Id "); while (rs.next()) { id = rs.getInt(1); } System.out.print(id); con.close(); con1.close(); con2.close(); stmt.close(); stmt1.close(); stmt2.close(); }//method to insert email id in referral table public void insertreferrls(String a,int cid) throws ClassNotFoundException,SQLException { Class.forName("com.mysql.jdbc.Driver"); Connection con; Statement stmt; con= DriverManager.getConnection(url, username, password); stmt = con.createStatement(); stmt.executeUpdate("INSERT INTO "+tablename2+ " VALUES("+cid+",'"+a+"',0);"); con.close(); stmt.close(); } //method to check if the referrer info is true or not public int checkreferral(int a,String b) throws IOException,ClassNotFoundException,SQLException { String query="SELECT " + fieldname3+ " FROM " + tablename2 +" WHERE "+fieldname4+" = "+a+ ";"; String query1="SELECT " + fieldname6+ " FROM " + tablename2 +" WHERE "+fieldname3+" = '"+b+ "';"; int ab=0,status=0; String c=b,abc=""; Class.forName("com.mysql.jdbc.Driver"); Connection con,con1; Statement stmt,stmt1; 3 2

con= DriverManager.getConnection(url, username, password); con1=con; stmt = con.createStatement(); stmt1 = con1.createStatement(); ResultSet rs = stmt.executeQuery(query); ResultSet rs1 = stmt1.executeQuery(query1); while (rs1.next()) { status = rs1.getInt(1); while (rs.next()) { abc=rs.getString(1);} if { if(abc.equals(c)) { System.out.println("REFERRAL FOUND"); System.out.println("1 Refer Point is added to Cutomer id="+a); ab= 1; } else { ab= 0;} } else {System.out.println(" You Have Already Submitted a referrer id");} con.close(); con1.close(); stmt.close(); stmt1.close(); return ab; } //method to add points to refferral points public void addpoints(int a,int b) throws IOException,ClassNotFoundException,SQLException { Class.forName("com.mysql.jdbc.Driver"); System.out.println("Sorry No Such Customer found "); (status==0) }

3 2

Connection con= DriverManager.getConnection(url, username, password); Connection con1=con; Connection con2=con; Statement stmt,stmt1,stmt2; stmt= con.createStatement(); stmt1 = con1.createStatement(); stmt2 = con2.createStatement(); if (b==1) { stmt.executeUpdate(" UPDATE "+tablename+" set "+fieldname3+" = "+fieldname3+" + 1 "+" WHERE "+fieldname+" = "+a+";"); stmt1.executeUpdate(" UPDATE "+tablename+" set "+fieldname5+" = "+fieldname5+" + 100 "+" WHERE "+fieldname+" = "+a+";"); stmt2.executeUpdate(" UPDATE "+tablename2+" set "+fieldname6+" = 1 "+" WHERE "+fieldname4+" = "+a+";"); } else {} con.close(); con1.close(); stmt.close(); stmt1.close(); stmt2.close(); } public static void main (String[] args) throws IOException,ClassNotFoundException,SQLException { StringReader s=new StringReader(); String string = "",email="",choice="",test="yes"; InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(input); // read in user input System.out.println("Want to Sign in?(yes/no)"); try { choice = reader.readLine(); 3 2

} catch(Exception e){} if(choice.equals(test)) {s.insert_information(); System.out.println(" "); System.out.println("Were you Referred By someone?(yes/no)"); try { choice = reader.readLine(); } catch(Exception e){} if(choice.equals(test)) { System.out.println("Enter the customer id of your referrer"); String stringint1 = reader.readLine(); int value1 = Integer.parseInt(stringint1); System.out.println("Enter Yor Email ID"); try { email = reader.readLine(); } catch(Exception e){} int chckref=s.checkreferral(value1,email); s.addpoints(value1,chckref); } else {}} else {} System.out.println("Do you want to refer someone(yes/no)"); try { choice = reader.readLine(); } catch(Exception e){} if(choice.equals(test)) { System.out.println("Enter your id"); String stringint = reader.readLine(); int value = Integer.parseInt(stringint); System.out.println("Enter the Email Id to be referred");

3 2

try { string = reader.readLine(); } catch(Exception e){} System.out.println("You typed: " + string); System.out.println("Sending Email to "+ string+"..... "); //after this the email are sent to the given email id System.out.println("Thanx for visiting"); s.insertreferrls(string,value); } else System.out.println("Thanx for Visiting"); } }

Application on Facebook
<?php /* $app_id = "132991903448030"; $app_secret = "07faabafa64abade4b44ce6e3f280797"; $my_url = "http://apps.facebook.com/adcomposer/"; session_start(); $code = $_REQUEST["code"]; $check=$_REQUEST["formcheck"]; if(empty($code) && ($check!=1)) { $dialog_url = "https://www.facebook.com/dialog/oauth?client_id=". $app_id . "&redirect_uri=". urlencode($my_url); echo("<script> top.location.href='" .$dialog_url. "'</script>");} if($_REQUEST['error']){ header("Location:http://www.myadcorner.com"); exit;}
3 2

$token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret=" . $app_secret . "&code=" . $code;

// request access token //use curl and not file_get_contents() $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_URL, $token_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $access_token = curl_exec($ch); curl_close($ch);

$graph_url = "https://graph.facebook.com/me?access_token=".$access_token; // request user data using the access token $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_URL, $graph_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $temp_user = curl_exec($ch); curl_close($ch); //decode the json array to get user data $user =mixed json_decode($temp_user); //store user data $u = $user->name; $e = $user->email; $fb_id = $user->id; $uname = $user->username;

3 2

*/?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Cache-Control" content="no-store,no-cache,must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="msvalidate.01" content="CCD47EAD25F90BA68903E9237931DE1C"> <meta name="y_key" content="4ba292a992aa8540"> <meta name="google-site-verification" content="gxZT9TOPOG50uvLNafXi3nUhvzwAIlvgRlJ1_iRAoX8"> <meta name="description" content="Book Newspaper Advertisement Classified, Display All Newspapers - Times of India, HT, Jagran. Book matrimonial,Recruitment,Property ads - MyAdcorner.com"> <title>AD Composer</title> <link href="images/style_search.css" rel="stylesheet" type="text/css" media="all"> </head> <body> <div id="header"> <div class="header_field"><img src="images/logo.gif" alt="Book Newspaper Advertisement Online - MyAdCorner" border="0"/> <img src="images/phone.gif" border="0" alt="Myadcorner contact - +918860547210" style="float:right;" /> </div> </div> <!--#header--> <div id="navigation"> </div><!--#navigation--> <script type="text/javascript" src="https://www.google.com/jsapi? key=ABQIAAAAcYSQsz7cjeCjWgZxX3uahQaBG_rsaotee9vZO1XxwnEWe6anhQVAVXdMdRRJuVSGkUgUYBwGYhatQ"> </script> <script type="text/javascript"> // Load the Google Transliterate API google.load("elements", "1", { packages: "transliteration" });

3 2

function onLoad() { var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: [google.elements.transliteration.LanguageCode.HINDI], shortcutKey: 'ctrl+g', transliterationEnabled: true }; // Create an instance on TransliterationControl with the required var control = new google.elements.transliteration.TransliterationControl(options); var ids = [ "transl1" ]; control.makeTransliteratable(ids); google.setOnLoadCallback(onLoad); </script> <script src="images/ga.js" async="" type="text/javascript"></script><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-18133582-1']); _gaq.push(['_setDomainName', '.myadcorner.com']); _gaq.push(['_trackPageview']); function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.googleanalytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function submitform() {document.myform.submit(); } function submitSearchformFromImg(adCat) { var form = document.myform; form.Advertisement.value = adCat; form.submit();} }

3 2

function submitform1() {document.myform1.submit();} </script> <div style="width:730px; margin:auto;"> <span style="line-height:40px;font-family:Arial, Helvetica, sans-serif; font-size:22px; color:#ab2e18;"><strong>Ad-Composer Tool</strong> - Compose your newspaper advertisements </span> <div style="float:left;width:480px;"> <form name="myform" method="get"> <b>Select Category</b> <select name="Advertisement" id="category" style="width:200px;font-size:14px;" onchange="javascript:submitform();"> <option value="default">select your ad category</option> <option value="Recruitement" <?php if ($_GET['Advertisement']==="Recruitement") {print("selected='selected'");}?>>Recruitment</option> <option value="Matrimony" <?php if ($_GET['Advertisement']==="Matrimony") {print("selected='selected'");}?>>Matrimony</option> <option value="Property" <?php if ($_GET['Advertisement']==="Property") {print("selected='selected'");}?>> Property</option> <option value="Lost&found" <?php if ($_GET['Advertisement']==="Lost&found") {print("selected='selected'");}?>>Lost and Found</option> <option value="Namechange"<?php if ($_GET['Advertisement']==="Namechange") {print("selected='selected'");}?>>Name Change</option> <option value="Vehicles" <?php if ($_GET['Advertisement']==="Vehicles") {print("selected='selected'");}?>>Vehicles</option> </select>

3 2

<input type="hidden" name="formcheck" value="1"> <input type="hidden" name="category" value="recruitement"> </form> </div> <!--For Share on Facebook--> <div style="float:left;"> <form name ="myform1" method="post" > <input type="hidden" name="share" value="yes" > <img onclick="javascript:submitform1();" src="images/share_us.gif" alt="Submit this form" name="sub_but" style="cursor:pointer;" border="0"/> <input type="hidden" name="formcheck" value="1"> </form> </div><?php if($_POST["share"]=="yes") { /*$json_temp = array( 'name'=> "John", 'link' =>"http://apps.facebook.com/myadcorner"); $json= json_encode($json_temp);*/ $message = "Nice tool to compose newspaper ad!"; $link="http://www.myadcorner.com"; $feed_url = "http://www.facebook.com/dialog/feed?app_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&message=" . $message."&link=" . $my_url."&picture=http://www.myadcorner.com/images/search_page/logo_tagline.gif"; if (empty($_REQUEST["post_id"])) { echo("<script> top.location.href='" . $feed_url . "'</script>"); } else { echo ("Feed Post Id: " . $_REQUEST["post_id"]); }}?> <div style="clear:both;"></div> <table width="730px" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#ffb572" style="padding:2px;margin: 5px 0 0px 0px;"> <?php $choice=$_GET['Advertisement']; if (($choice==null)||($choice==="default"))

3 2

{ ?> <br/><br/><br/><div> <img src="images/matrimony.jpg" border="0" onclick="javascript:submitSearchformFromImg('Matrimony');" style="cursor:pointer"/> <img src="images/property.jpg" border="0" onclick="javascript:submitSearchformFromImg('Property');" style="cursor:pointer"/> <img src="images/recruitment.jpg" border="0" onclick="javascript:submitSearchformFromImg('Recruitement');" style="cursor:pointer"/> </div> <br/><br/> <div> <img src="images/name_change.jpg" border="0" onclick="javascript:submitSearchformFromImg('Namechange');" style="cursor:pointer"/> <img src="images/lost_found.jpg" border="0" onclick="javascript:submitSearchformFromImg('Lost&found');" style="cursor:pointer"/> </div> <?php } else if ($choice==="Recruitement") {?> <form name="myform2" method="post"> <tr> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; font-weight:bold;" colspan="4">Profile Info</td> </tr> <tr> <td><strong>Profile</strong><br/> <input type="text" name="jobprofile" value="<? php if($_POST['jobprofile']!=null) print $_POST['jobprofile']; else if($_POST['jobprofile']!=="") {print "S/w Engg";} ?>" autofocus="autofocus" size="13"/></td> <td><strong>Qualification</strong> <br/><input type="text" name="qualification" value="<?php if($_POST['qualification']!=null) print $_POST['qualification']; else if($_POST['qualification']!==""){print "B.E.";}
3 2

?>" size="12"/></td> <td><strong>Exp. Required</strong> <br/> <input type="text" name="experience" value="<?php if($_POST['experience']!=null) print $_POST['experience']; else if($_POST['experience']!==""){print "1-3 Yrs";} ?>" size="14"/></td> <td><strong>Salary</strong> <br/> <input type="text" name="salary" value="<?php if($_POST['salary']!=null) print $_POST['salary']; else if($_POST['salary']!==""){print "20-25K";} ?>" size="15"/></td> </tr> <tr> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; fontweight:bold;" colspan="4">Contact Info</td> </tr> <tr> <td><strong>Email</strong> <br/> <input name="email" value="<?php if($_POST['email']!=null) print $_POST['email']; else if($_POST['email']!==""){print "hr@myadcorner.com";} ?>" size="13"/></td> <td><strong>Phone</strong> <br/> <input type="text" name="phno" value="<?php if($_POST['phno']!=null) print $_POST['phno']; else if($_POST['phno']!==""){print "08860547210";} ?>" size="12"/> </td> <td><strong>Company</strong> <br/> <input type="text" name="cname" value="<? php if($_POST['cname']!=null) print $_POST['cname']; else if($_POST['cname']!==""){print "Myadcorner";} ?>" size="14"/> </td>

3 2

<td><strong>Address</strong> <br/> <input type="text" name="address" value="<?php if($_POST['address']!=null) print $_POST['address']; else if($_POST['address']!==""){print "Sector-3,Noida";} ?>" size="15"/></td> </tr> <tr> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; font-weight:bold;">Additional Info</td> </tr> <tr> <td><strong>Incentive</strong> <br/> <input type="text" name="incentive" value="<? php if($_POST['incentive']!=null) print $_POST['incentive']; else if($_POST['incentive']!==""){print "Cab";} ?>" size="13" /></td> <td><strong>No of vacancy</strong> <br/> <input type="text" name="vacancy" value="<?php if($_POST['vacancy']!=null) print $_POST['vacancy']; else if($_POST['vacancy']!==""){print "2";} ?>" size="5"/> </td> <input type="hidden" name="formcheck" value="1"> <input type="hidden" name="category" value="recruitement"> <td colspan="2"><a href="javascript:document.myform2.submit()"><img src="images/compose.jpg " border="0" /></a></td> </tr> </form> </table> <?php $jbpro=$_POST['jobprofile']; $qual=$_POST['qualification']; $xp=$_POST['experience']; $sal=$_POST['salary']; $inc=$_POST['incentive'];
3 2

$add=$_POST['address']; $phno=$_POST['phno']; $email=$_POST['email']; $cname=$_POST['cname']; $vacancy=$_POST['vacancy']?> <table width="730" border="0" cellspacing="0" cellpadding="0" bgcolor="#e5e5e5" style="padding:5px;"> <tr> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; fontweight:bold;">Sample Ad 1</td> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; fontweight:bold;">Sample Ad 2</td> <td style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#c84f0a; fontweight:bold;">Sample Ad 3</td> </tr> <tr> <td><textarea cols="25" rows="6"><?php if(($jbpro==null)&&($qual==null)&&($add==null)&&($xp==null)&&($sal==null)&&($i nc==null)&&($phno==null)) print "Myadcorner Req S/w Engg(2),B.E.,exp 1-3 Yrs,20-25k with Cab,em:hr@myadcorner.com,Sector-3,Noida #08860547210"; else{ if(($cname==null)||($cname=="")){} else {print($cname." ");} print("Req "); if(($jbpro==null)||($jbpro=="")){print " xxxx ";} else {if(($vacancy==null)||($vacancy=="one")||($vacancy=="1")||($vacancy=="0")) {print($jbpro);} else {print($jbpro."(".$vacancy.")");} } if(($qual==null)||($qual=="")){} else {print(",".$qual);} if($xp!=null){ print(",exp ".$xp);} if(($sal==null)||($sal=="")){} else{if(($inc==null)||($inc=="")){

3 2

print(",".$sal); } else{print(",".$sal." with ".$inc); }} if(($email==null)||($email=="")){} else {print(",em:".$email);} if(($add==null)||($add=="")){} else {print(",".$add);} if(($phno!=null)||($phno!="")) {print(" #".$phno); }} ?> </textarea></td> <td><textarea cols="25" rows="6"><?php if(($jbpro==null)&&($qual==null)&&($add==null)&&($xp==null)&&($sal==null)&&($i nc==null)&&($phno==null)) print "Req S/w Engg(2) for Myadcorner,B.E.,exp 1-3 Yrs 20-25k with Cab, em:support@myadcorner.com,Sector-3,Noida #08860547210"; else{ if(($jbpro==null)||($jbpro=="")){print "Req xxxx";} else {if(($vacancy==null)||($vacancy=="one")||($vacancy=="1")||($vacancy=="0")) {print("Req ".$jbpro);} else {print("Req ".$jbpro."(".$vacancy.")");}} if(($cname==null)||($cname=="")){} else {print(" for ".$cname);} if(($qual==null)||($qual=="")){} else {print(",".$qual);} if(($xp==null)||($xp=="")) {} else { print(",exp ".$xp);} if(($sal==null)||($sal=="")) {} else {if(($inc==null)||($inc=="")){print(",Sal: ".$sal);}

3 2

else{print(" ".$sal." with ".$inc);}} if(($email==null)||($email=="")){} else {print(",em:".$email);} if(($add==null)||($add=="")){} else {print(",".$add);} if($phno==null){} else{print(" #".$phno); }}?> </textarea></td> <td><textarea cols="25" rows="6"><?php if(($jbpro==null)&&($qual==null)&&($add==null)&&($xp==null)&&($sal==null)&&($i nc==null)&&($phno==null)) {print "S/w Engg.(2),B.E. min exp. 1-3 Yrs 20-25K with Cab,em: hr@myadcorner.com for Myadcorner,Sector-3,Noida #08860547210"; }else{ if(($jbpro==null)||($jbpro=="")){print "xxxx";} else {if(($vacancy==null)||($vacancy=="one")||($vacancy=="1")||($vacancy=="0")) {print($jbpro);} else {print($jbpro."(".$vacancy.")");} } if(($qual==null)||($qual=="")){} else {print(",".$qual);} if($xp==null) {} else { print(" min exp-".$xp);} if(($sal==null)||(sal=="")) {} else {if(($inc==null)||($inc=="")){print(" ".$sal);} else{print(" ".$sal." with ".$inc);}} if(($email==null)||($email=="")){} else {print(",e-".$email);} if(($cname==null)||($cname=="")){}

3 2

else {print(" for ".$cname);} if(($add==null)||($add=="")){} else {print(",".$add);} if($phno==null){} else{print(" #".$phno); }} ?> </textarea></td> </tr> </table> <?php } else {print "Coming Soon<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />";} ?> </div> <div id="bottom"> <table border="0" cellpadding="2" cellspacing="2" width="730" style="font-size:10px"> <tbody> <tr> <td valign="top" colspan="2"> <a href="http://www.myadcorner.com/" target="_blank">Book Newspaper ad now</a> | <a href="http://www.myadcorner.com/" target="_blank">Ad Rates</a> | <a href="http://www.myadcorner.com/contact.jsp" target="_blank">Contact Us</a> | <a href="http://www.myadcorner.com/advertisement-tips/" target="_blank">Advertising Tips</a> <span class="copyright"> - powered by www.myadcorner.com</span> </td> </tr> <tr> <td colspan="2"> Times of India | Hindustan Times | The Hindu | Navbharat Times | Mumbai Mirror | Pune Mirror | Bangalore Mirror | Hindustan Hindi | Economic Times | Rajasthan Patrika | Dainik Bhaskar | The Tribune | Dainik Jagran | Amar Ujala </td>

3 2

</tr> </tbody> </table> </div> <div style="display:none;"><a class="AlexaSiteStatsWidget" href="http://www.alexa.com/data/details/main?url=http://www.myadcorner.com"><img alt="Alexa Certified Site Stats for www.myadcorner.com" src="s.gif" border="0"></a><script type="text/javascript" language="JavaScript" src="Newspaper %20Advertisement,%20Classified%20Ads%20Book%20Online%20%20MyAdcorner.com_files/a.js"></script></div> <div class="cl"></div> </body> </html>

3 2

Вам также может понравиться