diasansley
Members-
Posts
64 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
diasansley's Achievements
Member (2/5)
0
Reputation
-
my req is to convert the pdf(first page) to an image file so far i have a few dll files and a pdftohtml.exe and the below mentioned code. I dnt knw if I am doing it the right way but any help would appreciated. $pdfname = "C:/xampp/htdocs/test/test.pdf"; $htmlfile = "C:/xampp/htdocs/test/testtest.html"; $path_to_lib = "C:/xampp/htdocs/test"; $rtn = exec('C:/xampp/htdocs/test -c -s "'.$pdfname.'" "'.$htmlfile.'"', $ouputted_html); foreach ($ouputted_html as $val){ echo $val . "\n"; } I get no output
-
$csv_file = './uploads/file_import.csv'; $csvData = $this->csvreader->parse_file($csv_file); $count = 0; $i = 0; $jj = 0; foreach ($csvData as $row1) { if ($row1[1] != "") { if ($row1[2] != "") { foreach ($csvData as $row) { if ($row[3] != "") { echo $row[3]; } else { break; } } } } }
-
having a problem importing a file having multiple hierarchy levels!! its a csv file the contents look something like this! just need a jump start! thanks the file looks likes this row 1 row2 row3 name1 subj1 abcd efgh subje2 test1 test2 the file has to first import name1 then subj1 then abcd,then efgh then move back to subj2 and so on! Thanks
-
here is my code it is a js function popup!! for printing the data i get . Now as per the current code if i click on print in the preview it shows me the parent content in the background as well! IS there a way to this! function popUp(){ document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'; //var formData = document.getElementById('profile_info').innerHTML; var formData = "<div class='tabconten_1'>"; formData = formData + "<a id='closemenupop' href='javascript:close();' ></a>"; formData = formData + "<div id='logo1'></div></div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<div class='tabconten_1'>"+document.getElementById('profile_info').innerHTML+"</div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<div class='tabconten_1'></div>"; formData = formData + "<a class='searchbtn1' href='javascript:window.focus();window.print();' >Drucken</a>"; document.getElementById('light').innerHTML = formData ; //popUp_second(); } <div id="light" class="white_content"> </div> <div id="fade" class="black_overlay"></div> Thanks
-
i am using the csv reader library!! it works great i have a small issue left my csv has the first line as the name of the column !! the csv is read as array like if i have 3 columns it would be used a $row[0], $row[1],$row[2] any help wil be appreciated Thanks
-
hey im using code igniter 2.0 im currently using the csv reader class to import a csv file to the db!! it works. I want to implement the following when the next import takes place compare the values and then insert. I am trying but the csv reader is returning $feilds[0] in a for loop. i have tried $this->load->library('csvreader'); $csv_file = './uploads/abc.csv'; $csvData = $this->csvreader->parse_file($csv_file); foreach($csvData as $id=>$fields) { $this->db->get('test'); $fields[0]; insert query with the $feilds[0] } thanks
-
i have the following problem i have a mail id displayed on the site. on clicking the link the email address should get saved to the outlook express contacts. all i have been doing is reading through but did not find any revelance to implement any help of any sort will be appreciated thanks
-
is there a backend for codeigniter where i can perform database operations coz the one's that are available i guess are a problem on the latest realease of CI. Thanks Rgds
-
please have a look at the following view and controller file, PS i have removed the index file using the tutorial given on the ci website now i get a object not found error. ----- view file <?php echo form_open('login/validate_credentials'); ?> <div id="loging_col"> <div id="login_head">Anmelden</div> <div id="email_address_area"> <?php echo form_input('email_address','email'); ?> </div> <div id="email_password_name">E-mail Address</div> <div id="password_area"> <?php echo form_password('password','password' ); ?> </div> <div id="email_password_name">Passwort</div> <div id="form_submit"> <?php echo form_submit('submit', 'Anmelden'); ?> </div> ----------------------- this is the controller class Login extends CI_Controller { function index() { $data['main_content'] = 'login_form'; $this->load->view('login', $data); } function validate_credentials() { $this->load->model('membership_model'); $query = $this->membership_model->validate(); if($query) // if the user's credentials validated... { $data = array( 'email_address' => $this->input->post('email_address'), 'is_logged_in' => true ); $this->session->set_userdata($data); //redirect('site/members_area','refresh'); $this->load->view('main_baukompass'); } else // incorrect username or password { $data['main_content'] = 'username or password does not match'; //redirect('login','refresh'); $this->load->view('login', $data); } } function signup() { $data['main_content'] = 'signup_form'; $this->load->view('registration', $data); } he above code keeps loading the "login/validate_credentials" and says object expected.
-
what ever values i enter the search always shows either ASC or DESC here are some values SELECT id, buss_name, buss_desc, buss_video, buss_link, city, zipcode, country, address, tag FROM wp_business WHERE lat BETWEEN 4.7748161 - 0.21685074885792 AND 4.7748161 + 0.21685074885792 AND lon BETWEEN 51.5748068 - 3.4759198257523 AND 51.5748068 + 3.4759198257523 ORDER BY id LIMIT 0 , 30 i want it to sort dynamically based on which ever city is closer should come first. Thanks
-
hey guys here is my query $sql1 = "SELECT buss_name,buss_desc,buss_video,buss_link,city,zipcode,country,address,tag FROM wp_business WHERE lat BETWEEN $lat - $lat_range AND $lat + $lat_range AND lon BETWEEN $lon - $lon_range AND $lon + $lon_range AND Comp_name ='".$_GET['category']."' order by lat,lon desc LIMIT 0 , 7 "; the query is supposed to do the following 1)find the nearest city from the database the query does that but when im printing the div i am unable to sort the results based on the nearest to the city searched. I have tried orderby and all that stuff but in vain Thanks
-
hey guys here is my code for the model view and the controller using CI version 2.0 + the controller sea_con.php <?php class Sea_con extends CI_Controller{ public function index(){ $this->search('standard'); } public function json(){ $this->search('json'); } public function search($transport = null){ //load database $this->load->database(); //load posts model $this->load->model('sea', 'posts'); //load JSON lib $this->load->library('JSON', 'json'); //init posts array $posts = array(); //validate and filter the input if(isset($_POST['searchterm']) && !empty($_POST['searchterm'])){ //clean the string, just in case $searchterm = strip_tags($_POST['searchterm']); //get the results if any $posts = $this->posts->search($searchterm); } //if request came from a JSON application if($transport == 'json'){ //output the encoded string echo $this->json->encode($posts); //and exit, no reason to continue exit; } //assign post array $this->data['posts'] = $posts; $this->data ; print_r($_POST); //display the view $this->load->view('livesearch',$posts); } } ?> ----------------------------------------------------------------------------- the view livesearch.php <html> <div id="form-container-wrapper"> <div id="form-container"> <form method="post" id="ls-form" action="<?php site_url('livesearch'); ?>"> <p> <label for="searchterm" class="heading">Start typing in the bessage box. Try <strong>CodeIgniter</strong>, for example.</label> </p> <p> <input type="text" name="searchterm" id="searchterm" value="" /> <input type="submit" name="Submit" id="submit" value="Submit" /> </p> </form> </div><!-- form-container --> </div><!-- form-container-wrapper --> <div id="search-results-wrapper"> <div id="search-results"> <?php if($posts): ?> <h2>Search results:</h2> <?php $count = 1; foreach($posts as $key => $post) : ?> <h3><?php echo $count; ?>. <?php echo $post['title']; ?></h3> <p><?php echo $post['body']; ?></p> <?php $count++; endforeach; ?> <?php else: ?> <h2>Search results:</h2> <p>Your query did not match any posts.</p> <?php endif; ?> </div><!-- end search-results --> </div><!-- end search-results-wrapper --> <!-- footer--> </html> ----------------------------------------------------------------------------------- the model sea.php <?php CLASS Sea EXTENDS CI_Model{ PUBLIC FUNCTION search($term) { $term = $this->db->escape($term); $sql = "select * from posts where title like $term "; $res = $this->db->query($sql); $items = ARRAY(); IF ($res->num_rows() > 0) { $count = 0; FOREACH ($res->result() AS $item) { FOREACH ($item AS $key => $value) { $items[$count][$key] = $value; } $count++; } } RETURN $items; } } ?> ----------------------------------------------------------------------- i get a variable posts undefined in my view error also i get the post data but my ajax functionality dosent seems to work. Thanks
-
thanks wil try it
-
i am currently using CI version 2.0.2 i have installed backendpro successfully on my CI install now i am unable to view my control panel. which file do i have to access for the control panel. i have followed the installation from the forum http://codeigniter.com/forums/viewthread/76078/P240/#496575 i have done exactly the same. ps:- when the install completes i get a screen that says click here to go to the backend but i get the object not found error
-
hey guys currently im using the following link structure for wordpress http://localhost/wordpress/subject/?category=BAKER and i access the URL using the $_GET method! now i want to change the link structure to the foll http://localhost/wordpress/subject/BAKER were or how can I change the link structure. SUBJECT is a template page!! Thanks