Place this code in one file modify as per your requirement and add nu soap library
i palace this file inside one folder called sopa inside root folder of joomla project and also i use model from component in this i placed my model in side com-community folder and i call one model and in this example i added multiple in put , compex type out put with array variable, and u can see out put in soap UI
require_once("nusoap/nusoap.php"); //nusopa.php download from net and include it
$ns = "http://soaptest/";
if(!defined('_JEXEC'))
define( '_JEXEC', 1 );
set_time_limit(0);
ini_set('include_path', '../');
if(!defined('JPATH_BASE'))
define('JPATH_BASE', ini_get('include_path') );
if(!defined('DS'))
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
//require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'database'.DS.'table'.DS.'table.php' );
if(!isset($mainframe))
$mainframe =& JFactory::getApplication('site');
//jimport( 'joomla.plugin.plugin' );
//jimport('joomla.filesystem.file');
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'plugin' . DS . 'helper.php');
require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
require_once("convertingArrayinput.php");
function GetEventInfo(&$EventId,&$Version) {
jimport( 'joomla.application.component.model' );
JModel::addIncludePath(JPATH_ROOT.DS.'components'.DS.'com_community'.DS.'models');
$profilemodel =& JModel::getInstance('webprofile', 'CommunityModel');
//$user =& JFactory::getUser($userid);
//$VersionReq=$user->Version;
//$role=$user->Role;
if($EventId) {
$result = array();
$teams= array();
$clubdata=$profilemodel->getEventInfo($EventId,$Version);
$teamdata=$profilemodel->getEventTeams($EventId);
//print_r($clubdata);
foreach($teamdata as $team) {
$teams[]=array('TeamId'=>$team->TeamId,'TeamName'=>$team->TeamName);
}
foreach($clubdata as $row) {
$result1= array('UserData'=>array('UserId'=>$row->UserId,'Role'=>$row->Role),
'EventData'=>array('EventDetails'=>array('EventId'=>$row->EventId,'EventName'=>$row->EventName,'EventLocation'=>$row->FacilityName,'EventLogo'=>$row->EventLogoPath,'EventDate'=>$row->Event),
'Facility'=>array('Longtitude'=>$row->FacilityLongtitude,'Latitude'=>$row->FacliltyLatitude),
'Schedule'=>$row->ScheduleLink,'Rules'=>$row->RulesLink,'WeatherLine'=>$row->WeatherLine,
'Teams'=>$teams));
}
$res = array('Response' => array('Code' => '100','Msg'=>'Successful'),
'ResponseData'=>$result1);
return $res;
} else {
$res = array('Response' => array('Code' => '-100','Msg'=>'In Valid Event Id'),
'ResponseData'=> array());
}
}
function checkDate1($date1){
return preg_match('`^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$`', $date1) ? TRUE : FALSE;
}
$server = new soap_server();
$server->configureWSDL('GetEventInfo', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
$server->debug_flag = true;
$server->wsdl->addComplexType(
'ResponseInfo',
'complexType',
'struct',
'all',
'',
array(
'Response' => array('name' => 'Response', 'type' => 'tns:Response'),
'ResponseData' => array('name' => 'ResponseData', 'type' => 'tns:ResponseData'),
)
);
$server->wsdl->addComplexType(
'Response',
'complexType',
'struct',
'all',
'',
array(
'Code' => array('name' => 'Code', 'type' => 'xsd:int'),
'Msg' => array('name' => 'Msg', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'TeamsArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:Team[]')
),
'tns:Team'
);
$server->wsdl->addComplexType(
'Team',
'element',
'struct',
'all',
'',
array(
'TeamId' => array('name' => 'TeamId', 'type' => 'xsd:int'),
'TeamName' => array('name' => 'TeamName', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'UserData',
'complexType',
'struct',
'all',
'',
array(
'UserId' => array('name' => 'UserId', 'type' => 'xsd:int'),
'Role' => array('name' => 'Role', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventDetails',
'complexType',
'struct',
'all',
'',
array(
'EventId' => array('name' => 'EventId', 'type' => 'xsd:int'),
'EventName' => array('name' => 'EventName', 'type' => 'xsd:string'),
'EventLocation' => array('name' => 'EventLocation', 'type' => 'xsd:string'),
'EventLogoPath' => array('name' => 'EventLogoPath', 'type' => 'xsd:string'),
'EventDate' => array('name' => 'EventDate', 'type' => 'xsd:date')
)
);
$server->wsdl->addComplexType(
'Facility',
'complexType',
'struct',
'all',
'',
array(
'Longtitude' => array('name' => 'Longtitude', 'type' => 'xsd:string'),
'Latitude' => array('name' => 'Latitude', 'type' => 'xsd:string')
)
);
$server->wsdl->addComplexType(
'EventData',
'complexType',
'struct',
'all',
'',
array(
'EventDetails' => array('name' => 'EventDetails', 'type' => 'tns:EventDetails'),
'Facility' => array('name' => 'Facility', 'type' => 'tns:Facility'),
'Schedule' => array('name' => 'Schedule', 'type' => 'xsd:string'),
'Rules' => array('name' => 'Rules', 'type' => 'xsd:string'),
'WeatherLine' => array('name' => 'WeatherLine', 'type' => 'xsd:string'),
'Teams' => array('name' => 'Teams', 'type' => 'tns:TeamsArray')
)
);
$server->wsdl->addComplexType(
'ResponseData',
'complexType',
'struct',
'all',
'',
array(
'UserData' => array('name' => 'UserData', 'type' => 'tns:UserData'),
'EventData' => array('name' => 'EventData', 'type' => 'tns:EventData')
)
);
$inparams = array('EventId' => 'xsd:int', 'Version' => 'xsd:string');
//$outparams = array('msg' => 'xsd:string','name' => 'xsd:string','role'=> 'xsd:int','email'=> 'xsd:string','lastName'=> 'xsd:string','temp'=>'xsd:array');
//$outparams = array('name'=> 'xsd:string', 'emailArray' => 'tns:ContactArray');
$outparams = $outparams = array('ResponseInfo' => 'tns:ResponseInfo');
//$outparams = $outparams = array('ResponseInfo' => 'xsd:string');
//$outparams = array('ProfileInfo'=> 'tns:Book');
$server->register('GetEventInfo', $inparams, $outparams, $ns, false);
if (!isset($HTTP_RAW_POST_DATA))
$HTTP_RAW_POST_DATA = file_get_contents("php://input");
$server->service($HTTP_RAW_POST_DATA);
file_put_contents("sqlwsdl.log", $HTTP_RAW_POST_DATA."\r\n".$server->getDebug());
?>
Tuesday, November 16, 2010
Tuesday, July 6, 2010
Package Trip from bangalore to tirupati
Hi
I like to share the information about my package trip to Tirupati in Green-line travels
Its awesome trip
* They pick us near indranagar depo
* They collected our ticket and give one boarding ticket keep safe its very important
* Once u seated they will give half liter water,and some Snacks
* Its Volvo bus so seats are comfort
* Around 8:30 pm bus will leave banglore
* Around 11:30 bus will stop for 15 min in some hotel
* Around 2 O'clock it will reach to Tirupati
* They will give room's to fresh up .. room was good... only 45min or 1 hour time to fresh up
* Around 3 one TDT bus is ready to take u to Tirumala
* It took 1 hour to reach to Tirumala
* Phone and Camera's are not allowed so your guide will tell to keep things and sleepers in one shop...... its safe no problem if u keep there... per mobile he will charge 10Rs took keep..
* Guide will give 300Rs to every one to take sigarra darsann ticket .. and will be in Q for Darsanna
* If rush is less then u will come out with in 7 :30
* Else it will 9:30 each 300Rs ticket u will get 2 Laddu. once u came out from temple. u will get break fast which is included in package.
* 10 O'clock u will Tirumala and come back to Tirupati.. u will back to volvo bus and You will moved to one more temple Padmavati Devi Temple Wife of Tirupati
* 12:30 Lunch this is also include in package
* 7:30 will be back to Banglore
Cost of Ticket per head is 1450Rs which include 1beakfast,1lunch, sigarra Darsanna ticket and Volvo bus
I hope this package is very good
I like to share the information about my package trip to Tirupati in Green-line travels
Its awesome trip
* They pick us near indranagar depo
* They collected our ticket and give one boarding ticket keep safe its very important
* Once u seated they will give half liter water,and some Snacks
* Its Volvo bus so seats are comfort
* Around 8:30 pm bus will leave banglore
* Around 11:30 bus will stop for 15 min in some hotel
* Around 2 O'clock it will reach to Tirupati
* They will give room's to fresh up .. room was good... only 45min or 1 hour time to fresh up
* Around 3 one TDT bus is ready to take u to Tirumala
* It took 1 hour to reach to Tirumala
* Phone and Camera's are not allowed so your guide will tell to keep things and sleepers in one shop...... its safe no problem if u keep there... per mobile he will charge 10Rs took keep..
* Guide will give 300Rs to every one to take sigarra darsann ticket .. and will be in Q for Darsanna
* If rush is less then u will come out with in 7 :30
* Else it will 9:30 each 300Rs ticket u will get 2 Laddu. once u came out from temple. u will get break fast which is included in package.
* 10 O'clock u will Tirumala and come back to Tirupati.. u will back to volvo bus and You will moved to one more temple Padmavati Devi Temple Wife of Tirupati
* 12:30 Lunch this is also include in package
* 7:30 will be back to Banglore
Cost of Ticket per head is 1450Rs which include 1beakfast,1lunch, sigarra Darsanna ticket and Volvo bus
I hope this package is very good
Monday, June 28, 2010
Creating a table in for loop each row with 5 column
If Your retrieving a n-number of data from database and wants to display in table like with n*m row*col then this code will be used
$col is number of column's
O/P will be like this

$col is number of column's
O/P will be like this

<table border="1px"> ?php $col=5; for ( $i=1; $i<=20; $i++){ if(!($i-1 % $col)){ ?> <tr><?php } ?> <td><?php echo $i; ?></td> <?php if(!($i % $col)){?> </tr> <?php }
} ?> </table>
Monday, May 17, 2010
Renaming id name in javascript
old is old id where we are going to rename it to new
function renameID()
{
document.getElementById("old").id = "new";
}
onclick="renameID()"
function renameID()
{
document.getElementById("old").id = "new";
}
onclick="renameID()"
Wednesday, May 5, 2010
Adding and removing text box Which also insert a row next or Beneath the row
In this program We can add the row and we can also insert the row beneath the row
and we can remove the row.... dynamic select box value from database.. can be added each time to row
this program is calculating tax i did in html u can make it use in php by give the tax value from data base presently its static value
Remove all opening and closed BR tags and then run
ADD THIS IN HEAD TAG
and we can remove the row.... dynamic select box value from database.. can be added each time to row
this program is calculating tax i did in html u can make it use in php by give the tax value from data base presently its static value
Remove all opening and closed BR tags and then run
ADD THIS IN HEAD TAG
<SCRIPT language="javascript">
function insRow1(id)
{
var m = document.getElementById(id).rowIndex;
++m;
var x=document.getElementById('myTable').insertRow(m);
id = ++id;
var y=x.insertCell(0);
var z=x.insertCell(1);
var g=x.insertCell(2);
var w=x.insertCell(3);
var h=x.insertCell(4);
var table = document.getElementById('myTable');
var rowCount = table.rows.length;
--rowCount;
var divIdName = 'my'+rowCount+'Div';
x.setAttribute('id',divIdName);
var rowCount1=--rowCount;
y.innerHTML="<input type='text' value='' onkeyup=total2() id="+divIdName+"FT>";
z.innerHTML="<input type='text' value='' onkeyup=total2() id="+divIdName+"ST>";
g.innerHTML =table.rows[1].cells[2].innerHTML;
w.innerHTML="<input type='button' id="+divIdName+"Add onclick=insRow1('"+divIdName+"') value='Insert row'>";
h.innerHTML="<input type='button' id="+divIdName+"Del onclick=deleteRow('"+divIdName+"') value='Delete'>";
g.firstChild.setAttribute('id',divIdName+'Sel');
g.firstChild.setAttribute('onchange','total2()');
}
function deleteRow(tableID) {
var table = document.getElementById('myTable');
var rowCount = table.rows.length;
var m = document.getElementById(tableID).rowIndex;
table.deleteRow(m);
var table = document.getElementById('myTable');
var rowCount = table.rows.length;
var v=0;
for(var m=1;m<rowCount;m++) {
var Ft=document.getElementById(table.rows[m].cells[0].firstChild.getAttribute('id')).value;
var St=document.getElementById(table.rows[m].cells[1].firstChild.getAttribute('id')).value;
var Sel=document.getElementById(table.rows[m].cells[2].firstChild.getAttribute('id')).value
if(!Ft) {
Ft=0;
}
if(!St) {
St=0;
}
var to= parseInt(St) * parseInt(Ft);
if(!Sel) {
var tax=0;
} else {
var tax=to*(Sel/100);
}
to=parseInt(to)+parseFloat(tax);
if(Ft && St) {
v=parseFloat(v)+parseFloat(to);
}
}
document.getElementById('total1').value=v;
}
function total2() {
var table = document.getElementById('myTable');
var rowCount = table.rows.length;
var v=0;
for(var m=1;m<rowCount;m++) {
var Ft=document.getElementById(table.rows[m].cells[0].firstChild.getAttribute('id')).value;
var St=document.getElementById(table.rows[m].cells[1].firstChild.getAttribute('id')).value;
var Sel=document.getElementById(table.rows[m].cells[2].firstChild.getAttribute('id')).value;
if(!Ft) {
Ft=0;
}
if(!St) {
St=0;
}
var to= parseInt(St) * parseInt(Ft);
if(!Sel) {
var tax=0;
} else {
var tax=to*(Sel/100);
}
to=parseInt(to)+parseFloat(tax);
if(Ft && St) {
v=parseFloat(v)+parseFloat(to);
}
}
document.getElementById('total1').value=v;
}
</SCRIPT>
<span style="font-weight:bold;">ADD THIS IN BODY TAG </span>
<textarea rows="10" cols="50">
<form action="index.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
Total <input type="text" id="total1" value=''>
<table id="myTable" border="1">
<tr>
<th>Qty</th>
<th>Price</th>
<th>Tax</th>
<th>Add</th>
<th>Delete</th>
</tr>
<tr id="my1Div">
<td><input type='text' onkeyup="total2()" value="" id="my1DivFT" ></td>
<td><input type='text' value='' id="my1DivST" onkeyup="total2()"></td>
<td><select name=select1 id=my1DivSel onchange="total2()">
<option value=''>Select</option>
<option value='1'>Value 1</option>
<option value='2'>Value 2</option>
<option value='3'>Value 3</option>
</select></td>
<td><input type="button" onclick="insRow1('my1Div')" value="Insert row"></td>
</tr>
</table>
</form>
Tuesday, March 23, 2010
Puttanna Kanagal (1933-1985)

Puttanna Kanagal's Directional Movies
Belli Moda (1966) (Silver Cloud)
Mallammana Pavaada (1969) (Mallamma's Magic)
Kappu Bilupu (1969) (Black and White)
Gejje Pooje (1969) (Mock Marriage)
Karulina Kare (1970) (The Voice of Affection)
Sakshatkara (1971) (The Realisation)
Sharapanjara (1971) (Cage of Arrows)
Nagara Haavu (1972) (The Cobra)
Edakallu Guddada Mele (1973) (On the Edakallu Hillock)
Upasane (1974) (The Devotion) starring Aarathi, Seetaram.
Katha Sangama (1975) (Collection of Stories)
Shubhamangala (1975) (Happy Ending)
Bili Hendthi (1975) (White Wife)
Phalithamsha (1976) (The Result)
College Ranga (Kaaleju ranga) (1976) (The College Stage)
Paduvaaralli Pandavaru (1978) (Pandavas of Paduvarahalli)
Dharmasere (1979) (The Religious Bind)
Ranganayaki (1981) (The Heroine of the Stage)
Maanasa Sarovara (1982)
Dharani Mandala Madhyadolage (1983) (At the Centre of Earth)
Amrutha Ghalige (1984) (The Auspicious Moment)
Runamukthalu (1984) (Devoid of Debt)
Masanada Hoovu (1984)
Saavira Mettilu (2006) (Thousand Steps)
Friday, March 12, 2010
Adding dates function in Php and Zend
in zend and php i wrote one small function which is used for adding days,months and year to a date and Format is YYY-MM-dd
Zend
$date = new Zend_Date();
$disbursedDate1='2010-03-11';
$date->set($disbursedDate1,Zend_Date::DATES);
$disbursedDate1=$date->toString("YYY-MM-dd");
$date->set($disbursedDate1,Zend_Date::DATES);
$disbursedDate1=$date->toString("YYY-MM-dd");
$cd = $this->add_dateAction($disbursedDate1,0,1,0);
echo $cd;
Php
$disbursedDate1='2010-03-11';
$cd = $this->add_dateAction($disbursedDate1,0,1,0);
echo $cd;
Function
function add_dateAction($givendate,$day=0,$mth=0,$yr=0)
{
$cd = strtotime($givendate);
$newdate = date('Y-m-d', mktime(date('h',$cd),
date('i',$cd), date('s',$cd), date('m',$cd)+$mth,
date('d',$cd)+$day, date('Y',$cd)+$yr));
return $newdate;
}
Note:- in zend formate is changed so i used this function to over that prob
in Zend default formate is YYYY-DD-MM ,but we can change what every formate we want by Zend_Local
Zend
$date = new Zend_Date();
$disbursedDate1='2010-03-11';
$date->set($disbursedDate1,Zend_Date::DATES);
$disbursedDate1=$date->toString("YYY-MM-dd");
$date->set($disbursedDate1,Zend_Date::DATES);
$disbursedDate1=$date->toString("YYY-MM-dd");
$cd = $this->add_dateAction($disbursedDate1,0,1,0);
echo $cd;
Php
$disbursedDate1='2010-03-11';
$cd = $this->add_dateAction($disbursedDate1,0,1,0);
echo $cd;
Function
function add_dateAction($givendate,$day=0,$mth=0,$yr=0)
{
$cd = strtotime($givendate);
$newdate = date('Y-m-d', mktime(date('h',$cd),
date('i',$cd), date('s',$cd), date('m',$cd)+$mth,
date('d',$cd)+$day, date('Y',$cd)+$yr));
return $newdate;
}
Note:- in zend formate is changed so i used this function to over that prob
in Zend default formate is YYYY-DD-MM ,but we can change what every formate we want by Zend_Local
Subscribe to:
Posts (Atom)