CodeFest - Online Coding Festival by Department of Computer Engineering, IT-BHU

2011-01-17 Thread vishal kumar rai


Hello,
We are delighted to inform you that *CodeFest*
* *, the annual *International online 
coding festival* of *Computer Engineering Society, IT-BHU*, has been 
unveiled. 

 
CodeFest is a unique fest wherein concepts of mathematics, logic, artificial 
intelligence, algorithms, language syntax, etc. are required to be deployed 
in programming; these concepts manifest themselves in solving problems 
effectively and efficiently!

 

CodeFest was started last year. CodeFest'10 was a phenomenal success with 
participation from all over the globe.

 

CodeFest'11 is geared up with some new and pepped up events, while 
maintaining the integrity of its standards. 

*Here is a brief description of the constituent online events:*

   - *Mathmania* : **A 
   mathematical puzzle contest that puts mathematical and computational skills 
   to test.
   - *Manthan:*   An 
   algorithm intensive programming contest that would require coders to tailor 
   existing standard algorithms to solve real life computation problems.
   - *Virtual 
Combat:* 
   * *An 
   educational game wherein teams of programmed robotic tanks will fight the 
   battles for glory.* *Codes Do Fight! Watch* 
this
   * out.
   - *Perplexed:*  
   ** A programming 
   contest, aimed to test the knowledge of C, wherein codes will be rewarded 
   against syntactic constraints.
   - *Ratespiel:*   
**A 
   technical quiz covering different areas of Computer Science.


This year CodeFest, in association with 
*Technex'11*, 
brings onsite events:

   - *Eniac:*  An open 
   software exhibition where you get an opportunity to demonstrate your 
   software from any domain.
   
   - ** *Code 
Warrior*
   :  A multiple round contest to award the title of 'ultimate computer 
   geek'.

Visit our *website*  
*
*to get more details. 


*Few exciting statistics about CodeFest'10:*

   - 2354 registrations (including 128 professionals) from 680 different 
   institutions, across 59 countries.
   - Some participants were among the winners of Google Code Jam, Top Coder 
   SRMs and ACM ICPC.
   - Total prize money was a whopping amount of 260,000 INR!
   - CodeFest '10 was the largest online coding festival of the Indian 
   subcontinent in 2010 in terms of prize money!
   - CodeFest'10 was the second largest online coding festival of the Indian 
   subcontinent in 2010, next to Bitwise.
   - Gained recognition from several international organizations including 
   Codechef, Adobe, British Telecom, TCS and IEEE.   

 The *CodeFest'11 * team has set out to 
unleash a coding extravaganza. You can't afford to miss the chance to be a 
part of this fest!
 Still have any questions? Feel free to contact us at codef...@itbhu.ac.inor 
reach us personally at:

   - Mohit Bansalmohit.bansal.cs...@itbhu.ac.in
   - Saket Saurabh +91-9452-825-690 saket.saurabh.cs...@itbhu.ac.in 

We wish you all the best for CodeFest and for your future endeavors.

Be free and Happy Coding!
 
Team CodeFest
IT-BHU

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CodeFest - Online Coding Festival by Computer Engineering Society, IT-BHU

2011-01-17 Thread vishal kumar rai
Hello,

We are delighted to inform you that *CodeFest*
* *, the annual *International online
coding festival* of *Computer Engineering Society, IT-BHU*, has been
unveiled.


CodeFest is a unique fest wherein concepts of mathematics, logic, artificial
intelligence, algorithms, language syntax, etc. are required to be deployed
in programming; these concepts manifest themselves in solving problems
effectively and efficiently!



CodeFest was started last year. CodeFest'10 was a phenomenal success with
participation from all over the globe.



CodeFest'11 is geared up with some new and pepped up events, while
maintaining the integrity of its standards.

*Here is a brief description of the constituent online events:*

   - *Mathmania* : **A
   mathematical puzzle contest that puts mathematical and computational skills
   to test.
   - *Manthan:*   An
   algorithm intensive programming contest that would require coders to tailor
   existing standard algorithms to solve real life computation problems.
   - *Virtual 
Combat:*
   * *An
   educational game wherein teams of programmed robotic tanks will fight the
   battles for glory.* *Codes Do Fight! Watch*
this
   * out.
   - *Perplexed:* 
   ** A programming
   contest, aimed to test the knowledge of C, wherein codes will be rewarded
   against syntactic constraints.
   - *Ratespiel:*

**A
   technical quiz covering different areas of Computer Science.


This year CodeFest, in association with
*Technex'11*,
brings onsite events:

   - *Eniac:*  An open
   software exhibition where you get an opportunity to demonstrate your
   software from any domain.
   
   - ** *Code
Warrior*
   :  A multiple round contest to award the title of 'ultimate computer
   geek'.

Visit our *website* 
*
*to get more details.


*Few exciting statistics about CodeFest'10:*

   - 2354 registrations (including 128 professionals) from 680 different
   institutions, across 59 countries.
   - Some participants were among the winners of Google Code Jam, Top Coder
   SRMs and ACM ICPC.
   - Total prize money was a whopping amount of 260,000 INR!
   - CodeFest '10 was the largest online coding festival of the Indian
   subcontinent in 2010 in terms of prize money!
   - CodeFest'10 was the second largest online coding festival of the Indian
   subcontinent in 2010, next to Bitwise.
   - Gained recognition from several international organizations including
   Codechef, Adobe, British Telecom, TCS and IEEE.

 The *CodeFest'11 * team has set out to
unleash a coding extravaganza. You can't afford to miss the chance to be a
part of this fest!
 Still have any questions? Feel free to contact us at
codef...@itbhu.ac.inor reach us personally at:

   - Mohit Bansalmohit.bansal.cs...@itbhu.ac.in
   - Saket Saurabh +91-9452-825-690 saket.saurabh.cs...@itbhu.ac.in

We wish you all the best for CodeFest and for your future endeavors.

Be free and Happy Coding!

Team CodeFest
IT-BHU

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


isAuthorized not called and Multiple sessions

2009-09-17 Thread Vishal

Hi Guys,

I am calling the Auth component in the app_controller class.

It work fine for logging in and out but now I need to add one more
constraint to user login.

For that I tried using the isAuthorized but weirdly its not used by
login.

Its called on logout.

I know this because I put debug() function in there.

I tried declaring the Auth component in the User class as well but no
luck.

I tried removing Auth component from app_controller but still same.

One more thing, is it normal for cakePHP to produce multiple sessions.

In my application, there is only one session but on the call of
setFlash it creates another session and when I try to write something
to it using $this->Session->write('style', 'main'); it creates
another.

Experts out there pls help!

Thanks

Vishal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with find condition and array

2009-08-28 Thread Vishal G

Hi,

yes, you are on right track... this is how you should do it

$audios = $this->Audioplaylist->Audio->find('all',
array('conditions' => array('Audio.id' => $audioIds) )
);

This will translate to Audio.id IN (1, 2, 3)

Your problem might be because of your array.

Make sure your array $audioIds is one dimensional array

V

On Aug 28, 1:50 pm, schneimi  wrote:
> Hi,
>
> I have an array with some ids of a model and struggle with getting
> them into a find condition.
>
> This is what I currently use, it works but is not very caky:
>
> $audioIds = array('1', '2', '3',);
> $audios = $this->Audioplaylist->Audio->find('all', array('conditions'
> => 'Audio.id='.implode(' OR Audio.id=', $audioIds)));
>
> I think it should look like this the cake way:
>
> $audios = $this->Audioplaylist->Audio->find('all', array('conditions'
> => array('Audio.id' => $audioIds)));
>
> but this results in [...] AND `Audio`.`id`=Array [...]
>
> I already had a look into the cookbook and played around alot, but
> couldn't figure out a proper way, so I hope you can help me.
>
> Thx,
> Michael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Pagination Complex Query

2009-08-28 Thread Vishal

Hi Guys,

I think I got interesting question for you all.

I have to paginate this query and since I am using paginate in this
controller in several actions I can't even override paginate method in
my model class.

I have to achieve this using bindModel kinda methods.

Simple Many-to-Many relationship

Authors M-t-M Titles

I have three tables, authors, authors_titles and titles

In authors_titles I have an extra field to store authors ownership
order

For example

authorsauthors_titles   titles
1 Andrew  1 1 1   1
Math
2 John  2 1 22
Science
3 Peter 3 2 1
   2 2 2
   1 2 3

Here it means, Andrew is the first author of title (1 Math) and John
Second.

Now, I have to run query to find all the authors and count the number
of times, with whom author (1 Andrew) have worked and as what capacity
(means first author, second author etc)

Any help will be appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



fill dropdown by cake from database model???

2008-05-23 Thread vishal

Hi My Cakephp friends,
  I am new on this google groupcakephp forum.I spend lot
of time to solve the problem on the forum but still can't get
anything, so can anybody help me regarding following issue.


I have two models(database table):User,Message

I want place a drop down in my Message view file as :

select('messageto', $options=array(), null, array(),
'--
select member--'); ?>

I want to fills this drop down from my another table (user table)
i.e i want to fill it dynamically from database table.


Also when i edit the message ,the drop down value should be the same
as their id.i.e
it select the proper value (not the first one everytime).

this is my controller file code for Message:

**

 4,
'order' => array(
'Message.messagedate' => 'asc'
)
);




function index() {
//$this->set('messages', $this->User->findAll(''));
$data = $this->paginate('Message');
  $this->set(compact('data'));

}

function view($id) {
$this->Message->id = $id;
$this->set('Message', $this->Message->read());

}

function delete($id) {
$this->Message->del($id);
$this->flash('The message with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/index');
}

function add() {



if (!empty($this->data)) {
if ($this->Message->save($this->data)) {


$this->flash('Your Message has been saved.','http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/index');
}

}
}


function edit($id = null) {
$this->Message->id = $id;
if (empty($this->data)) {
$this->data = $this->Message->read();
} else {
if ($this->Message->save($this->data['Message'])) {
$this->flash('Your Message has been updated.',
array('action' =>
'index'));
}
}
}

}
?>


**


So my friend please help me in this issue,it is very urgent for me,
otherwise i have to put the
query manually,but i want to fill the dropdown by cake method.

Thanks in advance..

Vishal
One world Technologies,
Ambala Cantt
India

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Help me friends(dropdown issue)

2008-05-23 Thread vishal

Hi My Cakephp friends,
  I am new on this google groupcakephp forum.I spend lot
of time to solve the problem on the forum but still can't get
anything, so can anybody help me regarding following issue.


I have two models(database table):User,Message

I want place a drop down in my Message view file as :

select('messageto', $options=array(), null, array(),
'--
select member--'); ?>

I want to fills this drop down from my another table (user table)
i.e i want to fill it dynamically from database table.


Also when i edit the message ,the drop down value should be the same
as their id.i.e
it select the proper value (not the first one everytime).

this is my controller file code for Message:

**

 4,
'order' => array(
'Message.messagedate' => 'asc'
)
);




function index() {
//$this->set('messages', $this->User->findAll(''));
$data = $this->paginate('Message');
  $this->set(compact('data'));

}

function view($id) {
$this->Message->id = $id;
$this->set('Message', $this->Message->read());

}

function delete($id) {
$this->Message->del($id);
$this->flash('The message with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/index');
}

function add() {



if (!empty($this->data)) {
if ($this->Message->save($this->data)) {


$this->flash('Your Message has been saved.','http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/index');
}

}
}


function edit($id = null) {
$this->Message->id = $id;
if (empty($this->data)) {
$this->data = $this->Message->read();
} else {
if ($this->Message->save($this->data['Message'])) {
$this->flash('Your Message has been updated.',
array('action' =>
'index'));
}
}
}

}
?>


**


So my friend please help me in this issue,it is very urgent for me,
otherwise i have to put the
query manually,but i want to fill the dropdown by cake method.

Thanks in advance..

Vishal
One world Technologies,
Ambala Cantt
India

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



tiny MCE editor issue

2008-05-21 Thread vishal

Hi friends,
 I want to bulit a page from my cms, in that I would
like to place a tinymce editor to fill the content that will dispay on
front end after save & publish.


I reuest you to please send me few lines of code or help to save the
content in database that will fill in the editor.

thanks always in advance..!!

vishal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Drop down values problem

2008-05-21 Thread vishal

Hi friends,
  I am new on this forum.can anybody help me regarding
following issue.

I place a drop down in my view file as :

select('messageto', $options=array(), null, array(), '--
select member--'); ?>

I want to fills this drop down from my another table (user table)

i.e i want to fill it dynamically from database table.

The controller page is :

data)) {
if ($this->Message->save($this->data)) {


$this->flash('Your Message has been 
saved.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/messages/index');
}

}
}

function edit($id = null) {
$this->Message->id = $id;
if (empty($this->data)) {
$this->data = $this->Message->read();
} else {
if ($this->Message->save($this->data['Message'])) {
$this->flash('Your Message has been updated.', 
array('action' =>
'index'));
}
}
}

}

This will store the data in messages table.But in messageadd view
page , i want to fill the drop down from user table. so any body help
me regarding that...
I shall be highly thankful to you..!!!

vishal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



can anybody help me for paging

2008-05-20 Thread vishal

Hi,
I am new on this community..can any body help me for paging.

this is my file:
Admin Panel


link('Add User', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/add'); ?>




  Name
  
  Address
  
  Phone
  
  Email
  
  Action
  
  












    http://192.168.0.60/vishal/
cake_1.2.0.6311-beta/app/users/delete/">Delete
link('Delete', 
"'http://192.168.0.60/vishal/
cake_1.2.0.6311-beta/users/{$user['User']['id']}", null, 'Are you
sure?' )?> 
link('Edit User', "http://192.168.0.60/vishal/
cake_1.2.0.6311-beta/app/users/edit/{$user['User']['id']}" )?>







this is my controller file:

 4,
'order' => array(
'User.name' => 'asc'
)
);
//

function index() {
//$this->set('users', $this->User->find('all'));
$data = $this->paginate('User');
  $this->set(compact('data'));
}

function view($id) {
$this->User->id = $id;
$this->set('user', $this->User->read());

}

function delete($id) {
$this->User->del($id);
$this->flash('The user with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}

function add() {
if (!empty($this->data)) {
if ($this->User->save($this->data)) {



echo $this->data['User']['image'];

$destination = 
realpath('../../app/webroot/img/uploads/') . '/';

// grab the file
$file = $this->data['User']['image'];

// upload the image using the upload component
$result = $this->Upload->upload($file, $destination, null,
array('type' => 'resizecrop', 'size' => array('400', '300'), 'output'
=> 'jpg'));

if (!$result){
$this->data['User']['image'] = $this->Upload->result;
} else {
// display error
$errors = $this->Upload->errors;

// piece together errors
if(is_array($errors)){ $errors = implode("",$errors); }

$this->Session->setFlash($errors);
//$this->redirect('/images/upload');
exit();
}
if ($this->User->save($this->data)) {
$this->Session->setFlash('Image has been added.');
//$this->redirect('/images/index');
} else {
$this->Session->setFlash('Please correct errors 
below.');
unlink($destination.$this->Upload->result);
}



$this->flash('Your detail has been 
saved.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}

}
}

function edit($id = null) {
$this->User->id = $id;
if (empty($this->data)) {
$this->data = $this->User->read();
} else {
if ($this->User->save($this->data['User'])) {
$this->flash('Your detail has been updated.', 
array('action' =>
'index'));
}
}
}

}
?>

Please tell me the correct code for puuting paginf on my index page.

thanks in advance everybody..if you have few minutes for me..

vishu
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Help me please for flash(swf file) handling

2008-05-20 Thread vishal

Hi,
   My swf file is located in /app/webroot/files/main_flash4.swf

But I don't know the correct code how to display this flash on fron
end i.e on layout page.


my layout file is :
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>



css('style') ?>









Home| Our Company| Sitemap|
Projects


image('logo.gif') ?> 

//**I want to display flash here in this




image('logo.gif') ?>








        link('User', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index'); ?>
    link('Messages',
'http://192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/
index'); ?>
link('Account',
'http://192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/
index'); ?>









contactus| About us| privacy 
policy








so please tell me few lines of code for showing swf file.

Thanks in advance
vishal

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Layout change in edit case(help me please)

2008-05-20 Thread vishal

Thanks you very much my friend...!!! I have done the changes & my
problem is solved..!!!

thanks you very much..

friend can you help me in this matter also if you have few minutes for
me..??

I have problem in uploading the image..I want to display the image as
well as store the image in database...
I mean to say these are my files:

add.ctp:
Add User


create('User', array('action' => '/add/
index','enctype'=>'multipart/form-data'));
echo  $form->input('name');
echo $form->input('address', array('rows' => '3'));
echo $form->input('phone');
echo $form->input('mobile');
echo $form->input('email');
echo $form->input('city');
echo $form->input('state');
echo $form->input('image',array('type' => 'file'));
echo $form->end('Save User');
?>



This is my controller file:

 4,
'order' => array(
'User.name' => 'asc'
)
);


function index() {
//$this->set('users', $this->User->find('all'));
$data = $this->paginate('User');
  $this->set(compact('data'));
}

function view($id) {
$this->User->id = $id;
$this->set('user', $this->User->read());

}

function delete($id) {
$this->User->del($id);
$this->flash('The user with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}

function add() {
if (!empty($this->data)) {


$this->flash('Your detail has been 
saved.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}

}


function edit($id = null) {
$this->User->id = $id;
if (empty($this->data)) {
$this->data = $this->User->read();
} else {
    if ($this->User->save($this->data['User'])) {
$this->flash('Your detail has been updated.', 
array('action' =>
'index'));
}
}
}

}
?>


the problem is that I want to store the image path in database field &
I want to dispaly the image at front end...i.e where the images are go
in which folder 
the path is saved by using above code
have you got my issue ??

thanks,
vishal


On May 20, 2:42 pm, djiize <[EMAIL PROTECTED]> wrote:
> it's due to Cake routing and URL rewriting
> in some cases, prefer HTML helper instead your own HTML
>
> in your layout, change
>  type="text/css" />
> by
> css('style') ?>
>
> and change al
> 
> by
> image('your_image.gif') ?>
>
> And last, in your "flash" calls, don't repeat the host, path, etc...
> just do:
> $this->flash('Your detail has been updated.', '/users/index');
> or better, as you already are in Users controller (and you'll get
> others benefits, as reverse routing):
> $this->flash('Your detail has been updated.', array('action' =>
> 'index'));
>
> On 20 mai, 10:33, vishal <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >  Myself vishal facing a problem while editing.when i edit the
> > layout changes. so anybody help me please..
> > But in case of add it look well.
> > This is the details of the file:
>
> > Layout file:
>
> >  > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > http://www.w3.org/1999/xhtml";>
> > 
> > 
> >  > type="text/css" />
>
> > 
> > 
>
> > 
> > 
> > 
> >     
> > 
> >  > align='right'>Home| Our Company| Sitemap|
> > Projects
> > 
> >     
> >  > align="center">
> >  > align="center">
> >  > SRC="../../app/webroot/img/logo.gif"  > > td>
> > 
> > 
>
> > 
> 

Layout change in edit case(help me please)

2008-05-20 Thread vishal

Hi,
 Myself vishal facing a problem while editing.when i edit the
layout changes. so anybody help me please..
But in case of add it look well.
This is the details of the file:

Layout file:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>












Home| Our Company| Sitemap|
Projects













link('User', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index'); ?>
    link('Messages',
'http://192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/
index'); ?>
        link('Account',
'http://192.168.0.60/vishal/cake_1.2.0.6311-beta/app/messages/
index'); ?>









contactus| About us| privacy 
policy







This is my controller page:


 4,
'order' => array(
'User.name' => 'asc'
)
);


function index() {
//$this->set('users', $this->User->find('all'));
$data = $this->paginate('User');
  $this->set(compact('data'));
}



function delete($id) {
$this->User->del($id);
$this->flash('The user with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}

function add() {
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->flash('Your detail has been 
saved.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}

}
}

function edit($id = null) {
$this->User->id = $id;
    if (empty($this->data)) {
$this->data = $this->User->read();
} else {
if ($this->User->save($this->data['User'])) {
$this->flash('Your detail has been 
updated.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}
}
}

}
?>



& this is my edit.ctp view file:
Edit User


create('User', array('action' => 'edit'));
echo  $form->input('name');
echo $form->input('address', array('rows' => '3'));
echo $form->input('phone');
echo $form->input('mobile');
echo $form->input('email');
echo $form->input('city');
echo $form->input('state');
echo $form->input('image',array('type' => 'file'));
echo $form->end('Save User');
?>


I am using the same layout in case of add & edit...but in case of edit
it looks differentt without images that i use in layout file...so plz
help me as soon as possible...
I m waiting for the reply..!!!

vishal


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How display & stored images

2008-05-20 Thread vishal

Hi,
  Myself vishal facing a problem while uploading the
image.Actually the image path stored in the database.I want to dispaly
that uploaded image on front.

This is my code :
add.ctp file
Add User
create('User', array('action' => '');
echo  $form->input('name');
echo $form->input('address', array('rows' => '3'));
echo $form->input('phone');
echo $form->input('mobile');
echo $form->input('email');
echo $form->input('city');
echo $form->input('state');
echo $form->input('image',array('type' => 'file'));
echo $form->end('Save User');
?>

This stored the image path in the image field of database.
But where this image stored in the folder & in which directory.So
please help me as soon as possible.

I also want to make thumb of the image while uploading. send me the
complete code of image uploading & how I show the images on
frontend.
This is my controller page:

 4,
'order' => array(
'User.name' => 'asc'
)
);


function index() {
//$this->set('users', $this->User->find('all'));
$data = $this->paginate('User');
  $this->set(compact('data'));
}

function view($id) {
$this->User->id = $id;
$this->set('user', $this->User->read());

}

function delete($id) {
$this->User->del($id);
$this->flash('The user with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}

function add() {
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->flash('Your detail has been 
saved.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}

}
}

function edit($id = null) {
$this->User->id = $id;
if (empty($this->data)) {
    $this->data = $this->User->read();
} else {
if ($this->User->save($this->data['User'])) {
$this->flash('Your detail has been 
updated.','http://192.168.0.60/
vishal/cake_1.2.0.6311-beta/app/users/index');
}
}
}

}
?>

Please tell me where i am wrong & in which folder images go. so that i
will display on front with its thumb.

Vishal
thanks in advance !!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



setting path in app/webroot/index.php

2008-05-19 Thread vishal

Hi All,
  I am New user on this community..can any body help me
please !

I have problem in setting the path in app/webrot/index.php


My cake is installed in:

X:\small_projects\vishal

if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}

if (!defined('ROOT')) {

define('ROOT', '/home/small_projects/vishal/cake_1.1.19.6305');
}
if (!defined('APP_DIR')) {
//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION');
define('APP_DIR', 'app');
}

if (!defined('CAKE_CORE_INCLUDE_PATH')) {

define('CAKE_CORE_INCLUDE_PATH', '/home/small_projects/vishal/
cake_1.1.19.6305/');
   }




where X:/ drives in my local server 192.168.0.60

so please set my path accordingly..if possible. & please check & edit
where i am wrong..
I am very confuse regarding that.


Thanks in advance..!!!
vishal

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



undefined variable problem $form

2008-05-19 Thread vishal




Hi All,

  I am new user on this community.I am not an expert in
cake.so please help me in this issue.



undefined variable $form



 This is my add.ctp file :

Add User


create('User');?>
echo  $form->input('name');
echo $form->input('address', array('rows' => '3'));
echo $form->input('phone');
echo $form->input('mobile');
echo $form->input('email');
echo $form->input('city');
echo $form->input('state');
echo $form->input('image',array('type' => 'file'));
echo $form->end('Save User');
?>



This is the controller file:


 VALID_NOT_EMPTY,
  'address' => VALID_NOT_EMPTY,
   'phone' => VALID_NUMBER,
   'mobile' => VALID_NUMBER,
  'email' => VALID_EMAIL,
  'city' => VALID_NOT_EMPTY,
   'state' => VALID_NOT_EMPTY,
   'image' => VALID_NOT_EMPTY,
  'born' => VALID_NUMBER
   );

*/
var $validate = array(
'name' => array(
'rule' => array('minLength', 1),
'message' => 'please enter the name'
),
'address' => array(
'rule' => array('minLength', 1)
)
);

var $paginate = array(
'limit' => 4,
'order' => array(
'User.name' => 'asc'
)
);


function index() {
//$this->set('users', $this->User->find('all'));
//$data = $this->paginate('User');
  //$this->set(compact('data'));

$this->set('users', $this->User->findAll());

}

function view($id) {
$this->User->id = $id;
$this->set('user', $this->User->read());

}

function delete($id) {
$this->User->del($id);
$this->flash('The user with id: '.$id.' has been deleted.', 'http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}

function add() {
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->flash('Your detail has been saved.','/users/
index');
    }

}
}

function edit($id = null) {
$this->User->id = $id;
if (empty($this->data)) {
$this->data = $this->User->read();
} else {
if ($this->User->save($this->data['User'])) {
$this->flash('Your detail has been updated.','http://
192.168.0.60/vishal/cake_1.2.0.6311-beta/app/users/index');
}
}
}

}
?>



when i execute /users/addThis gives me an error :

undefined variable $from. I don't know why this error occurs.same case
occurs in editing .



Is there any other way to create a form





Thanks, in advance 



Vishal

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



List of ACO's for a given user (ARO)

2007-06-05 Thread Vishal

Hi there,

I have been looking for a way to get a list of the available ACO's for
a given ARO/user.

There does not appear to be a simple method of any of the ACL objects
to get the list.

Can someone point me in the right direction?

Thank you.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Ajax + CakePHP + Tree Menu (Ver Urgent)

2007-05-23 Thread Vishal

Hi Guys,

I have search the WWW like anything...
I have the basic knowledge of Ajax, javascript and cakePHP...
I am trying to create a dynamic tree view of data entries using
cakePHP and Ajax...
Something like this:-
 Book1
  Title
  Author
Book2...
where book information is in book table, title in title table and
author in author table

I kinda know how to do this using ajax, php and javascript but the
problem is I have no idea about the CakePHP's Ajax functions..
I have read the manual...Looked into the IBM's tutorial...Check all
the available tutorials but all of them provides piece of code which I
can't understand...

Is there any website/document which expains Ajax and CakePHP step by
step...

Please I really need help... I have to finish this project by next
friday...

Please Reply


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unary M-M Realationship

2007-04-25 Thread Vishal

Hi john,

Can you explain why you think it is.
I dont think its HABTM case but I am not sure may be it is.

Thanks

Vishal

On Apr 26, 2:10 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 25, 2007, at 9:42 PM, Vishal wrote:
>
>
>
> > Anyone? Please I need the answer ASAP.
>
> > On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
> >> Hi Guys,
>
> >> I am new with CakePHP as everyone is. What I want to know that how to
> >> use the associations to handle the Unary M-M relationship. I am
> >> working on university database where we have unary M-M relations like
> >> each subject could have (1, M) prerequisites subjects. So it is unary
> >> M-M relation where the table will have subject_id refer to subject
> >> (id)
> >> and prerequisite_subject_id which also refer to subject(id).
> >> Combination of both these id's is the primary key. I dont know how to
> >> show this in terms of association in CakePHP.
>
> Sounds like hasAndBelongsToMany (HABTM). Check out the models chapter
> in the manual.
>
> -- John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unary M-M Realationship

2007-04-25 Thread Vishal

Thanks Samuel...But still I don't get it. Like should I just make it
like subject hasMany PrerrequisiteSubjects and PrerequisiteSubjects
belongsTo subject with subject_id and subject with
prerequisite_subject_id and how I define that the combination of these
id's is primary key. Is it possible by setting the $parimary_key
variable.

Let me know if I am moving in reight direction.

Thanks

Vishal

On Apr 26, 2:06 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> If you need answers fast then email lists are not your best bet use
> the irc channel info on the project home page
>
> maybe this might get you started
>
> http://pastie.textmate.org/56643
>
> Sam D
>
> On 4/25/07, Vishal <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Anyone? Please I need the answer ASAP.
>
> > On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
> > > Hi Guys,
>
> > > I am new with CakePHP as everyone is. What I want to know that how to
> > > use the associations to handle the Unary M-M relationship. I am
> > > working on university database where we have unary M-M relations like
> > > each subject could have (1, M) prerequisites subjects. So it is unary
> > > M-M relation where the table will have subject_id refer to subject(id)
> > > and prerequisite_subject_id which also refer to subject(id).
> > > Combination of both these id's is the primary key. I dont know how to
> > > show this in terms of association in CakePHP.
>
> > > Anyone who knows how to do this. Pls answer.
>
> > > Thanks
>
> > > Vishal
>
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unary M-M Realationship

2007-04-25 Thread Vishal

Hi john,

Can you explain why you think it is.
I dont think its HABTM case but I am not sure may be it is.

Thanks

Vishal


On Apr 26, 2:10 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Apr 25, 2007, at 9:42 PM, Vishal wrote:
>
>
>
> > Anyone? Please I need the answer ASAP.
>
> > On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
> >> Hi Guys,
>
> >> I am new with CakePHP as everyone is. What I want to know that how to
> >> use the associations to handle the Unary M-M relationship. I am
> >> working on university database where we have unary M-M relations like
> >> each subject could have (1, M) prerequisites subjects. So it is unary
> >> M-M relation where the table will have subject_id refer to subject
> >> (id)
> >> and prerequisite_subject_id which also refer to subject(id).
> >> Combination of both these id's is the primary key. I dont know how to
> >> show this in terms of association in CakePHP.
>
> Sounds like hasAndBelongsToMany (HABTM). Check out the models chapter
> in the manual.
>
> -- John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Unary M-M Realationship

2007-04-25 Thread Vishal

Anyone? Please I need the answer ASAP.

On Apr 26, 1:36 pm, Vishal <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I am new with CakePHP as everyone is. What I want to know that how to
> use the associations to handle the Unary M-M relationship. I am
> working on university database where we have unary M-M relations like
> each subject could have (1, M) prerequisites subjects. So it is unary
> M-M relation where the table will have subject_id refer to subject(id)
> and prerequisite_subject_id which also refer to subject(id).
> Combination of both these id's is the primary key. I dont know how to
> show this in terms of association in CakePHP.
>
> Anyone who knows how to do this. Pls answer.
>
> Thanks
>
> Vishal


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Unary M-M Realationship

2007-04-25 Thread Vishal

Hi Guys,

I am new with CakePHP as everyone is. What I want to know that how to
use the associations to handle the Unary M-M relationship. I am
working on university database where we have unary M-M relations like
each subject could have (1, M) prerequisites subjects. So it is unary
M-M relation where the table will have subject_id refer to subject(id)
and prerequisite_subject_id which also refer to subject(id).
Combination of both these id's is the primary key. I dont know how to
show this in terms of association in CakePHP.

Anyone who knows how to do this. Pls answer.

Thanks

Vishal


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



mod_rewrite Problem

2007-04-16 Thread Vishal

Hi there,

This is my forst time with cake PHP and this what I have done so far
1. I have unzip the cakePHP package under /var/www/html/cake...
2. I have change the database.php file and now when I go to URL
www.**.com/cake, it shows me the index page (without CSS and
images) which says Your database configuration file is present. and
Cake is able to connect to the database.
To see the CSS and image on the index page I uncomment the line
DEFINE.. from app/config/core.php

Now to learn more about the cakePHP, I went through the blog tutorial.
I have copied all the files as given in the tutorial and change their
permission but still I can't access the files...
I am trying www.**.com/cake/posts but the web server simply shows
the 404 not found page.

Is it because of mod_rewrite or something else...

Please Help!

Vishal


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---