CodeQuest - Hackathon PHP Creadiv 2015

Creadiv - Design Code Launh

&

accepta provocarea hackathon php

Hackathon 22 - 23 Octombrie 2016, Bucuresti, Connect hub

<?php if ( ! defined('BASEPATH')) exit('Trebuie sa treci de preselectie');

/**
 * CodeQuest 2016
 *
 * Hackaton PHP CREADIV
 *
 * @package    CodeQuest
 * @author     Creadiv si Connect Hub (http://creadiv.ro si http://connecthub.ro) 
 * @copyright  Copyright (c) 2015, CREADIV (Best Web Image SRL)
 * @license    Inscrie-te in competitie prin formularul de mai jos
 * @link       http://www.codequest.ro/
 * @since      Version 2.0
 * @filesource    Vino intre 22 - 23 Octombrie 2016, pe Bd. Dacia nr. 99, et. 4, Connect Hub, Sector 2, Bucuresti (vis-a-vis de Piata Spaniei)
 */


class Codequest extends MY_Controller {

    function 
__construct()
    {
        
parent::__construct();
    }
    function 
_remap()
    {
        if (
$this->uri->total_segments()>1)
            
show_404();
        if ((
$method $this->uri->segment(1))=='')
            return 
$this->_index();
        
$method '_'.str_replace('-','_',$method);
        if (
method_exists($this$method))
        {
            return 
call_user_func_array(array($this$method), $params=array());
        }
        
show_404(); 
    }
    
    function 
_preselectie()
    {
        
$data['page'] = $page $this->pages_lib->get_page(NULL1);
        
        
$data['seo_title'] = $page['seo_title'];
        
$data['seo_description'] = $page['seo_description'];
        
$data['seo_keywords'] = $page['seo_keywords'];
        
        
$data['juriu'] = $this->clients_lib->list_all();
        
        if(
$data['page']['revision']['content']){
            
$data['page']['revision']['content'] = str_replace(['</h2>','[icon_location]','[icon_date]'], ['<span></span></h2>''<div id="location"></div>''<div id="date"></div>'],$data['page']['revision']['content']);
        }
        
        
$this->load->helper('file');
        
$data['script_file'] = read_file(FCPATH.'/public/Codequest.txt');
        
        
$this->load->view('first-page.tpl',$data);
    }
    
    function 
_hackaton()
    {
        
//restrictionam accesul la aceste functii doar prin ajax
        
if (!$this->input->is_ajax_request())
            
show_404();
            
        
$this->data['action'] = $this->uri->segment(3);
        
        
$this->load->library('form_validation');
        
        switch(
$this->data['action']) {
            case 
'send' :
            if (
$this->uri->total_segments()>3)
                
show_404();
            
$this->data['class']='error';
            
$this->data['text']=lang('err_validation');
            
            
$config['upload_path'] = TEMP_PATH;
            
$config['allowed_types'] = ALLOWED_FILE_TYPES;
            
$config['max_size']    = MAX_FILE_UPLOAD_SIZE;
            
$this->load->library('upload'$config);
                                            
            if (!
$this->upload->do_upload('ccv'))
            {
                
$this->form_validation->set_rules('ccv''CV''required'); 
            } else {
                
$file_data $this->upload->data();
                
$cv_filename $file_data['file_name'];
                
$cv_file file_get_contents($file_data['full_path']);
            }
            
            
            
//Validation rules
            
            
$this->form_validation->set_rules('cname''lang:lbl_cname''trim|strip_tags|required|min_length[2]|max_length[60]'); 
            
$this->form_validation->set_rules('cemail''lang:lbl_cemail''trim|required|valid_email');
            
$this->form_validation->set_rules('cmessage''lang:lbl_cmessage_short''callback__custom_required'); 
            

            
            if (
$this->form_validation->run() != FALSE)
            {
                
//prepare the email
                
$this->load->library(array('email','hr_candidates_lib'));
                
$vars['title'] = $vars['seo_title'] = 'Aplicatie Concurent CodeQuest'
                
$vars['name'] = $this->input->post('cname');
                
$vars['email'] = $this->input->post('cemail');
                
$vars['message'] = auto_link(auto_typography($this->input->post('cmessage')));
                                
                
$data = array(
                    
'name' => $this->input->post('cname'),
                    
'email' => $this->input->post('cemail'),
                    
'source' => 'CodeQuest'.mdate('%Y'),
                    
'introduction' => $this->input->post('cmessage'),
                    
'cv_file' => $cv_file,
                    
'cv_filename' => $cv_filename,
                    
'status' => 'active',
                );
                
                
                
$this->data['class']='error';
                
$this->data['text'] = lang('err_send');
                
                if (
$this->hr_candidates_lib->add_hr_candidate($data)) {
                                
                    
$this->email->to($this->input->post('cemail'), $this->input->post('cname'));
                    
$this->email->from(EMAIL_CONTACT1);
                    if (
EMAIL_CONTACT2)
                        
$this->email->cc(EMAIL_CONTACT2);
                    
$this->email->subject($vars['title']);
                    
                    
$vars['page'] = $this->pages_lib->get_page(NULL,2);
                    
$msg $this->load->view('email.contact.tpl',$vars,TRUE);
                    
$this->email->message($msg);
            
                    if (
$this->email->send()) {
                        
$this->data['class']='succes';
                        
$this->data['text']=lang('succ_send');
                    }
                    else {
                        
$this->data['text'] = lang('err_send');//.$this->email->print_debugger();
                    
}
                }
                else {
                    
$this->data['text'] = lang('err_duplicate');
                }
                    
                
// dupa adaugare in db stergem fisierul
                
if (is_file(TEMP_PATH.$cv_filename)){ 
                  
unlink(TEMP_PATH.$cv_filename);
                }
                    
            }
            break;
        }
        
$this->load->view('ajax.tpl',$this->data);
        
    }
    
    function 
_custom_required($str)
    {
        
$str trim(strip_tags($str));
        
$msg str_replace('%min','100',lang('lbl_message_error'));
        
$msg str_replace('%max','5000',$msg);
        
        
        
$this->form_validation->set_message('_custom_required'$msg);
        
        return (!empty(
$str));
        
    }
    
}

/* End of file codequest.php */
/* Location: ./public/codequest.php */
Inscrie-te Acum !

1000 EUR Premiu

24h

Distractie garantata

Food & drinks

24h

Premii

Food & drinks

Distractie garantata

<?php if ( ! defined('BASEPATH')) exit('Trebuie sa treci de preselectie');

/**
 * CodeQuest 2016
 *
 * Hackaton PHP CREADIV
 *
 * @package    CodeQuest
 * @author     Creadiv si Connect Hub (http://creadiv.ro si http://connecthub.ro) 
 * @copyright  Copyright (c) 2015, CREADIV (Best Web Image SRL)
 * @license    Inscrie-te in competitie prin formularul de mai jos
 * @link       http://www.codequest.ro/
 * @since      Version 2.0
 * @filesource    Vino intre 22 - 23 Octombrie 2016, pe Bd. Dacia nr. 99, et. 4, Connect Hub, Sector 2, Bucuresti (vis-a-vis de Piata Spaniei)
 */


class Codequest extends MY_Controller {

    function 
__construct()
    {
        
parent::__construct();
    }
    function 
_remap()
    {
        if (
$this->uri->total_segments()>1)
            
show_404();
        if ((
$method $this->uri->segment(1))=='')
            return 
$this->_index();
        
$method '_'.str_replace('-','_',$method);
        if (
method_exists($this$method))
        {
            return 
call_user_func_array(array($this$method), $params=array());
        }
        
show_404(); 
    }
    
    function 
_preselectie()
    {
        
$data['page'] = $page $this->pages_lib->get_page(NULL1);
        
        
$data['seo_title'] = $page['seo_title'];
        
$data['seo_description'] = $page['seo_description'];
        
$data['seo_keywords'] = $page['seo_keywords'];
        
        
$data['juriu'] = $this->clients_lib->list_all();
        
        if(
$data['page']['revision']['content']){
            
$data['page']['revision']['content'] = str_replace(['</h2>','[icon_location]','[icon_date]'], ['<span></span></h2>''<div id="location"></div>''<div id="date"></div>'],$data['page']['revision']['content']);
        }
        
        
$this->load->helper('file');
        
$data['script_file'] = read_file(FCPATH.'/public/Codequest.txt');
        
        
$this->load->view('first-page.tpl',$data);
    }
    
    function 
_hackaton()
    {
        
//restrictionam accesul la aceste functii doar prin ajax
        
if (!$this->input->is_ajax_request())
            
show_404();
            
        
$this->data['action'] = $this->uri->segment(3);
        
        
$this->load->library('form_validation');
        
        switch(
$this->data['action']) {
            case 
'send' :
            if (
$this->uri->total_segments()>3)
                
show_404();
            
$this->data['class']='error';
            
$this->data['text']=lang('err_validation');
            
            
$config['upload_path'] = TEMP_PATH;
            
$config['allowed_types'] = ALLOWED_FILE_TYPES;
            
$config['max_size']    = MAX_FILE_UPLOAD_SIZE;
            
$this->load->library('upload'$config);
                                            
            if (!
$this->upload->do_upload('ccv'))
            {
                
$this->form_validation->set_rules('ccv''CV''required'); 
            } else {
                
$file_data $this->upload->data();
                
$cv_filename $file_data['file_name'];
                
$cv_file file_get_contents($file_data['full_path']);
            }
            
            
            
//Validation rules
            
            
$this->form_validation->set_rules('cname''lang:lbl_cname''trim|strip_tags|required|min_length[2]|max_length[60]'); 
            
$this->form_validation->set_rules('cemail''lang:lbl_cemail''trim|required|valid_email');
            
$this->form_validation->set_rules('cmessage''lang:lbl_cmessage_short''callback__custom_required'); 
            

            
            if (
$this->form_validation->run() != FALSE)
            {
                
//prepare the email
                
$this->load->library(array('email','hr_candidates_lib'));
                
$vars['title'] = $vars['seo_title'] = 'Aplicatie Concurent CodeQuest'
                
$vars['name'] = $this->input->post('cname');
                
$vars['email'] = $this->input->post('cemail');
                
$vars['message'] = auto_link(auto_typography($this->input->post('cmessage')));
                                
                
$data = array(
                    
'name' => $this->input->post('cname'),
                    
'email' => $this->input->post('cemail'),
                    
'source' => 'CodeQuest'.mdate('%Y'),
                    
'introduction' => $this->input->post('cmessage'),
                    
'cv_file' => $cv_file,
                    
'cv_filename' => $cv_filename,
                    
'status' => 'active',
                );
                
                
                
$this->data['class']='error';
                
$this->data['text'] = lang('err_send');
                
                if (
$this->hr_candidates_lib->add_hr_candidate($data)) {
                                
                    
$this->email->to($this->input->post('cemail'), $this->input->post('cname'));
                    
$this->email->from(EMAIL_CONTACT1);
                    if (
EMAIL_CONTACT2)
                        
$this->email->cc(EMAIL_CONTACT2);
                    
$this->email->subject($vars['title']);
                    
                    
$vars['page'] = $this->pages_lib->get_page(NULL,2);
                    
$msg $this->load->view('email.contact.tpl',$vars,TRUE);
                    
$this->email->message($msg);
            
                    if (
$this->email->send()) {
                        
$this->data['class']='succes';
                        
$this->data['text']=lang('succ_send');
                    }
                    else {
                        
$this->data['text'] = lang('err_send');//.$this->email->print_debugger();
                    
}
                }
                else {
                    
$this->data['text'] = lang('err_duplicate');
                }
                    
                
// dupa adaugare in db stergem fisierul
                
if (is_file(TEMP_PATH.$cv_filename)){ 
                  
unlink(TEMP_PATH.$cv_filename);
                }
                    
            }
            break;
        }
        
$this->load->view('ajax.tpl',$this->data);
        
    }
    
    function 
_custom_required($str)
    {
        
$str trim(strip_tags($str));
        
$msg str_replace('%min','100',lang('lbl_message_error'));
        
$msg str_replace('%max','5000',$msg);
        
        
        
$this->form_validation->set_message('_custom_required'$msg);
        
        return (!empty(
$str));
        
    }
    
}

/* End of file codequest.php */
/* Location: ./public/codequest.php */

Preconditii:

  • Experienta in programare PHP, lucrul cu framework-uri si librarii PHP
  • Cunostinte HTML/CSS, putin design/UX sau utilizarea de teme grafice

Bucuresti, Connect HUB, Bd. Dacia 99, Et4
 

22 - 23 Octombrie 2016

De ce sa participi?

  • 24 de ore de programare intensiva
  • Networking, distractie, food and drinks
  • Rezolvarea challenge-ului prin dezvoltarea unui proiect inovator, cu potential de dezvoltare pe piata
  • Feedback din partea specialistilor din domeniul IT din Romania
  • Premiul oferit echipei castigatoare, din partea CREADIV si alte surprize

Ce trebuie sa faci tu?

  • Sa-ti aduci notebook-ul si orice alte instrumente de care crezi ca vei avea nevoie pe perioada evenimentului
  • Sa ai voie buna si pofta de programare

Important

  • Nu ai voie sa folosesti aplicatii deja create; poti utiliza librarii publice
  • Vei fi ales sa participi la hackathon in urma unui proces de preselectie. Doar 60 locuri libere si o multime de doritori!
  • Vei lucra intr-o echipa de 3 sau 4 oameni, prin urmare poti veni cu prietenii sau poti cunoaste alti programatori direct la eveniment
  • Toti membrii echipei trebuie sa treaca de preselectie
  • Echipele vor fi punctate de juriu conform unui barem clar, care va tine cont de inovatie, rapiditate, corectitudine si alte criterii.

Regulament CodeQuest

Descarca regulamentul in format pdf.

Deadline: 20 octombrie 2016

Locuri: maxim 60, in 15 echipe

Aplica