Jump to content

guif

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Posts posted by guif

  1. hi!

    i would like to monitoring the size of tablaspaces in my oracle.

    I have the query to show this values but i don't know to show in my web.

    The query is:

     

    $query =   "select    fs.tablespace_name, (df.totalspace - fs.freespace),fs.freespace, df.totalspace,
             round(100 * (fs.freespace / df.totalspace))
            from (select tablespace_name, round(sum(bytes) / 1048576) TotalSpace
               from dba_data_files
            group by tablespace_name) df, (select    tablespace_name, round(sum(bytes) / 1048576) FreeSpace from dba_free_space
            group by tablespace_name) fs where df.tablespace_name = fs.tablespace_name";
    

     

    I see the function "oci_connect" in php to establishes a connection to the Oracle server but my level of php is very low.

     

    Any body help me??? I would like to show in a different rows and columns my values for example:

     

    name_tamblespace | total_size | Used_% | free_size | free_size_%

     

    very thanks!

  2. I have a row in mysql that the content is:

     

    insert into Link (Id_Link,Link) values (1,'//server/folder/documentum.doc');

     

    I would like to make a link and I put this:

     

    <a href="file:///<?php echo $row['Link']; ?>" target="_blank" title="<?php echo $row['Link']; ?>">

     

    the link as: file://///server/folder/documentum.doc That's right!

     

    why i can't open the DOC file directly with my Firefox??

    If I copy this direction and put into the toolbar the file is open!

     

  3. Now, I  see the element!!!

    I change this:

     

    <li><a href="lib/consultas.php?accion=E" onclick="load('lib/consultas.php?accion=E','consulta');return false;">

     

    for:

     

    <li><a href="lib/consultas.php?accion=E" onclick="load('lib/consultas.php?accion=E[b]&id=<?php echo $row['pkey']; ?>[/b]','consulta');return false;">

     

    if I put in case E:

     

    echo  $_GET['id'];

     

    I see the element that i Clicked.

     

    but... i would like to insert a MySQl query:

     

    $queEmp = "select pkey, UPDATED, reporter, resolution, summary from `jiraissue` where pkey like $_GET['id']";

     

    why did not run?

  4. now, if i change this line:

     

    <li><a href="lib/consultas.php?accion=E" onclick="load('lib/consultas.php?accion=E','consulta');return false;">

     

    and put:

     

    <li><a href="lib/consultas.php?accion=E[b]&<?php echo $row['pkey']; ?>[/b]" onclick="load('lib/consultas.php?accion=E','consulta');return false;">

     

    I see the item of <li> name into the link but if i make a click, the echo don't give any result...

    help....

  5. I have problems with my Autosuggest project.

     

    I don't know to detect which is the value that I click.

     

    In my index.php i have this:

     

    <div id="search-wrap">
    Seach values:<br>
    <input name="search-q2" id="search-q2" type="text" onkeyup="javascript:autosuggest2()" value="write a value...."/>
    <br><br>
    </div>

     

    To search the values i have the file "seach_values.php" and i have this:

     

    <?php
    $searchq		=	strip_tags($_GET['q']);
    $getRecord_sql = "select pkey from TABLE where project = '10000' and pkey like '%".$searchq."%'";
    $getRecord		=	mysql_query($getRecord_sql);
    if(strlen($searchq)>0){
    echo '<ul>';
    while ($row = mysql_fetch_array($getRecord)) {
    ?>
    
    <li><a href="lib/consultas.php?accion=E" onclick="load('lib/consultas.php?accion=E','consulta');return false;">
    
    <?php 
    echo $row['pkey'];
    ?> 
    
    </a>
    </li>
    
    <?php 
    }echo '</ul>'; 
    } 
    ?>

     

     

    This is correct, because i see the results when i write into my input box.

    But, when I click into one value (into <li>) the results all times are: "Query was empty"

     

    I put the case "E" from "consultas.php":

     

    case 'E':		
    
    echo "<br>";
    		echo my value is....;
    echo "<br>";
    		echo $which is the value I clicked??????;
    echo "<br>";
    

  6. yeah!

    finally I put this code:

     

    <?php
    $str = exec("ping -n 1 -w 1 100.100.100.100", $input, $result);
    if ($result == 0){
    echo "<img src=\"on.png\">";
    }else{
    echo "<img src=\"off.png\">";
    }
    ?>

     

    It's run correctly, but i would like to insert this code into a javascript function because I insert many times this PHP and the page is very hard to load.

    I would like to insert a button:

     

    <input type="submit" onClick="para();">

     

    and when I press this button, the javascript runs.

    Is it possible??

  7. I change this code and I put this:

     

    IP: 10.140.206.123 (
    <?php
    $ping_ex = exec("ping -n 1 10.110.206.123", $ping_result, $pr);
    if (count($ping_result) > 1){
    echo "<img src=\"on.png\">";
    } else{
    echo "<img src=\"off.png\">";
    }
    ?> )
    
    
    IP: 127.0.0.1 (
    <?php
    $ping_ex = exec("ping -n 1 127.0.0.1", $ping_result, $pr);
    if (count($ping_result) > 1){
    echo "<img src=\"on.png\">";
    } else{
    echo "<img src=\"off.png\">";
    }
    ?> )

     

    In the first case the resulst are NO and the second case are YES.

    But... the result is YES in two cases. Why???

  8. I would like to make a simple monitoring. I make this:

     

    <?php
    $ip = $_SERVER['127.0.0.1'];
    exec("ping -n 4 $ip 2>&1", $output, $retval);
    if ($retval != 0) { 
    echo "no!"; 
    } 
    else 
    { 
    echo "yes!"; }
    ?>

     

    I use my internal IP: 127.0.0.1.

    The result is: NO!

     

    why???

  9. I would like to make a simple autosuggest but i don't understand why my code is not running.

    Help me please!

     

    here is the code:

     

    <?php

    require_once('db.php');

    include('classes/stem.php');

    include('classes/cleaner.php');

     

    if( !empty ( $_POST['search'] ) ):

     

    $string = $_POST['search'];

     

    $stemmer = new Stemmer;

    $stemmed_string = $stemmer->stem ( $string );

     

    $clean_string = new jSearchString();

    $stemmed_string = $clean_string->parseString ( $stemmed_string );

     

    $new_string = '';

    foreach ( array_unique ( split ( " ",$stemmed_string ) ) as $array => $value )

    {

    if(strlen($value) >= 3)

    {

    $new_string .= ''.$value.' ';

    }

    }

     

    $new_string = substr ( $new_string,0, ( strLen ( $new_string ) -1 ) );

     

    if ( strlen ( $new_string ) > 3 ):

     

    $split_stemmed = split ( " ",$new_string );

     

    mysql_select_db($database);

     

    $sql = "select pkey from jiraissue where project = '10040' and pkey like '%".$val."%'";

     

    if($total>0){

    echo '<ul>';

    while ( $row = mysql_fetch_assoc ( $query ) ){

    echo '<li>'."\n";

    echo $row['pkey'];

    echo '</li>';

    }

    echo '</ul>';

    }

    ?>

  10. hi!

    I see some webs with a similar style as wordpress.com. For example: http://codesnippets.joyent.com/ (see the "Top Tags Alphabetically" at the left the page)

    how can i make a small web with 3 or 4 categories?

    I have this pages:

     

    - index.html

    -- Programing

    ----- applescript

    ----- cocoa

    -- OS

    ----- windows

    ----- linux

    ----- mac

     

    In the index.html i see all the categories, but If i click into Windows I see only the posts of Windows.

     

    thanks!

  11. hi!

     

    I have problems to give the value of a text.

     

    I have in a PHP this:

     

    <?php
    $searchq  = strip_tags($_GET['q']);
    $getRecord_sql = 'select pkey from jiraissue where project = 10040 and pkey like "%'.$searchq.'%"';
    $getRecord = mysql_query($getRecord_sql);
    if(strlen($searchq)>0){
    echo '<ul>';
    while ($row = mysql_fetch_array($getRecord)) {
    ?>
        <li><a href="lib/consultas.php?accion=E" onclick="load('lib/consultas.php?accion=E','consulta');return false;">

     

    and in my file consultas.php, the case E:

     

    case 'E':		
    $queEmp	= "select pkey, created, UPDATED, reporter, assignee, summary, description from `jiraissue` where project = 10040 and pkey like ".$search-q2." ";  
    $resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
    $totEmp = mysql_num_rows($resEmp);
    if ($totEmp> 0) {
    while ($rowEmp = mysql_fetch_assoc($resEmp)) {
    	echo "<strong>Incidencia:</strong> <u>".$rowEmp['pkey']."</u><br>";
    	echo "<strong>Data:</strong> ".$rowEmp['created']." / ".$rowEmp['UPDATED']."<br>";		
    	echo "<strong>Tecnic Obre:</strong> ".$rowEmp['reporter']."<br>";
    	echo "<strong>Tecnic Actual:</strong> ".$rowEmp['assignee']."<br>";
    	echo "<strong>Descripcio incidencia:</strong> ".$rowEmp['summary']."<br>";
    	echo "<strong>Intervencions:</strong> ".$rowEmp['description']."<br><br>";
    	}
    }
    break;	
    mysql_close($conexion);

     

     

    Why the result of my query is:

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0' at line 1

  12. hi!

    I have some links into my php but all my links are opened in a new window:

     

    <a href="lib/consultas.php?accion=B">link2</a><br>

     

    and I have a DIV that it's call information.

    Is it possible to open consultas.php into my DIV??

     

    very thanks!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.