Line 1:Line 2: →global $mCM_TEMPLATE_argv;Line 3: →$bibtex = @file_get_contents( "bibtex/".$mCM_TEMPLATE_argv[0].".bibtex" )."";Line 4: $mCM_TEMPLATE_argv[0];Line 5: →if ( $bibtex == "" ) $bibtex = "title=BIBTEX not found";Line 6: →$bibtex = str_replace( "{\'e}", "é", $bibtex );Line 7: →$bibtex = str_replace( "\_", "_", $bibtex );Line 8: →$bibtex = str_replace( "},", "}|", $bibtex );Line 9: →// LV (technically no long o, but sometimes...)Line 10: →$bibtex = str_replace( "\=a", "ā", $bibtex );Line 11: →$bibtex = str_replace( "\=e", "ē", $bibtex );Line 12: →$bibtex = str_replace( "\=\i", "ī", $bibtex );Line 13: →$bibtex = str_replace( "\=o", "õ", $bibtex );Line 14: →$bibtex = str_replace( "\=u", "ū", $bibtex );Line 15: →$bibtex = str_replace( "\&", "&", $bibtex );Line 16: →$bibtex = substr( $bibtex, strpos( $bibtex, " " )+1 );Line 17: →$parts = explode( "|", $bibtex );Line 18: →for ( $n = 0; $n < sizeof( $parts ); $n = $n + 1 ) {Line 19: →→$eq = strpos( $parts[$n], "=" );Line 20: →→if ( $eq !== false ) {Line 21: →→→$key = strtolower(trim( substr( $parts[$n], 0, $eq )));Line 22: →→→$value = trim( substr( $parts[$n], $eq+1, 99999 ));Line 23: →→→$cite[$key] = str_replace( "}", "", str_replace( "{", "", $value ) );Line 24: →→→/* echo $key."=>".$value."<br>"; */Line 25: →→}Line 26: →}Line 27: →$check = array( "title", "author", "isbn", "lccn", "url", "year", "publisher" );Line 28: →$mapto = array( "title"=>"title", "author"=>"last", "isbn"=>"isbn", "lccn"=>"lccn", "url"=>"url", "year"=>"date", "publisher"=>"publisher" );Line 29: →$lor = "";Line 30: →foreach ( $check as $key => $value ) {Line 31: →→if ( array_key_exists( $value, $cite ) ) {Line 32: →→→echo $lor.$mapto[ $value ]."=".$cite[ $value ];Line 33: →→→$lor = "|";Line 34: →→→unset ( $cite[$value] );Line 35: →→}Line 36: →}Line 37: →echo $lor."bibtex=".$mCM_TEMPLATE_argv[0];Line 38: